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

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: 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/prefs/pref_registry_syncable.cc
diff --git a/chrome/browser/prefs/pref_registry_syncable.cc b/chrome/browser/prefs/pref_registry_syncable.cc
index 62e9969ca352f448c245cb16f5a7355a0702ce79..2b84bd205ab245a6477a721722af91ec13cf1876 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