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

Unified Diff: components/user_prefs/pref_registry_syncable.cc

Issue 12033093: sync: Implementation of Priority Preferences. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 7 years, 9 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
« no previous file with comments | « components/user_prefs/pref_registry_syncable.h ('k') | sync/internal_api/public/base/model_type.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/user_prefs/pref_registry_syncable.cc
diff --git a/components/user_prefs/pref_registry_syncable.cc b/components/user_prefs/pref_registry_syncable.cc
index 874f8a679d113096639d4723fb599b624efbdde6..81eb65c4366d29ef83effe052efeff3db5e51553 100644
--- a/components/user_prefs/pref_registry_syncable.cc
+++ b/components/user_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);
}
}
« no previous file with comments | « components/user_prefs/pref_registry_syncable.h ('k') | sync/internal_api/public/base/model_type.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698