Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1324)

Unified Diff: components/browser_sync/profile_sync_service.cc

Issue 2810943007: Allow sync to resume in local backend mode after it has been disabled. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/browser_sync/profile_sync_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/browser_sync/profile_sync_service.cc
diff --git a/components/browser_sync/profile_sync_service.cc b/components/browser_sync/profile_sync_service.cc
index 5eb7949df19312fb33f3f7d137fa9432ae7ff581..753205b2f1c230c08af6f149db50bfd19692d792 100644
--- a/components/browser_sync/profile_sync_service.cc
+++ b/components/browser_sync/profile_sync_service.cc
@@ -2223,7 +2223,9 @@ void ProfileSyncService::RequestStop(SyncStopDataFate data_fate) {
bool ProfileSyncService::IsSyncRequested() const {
DCHECK(thread_checker_.CalledOnValidThread());
- return sync_prefs_.IsSyncRequested();
+ // When local sync is on sync should be considered requsted or otherwise it
+ // will not resume after the policy or the flag has been removed.
+ return sync_prefs_.IsSyncRequested() || sync_prefs_.IsLocalSyncEnabled();
}
SigninManagerBase* ProfileSyncService::signin() const {
« no previous file with comments | « no previous file | components/browser_sync/profile_sync_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698