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

Unified Diff: components/user_prefs/pref_registry_syncable.h

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 | « chrome/common/pref_names.cc ('k') | components/user_prefs/pref_registry_syncable.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/user_prefs/pref_registry_syncable.h
diff --git a/components/user_prefs/pref_registry_syncable.h b/components/user_prefs/pref_registry_syncable.h
index 08477f249fe30a117f8d281a1d462ee329b11e94..811209ba722f28142c5462b82efab54fa3f85369 100644
--- a/components/user_prefs/pref_registry_syncable.h
+++ b/components/user_prefs/pref_registry_syncable.h
@@ -30,19 +30,27 @@ class Value;
// does this for Chrome.
class USER_PREFS_EXPORT PrefRegistrySyncable : public PrefRegistry {
public:
- typedef base::Callback<void(const char* path)> SyncableRegistrationCallback;
-
// Enum used when registering preferences to determine if it should
- // be synced or not.
+ // be synced or not. Syncable priority preferences are preferences that are
+ // never encrypted and are synced before other datatypes. Because they're
+ // never encrypted, on first sync, they can be synced down before the user
+ // is prompted for a passphrase.
enum PrefSyncStatus {
UNSYNCABLE_PREF,
- SYNCABLE_PREF
+ SYNCABLE_PREF,
+ SYNCABLE_PRIORITY_PREF,
};
+ typedef
+ base::Callback<void(const char* path, const PrefSyncStatus sync_status)>
+ SyncableRegistrationCallback;
+
PrefRegistrySyncable();
+ typedef std::map<std::string, PrefSyncStatus> PrefToStatus;
+
// Retrieve the set of syncable preferences currently registered.
- const std::set<std::string>& syncable_preferences() const;
+ const PrefToStatus& syncable_preferences() const;
// Exactly one callback can be set for the event of a syncable
// preference being registered. It will be fired after the
@@ -111,7 +119,7 @@ class USER_PREFS_EXPORT PrefRegistrySyncable : public PrefRegistry {
SyncableRegistrationCallback callback_;
// Contains the names of all registered preferences that are syncable.
- std::set<std::string> syncable_preferences_;
+ PrefToStatus syncable_preferences_;
DISALLOW_COPY_AND_ASSIGN(PrefRegistrySyncable);
};
« no previous file with comments | « chrome/common/pref_names.cc ('k') | components/user_prefs/pref_registry_syncable.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698