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

Unified Diff: chrome/browser/prefs/pref_registry_syncable.cc

Issue 12033093: sync: Implementation of Priority Preferences. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Attempting to parametrize the PSS pref test fixture to also test priority prefs. 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/prefs/pref_registry_syncable.cc
diff --git a/chrome/browser/prefs/pref_registry_syncable.cc b/chrome/browser/prefs/pref_registry_syncable.cc
index 3a343609cc46a9f35402750de39361b12963eda0..c580a88ab5cf2c2518aa653919ca6a4387fed431 100644
--- a/chrome/browser/prefs/pref_registry_syncable.cc
+++ b/chrome/browser/prefs/pref_registry_syncable.cc
@@ -62,7 +62,7 @@ PrefRegistrySyncable::PrefRegistrySyncable() {
PrefRegistrySyncable::~PrefRegistrySyncable() {
}
-const std::set<std::string>&
+const PrefRegistrySyncable::PrefToStatus&
PrefRegistrySyncable::syncable_preferences() const {
return syncable_preferences_;
}
@@ -202,11 +202,12 @@ void PrefRegistrySyncable::RegisterSyncablePreference(
PrefSyncStatus sync_status) {
PrefRegistry::RegisterPreference(path, default_value);
- if (sync_status == SYNCABLE_PREF) {
- syncable_preferences_.insert(path);
+ if (sync_status == PrefRegistrySyncable::SYNCABLE_PREF ||
+ sync_status == PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF) {
+ syncable_preferences_[path] = sync_status;
if (!callback_.is_null())
- callback_.Run(path);
+ callback_.Run(path, sync_status);
}
}

Powered by Google App Engine
This is Rietveld 408576698