summaryrefslogtreecommitdiffstats
path: root/chrome/browser/prefs
diff options
context:
space:
mode:
authorzea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-13 21:33:30 +0000
committerzea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-13 21:33:30 +0000
commitab5242d0485b8121429938c6d5aadfba4647d81f (patch)
treecd914c23a2ad9ad8426a0dbd4ee9171483c57da9 /chrome/browser/prefs
parent6957be3efacc8028296183dbda5d7974118a5a80 (diff)
downloadchromium_src-ab5242d0485b8121429938c6d5aadfba4647d81f.zip
chromium_src-ab5242d0485b8121429938c6d5aadfba4647d81f.tar.gz
chromium_src-ab5242d0485b8121429938c6d5aadfba4647d81f.tar.bz2
[Sync] Remove unnecessary DCHECK in pref model associator.
We assumed that when a preference becomes unmanaged, it will be user controlled as well. This isn't the case if it was a default value previously. This gets handled properly in the association code though, so just remove the DCHECK and make the comment clearer. BUG=97611 TEST=unit_tests --gtest_filter="*ProfileSyncServicePreference*" Review URL: http://codereview.chromium.org/8266001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105379 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/prefs')
-rw-r--r--chrome/browser/prefs/pref_model_associator.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/chrome/browser/prefs/pref_model_associator.cc b/chrome/browser/prefs/pref_model_associator.cc
index b61e511..1928331 100644
--- a/chrome/browser/prefs/pref_model_associator.cc
+++ b/chrome/browser/prefs/pref_model_associator.cc
@@ -412,10 +412,9 @@ void PrefModelAssociator::ProcessPrefChange(const std::string& name) {
AutoReset<bool> processing_changes(&processing_syncer_changes_, true);
if (synced_preferences_.count(name) == 0) {
- DCHECK(preference->IsUserControlled());
- // This preference was previously not user controlled and there was no sync
- // data, but is now user controlled. We must associate it and create a sync
- // node for it.
+ // Not in synced_preferences_ means no synced data. InitPrefAndAssociate(..)
+ // will determine if we care about its data (e.g. if it has a default value
+ // and hasn't been changed yet we don't) and take care syncing any new data.
InitPrefAndAssociate(SyncData(), name, &changes);
} else {
// We are already syncing this preference, just update it's sync node.