-
Notifications
You must be signed in to change notification settings - Fork 889
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable Chromium's DeviceInfoSyncBridge::ExpireOldEntries #12005
Conversation
4933d90
to
91d98c6
Compare
954a8cc
to
e9eab63
Compare
e9eab63
to
2e66a28
Compare
EXPECT_FALSE( | ||
batch->GetModelTypeState().progress_marker().has_token()); | ||
} else { | ||
ASSERT_EQ(current_call_number, 2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you sure this block is tested? RunLoop seems to only wait for the first call and then there is no second run waiting for second callback.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am sure this block is executed, because I have been using there LOG()
traces while development.
Also there is EXPECT_CALL(*processor(), ModelReadyToSync).Times(2)
.
But I will recheck code around your notice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2e66a28
to
f47ba5a
Compare
chromium_src/components/sync_device_info/device_info_sync_bridge_unittest.cc
Outdated
Show resolved
Hide resolved
f47ba5a
to
5e606dd
Compare
pref_service_->SetTime(kResetDevicesProgressTokenTime, base::Time::Now()); | ||
} | ||
|
||
std::string DeviceInfoPrefs::GetResetDevicesProgressTokenTimeName() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't look like it's used anywhere.
and if it was, the pref name should be accessed directly via const char []
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RegisterProfilePrefs_ChromiumImpl(PrefRegistrySimple* registry); \ | ||
static void RegisterProfilePrefs | ||
|
||
#define GarbageCollectExpiredCacheGuids \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: these additions could be done in the same #define RegisterProfilePrefs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, this is fixed at e747431
#include "src/components/sync_device_info/device_info_sync_bridge.cc" | ||
|
||
#undef BRAVE_SKIP_EXPIRE_OLD_ENTRIES |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#undef BRAVE_ON_READ_ALL_METADATA_CLEAR_PROGRESS_TOKEN
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, fixed at e747431
e747431
to
142ab1d
Compare
Squashed commits, rebased on master, fixed wrong copyright year; no other changes. |
Verified on Android, added test plan for Android. |
Resolves brave/brave-browser#20937
This PR disables Chromium's feature of expiring old devices in the sync chain.
Chromium removes the devices from the local sync db which are older than 56 days but these devices are still stored on ser server.
This PR disables
DeviceInfoSyncBridge::ExpireOldEntries
to prevent expiring of the devices. Also, for the existing browsers with enabled sync it once resets the progress token atDeviceInfoSyncBridge::OnReadAllMetadata
to reset.Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
,npm run lint
,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan:
Test plan
I. Test plan for QA. You will need to have a sync chain where are present devices which were unused for more than 56 days.
II. Test plan when it is possible to make own builds, but still require to have a sync chain with expired devices. Useless for QA team
DeviceInfoSyncBridge::OnReadAllMetadata
of metadata_batch->ClearProgressToken()#define BRAVE_SKIP_EXPIRE_OLD_ENTRIES return;
DeviceInfoSyncBridge::OnReadAllMetadata
Enable Brave code at BRAVE_SKIP_EXPIRE_OLD_ENTRIES
remove pref of
brave_sync_v2.reset_devices_progress_token_time