summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/profile_sync_service.cc
diff options
context:
space:
mode:
authorjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-27 00:41:59 +0000
committerjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-27 00:41:59 +0000
commitee937fef7825d13ba0374f0062659ffddda4ade3 (patch)
treeff950408db456e3f8c6919cb0064ec2cee14ec4d /chrome/browser/sync/profile_sync_service.cc
parent4f492527ec761fe5d64b4611b2331afc3157c911 (diff)
downloadchromium_src-ee937fef7825d13ba0374f0062659ffddda4ade3.zip
chromium_src-ee937fef7825d13ba0374f0062659ffddda4ade3.tar.gz
chromium_src-ee937fef7825d13ba0374f0062659ffddda4ade3.tar.bz2
Fix prefs registration in SyncPrefs.
All preferences should be registered _before_ a PrefService is created, so reading other prefs during registration is a no-no. The previous code dynamically set a default for the kSyncKeepEverythingSynced preference and for each data type preference dynamically based on whether or not sync setup is complete, but during sync setup each of these would be explicitly set anyway, overriding the default. The one complexity is that there is code in ProfileSyncService::TrySyncDatatypePrefRecovery that attempts to recover from an old bug, and it depends on checking whether the value is default. We remove one of the checks it used, which was redundant (the needed check is just whether the pref is still at its default value, regardless of that default value). TBR=ben@chromium.org BUG=155525 Review URL: https://chromiumcodereview.appspot.com/12315053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184800 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/profile_sync_service.cc')
-rw-r--r--chrome/browser/sync/profile_sync_service.cc2
1 files changed, 0 insertions, 2 deletions
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index ee4690a..5c17fb0 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -250,8 +250,6 @@ void ProfileSyncService::TrySyncDatatypePrefRecovery() {
PrefService* const pref_service = profile_->GetPrefs();
if (!pref_service)
return;
- if (sync_prefs_.HasKeepEverythingSynced())
- return;
const syncer::ModelTypeSet registered_types = GetRegisteredDataTypes();
if (sync_prefs_.GetPreferredDataTypes(registered_types).Size() > 1)
return;