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

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

Issue 9500005: Add a declarative way in c/b/s/sync_prefs.cc to say which data types have prefs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: akalin comments Created 8 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
« no previous file with comments | « no previous file | chrome/browser/sync/sync_prefs.cc » ('j') | chrome/browser/sync/sync_prefs.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/sync_prefs.h
diff --git a/chrome/browser/sync/sync_prefs.h b/chrome/browser/sync/sync_prefs.h
index bb67b1c3812c26210a06d427d25519a84bcbf862..021a065ed81e2eef5ce5fbee3b883f9eb96d8464 100644
--- a/chrome/browser/sync/sync_prefs.h
+++ b/chrome/browser/sync/sync_prefs.h
@@ -118,6 +118,7 @@ class SyncPrefs : public base::SupportsWeakPtr<SyncPrefs>,
syncable::ModelTypeSet GetAcknowledgeSyncedTypesForTest() const;
private:
+ void RegisterDependentTypes();
akalin 2012/03/01 07:40:59 I guess this'll be RegisterPrefGroups
not at google - send to devlin 2012/03/01 23:39:36 Done.
void RegisterPreferences();
void RegisterDataTypePreferredPref(
@@ -125,6 +126,12 @@ class SyncPrefs : public base::SupportsWeakPtr<SyncPrefs>,
bool GetDataTypePreferred(syncable::ModelType type) const;
void SetDataTypePreferred(syncable::ModelType type, bool is_preferred);
+ // Returns a ModelTypeSet based on |types| augmented with any dependent types
akalin 2012/03/01 07:40:59 augmented with any dependent types ... -> expanded
not at google - send to devlin 2012/03/01 23:39:36 Done.
+ // (see |dependent_types_|), but as a subset of |registered_types|.
+ syncable::ModelTypeSet ResolveDependentTypes(
+ const syncable::ModelTypeSet& registered_types,
+ const syncable::ModelTypeSet& types) const;
+
base::NonThreadSafe non_thread_safe_;
// May be NULL.
@@ -136,6 +143,13 @@ class SyncPrefs : public base::SupportsWeakPtr<SyncPrefs>,
// configuration management.
BooleanPrefMember pref_sync_managed_;
+ // Data types where the enable/disabled preference is dependent on another
+ // type, such APP_NOTIFICATIONS on APPS. This is map from dependent type
+ // (APP_NOTIFICATIONS) -> type depended on (APPS).
+ typedef std::map<syncable::ModelType, syncable::ModelType>
+ DependentTypesMap;
+ DependentTypesMap dependent_types_;
+
DISALLOW_COPY_AND_ASSIGN(SyncPrefs);
};
« no previous file with comments | « no previous file | chrome/browser/sync/sync_prefs.cc » ('j') | chrome/browser/sync/sync_prefs.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698