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

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

Issue 12033093: sync: Implementation of Priority Preferences. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: another rebase Created 7 years, 10 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 4a9f430829495a4e6fc92b4eacfc6c9174db01e8..e16a6dcee55657123655a5534dbc73e858dc5aef 100644
--- a/chrome/browser/sync/sync_prefs.cc
+++ b/chrome/browser/sync/sync_prefs.cc
@@ -328,6 +328,8 @@ const char* SyncPrefs::GetPrefNameForDataType(syncer::ModelType data_type) {
return prefs::kSyncFaviconImages;
case syncer::FAVICON_TRACKING:
return prefs::kSyncFaviconTracking;
+ case syncer::PRIORITY_PREFERENCES:
+ return prefs::kSyncPriorityPreferences;
default:
break;
}
@@ -393,6 +395,7 @@ void SyncPrefs::RegisterPrefGroups() {
pref_groups_[syncer::EXTENSIONS].Put(syncer::EXTENSION_SETTINGS);
pref_groups_[syncer::PREFERENCES].Put(syncer::DICTIONARY);
+ pref_groups_[syncer::PREFERENCES].Put(syncer::PRIORITY_PREFERENCES);
pref_groups_[syncer::PREFERENCES].Put(syncer::SEARCH_ENGINES);
// TODO(zea): put favicons in the bookmarks group as well once it handles
@@ -441,6 +444,10 @@ void SyncPrefs::SetDataTypePreferred(
return;
}
pref_service_->SetBoolean(pref_name, is_preferred);
+
+ if (type == syncer::PREFERENCES) {
Nicolas Zea 2013/02/21 23:41:11 Why is this necessary? Don't the pref groups handl
albertb 2013/02/22 20:08:47 Done.
+ SetDataTypePreferred(syncer::PRIORITY_PREFERENCES, is_preferred);
+ }
}
syncer::ModelTypeSet SyncPrefs::ResolvePrefGroups(

Powered by Google App Engine
This is Rietveld 408576698