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

Unified Diff: chrome/browser/sync/sync_prefs.cc

Issue 10832286: sync: Introduce control data types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add ToFullModelTypeSet() function Created 8 years, 4 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
Index: chrome/browser/sync/sync_prefs.cc
diff --git a/chrome/browser/sync/sync_prefs.cc b/chrome/browser/sync/sync_prefs.cc
index 2ba2dd959c8e702b95e05e6b0b1606580a5ac6a3..1b7a92fb7200b06fc1783085e00c5807f214aa7d 100644
--- a/chrome/browser/sync/sync_prefs.cc
+++ b/chrome/browser/sync/sync_prefs.cc
@@ -336,15 +336,15 @@ void SyncPrefs::RegisterPreferences() {
enable_by_default,
PrefService::UNSYNCABLE_PREF);
+ syncer::ModelTypeSet user_types = syncer::UserTypes();
+
// Treat bookmarks specially.
RegisterDataTypePreferredPref(syncer::BOOKMARKS, true);
- for (int i = syncer::PREFERENCES; i < syncer::MODEL_TYPE_COUNT; ++i) {
- const syncer::ModelType type = syncer::ModelTypeFromInt(i);
- // Also treat nigori specially.
- if (type == syncer::NIGORI) {
- continue;
- }
- RegisterDataTypePreferredPref(type, enable_by_default);
+ user_types.Remove(syncer::BOOKMARKS);
+
+ for (syncer::ModelTypeSet::Iterator it = user_types.First();
+ it.Good(); it.Inc()) {
+ RegisterDataTypePreferredPref(it.Get(), enable_by_default);
}
pref_service_->RegisterBooleanPref(prefs::kSyncManaged,

Powered by Google App Engine
This is Rietveld 408576698