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

Unified Diff: components/sync/driver/sync_prefs.h

Issue 2388163002: [Sync] Move //components/sync to the syncer namespace, take 2. (Closed)
Patch Set: Rebase. Created 4 years, 2 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/sync/driver/sync_policy_handler_unittest.cc ('k') | components/sync/driver/sync_prefs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/driver/sync_prefs.h
diff --git a/components/sync/driver/sync_prefs.h b/components/sync/driver/sync_prefs.h
index 52e812ea49f685e386eb39147ef6c00cb2d3e999..4632586fab0e8bb2a00b01064ce33f0a1a2a2e3e 100644
--- a/components/sync/driver/sync_prefs.h
+++ b/components/sync/driver/sync_prefs.h
@@ -29,7 +29,7 @@ namespace user_prefs {
class PrefRegistrySyncable;
}
-namespace sync_driver {
+namespace syncer {
class SyncPrefObserver {
public:
@@ -97,16 +97,15 @@ class SyncPrefs : NON_EXPORTED_BASE(public base::NonThreadSafe),
// The returned set is guaranteed to be a subset of
// |registered_types|. Returns |registered_types| directly if
// HasKeepEverythingSynced() is true.
- syncer::ModelTypeSet GetPreferredDataTypes(
- syncer::ModelTypeSet registered_types) const;
+ ModelTypeSet GetPreferredDataTypes(ModelTypeSet registered_types) const;
// |preferred_types| should be a subset of |registered_types|. All
// types in |preferred_types| are marked preferred, and all types in
// |registered_types| \ |preferred_types| are marked not preferred.
// Changes are still made to the prefs even if
// HasKeepEverythingSynced() is true, but won't be visible until
// SetKeepEverythingSynced(false) is called.
- void SetPreferredDataTypes(syncer::ModelTypeSet registered_types,
- syncer::ModelTypeSet preferred_types);
+ void SetPreferredDataTypes(ModelTypeSet registered_types,
+ ModelTypeSet preferred_types);
// This pref is set outside of sync.
bool IsManaged() const;
@@ -125,7 +124,7 @@ class SyncPrefs : NON_EXPORTED_BASE(public base::NonThreadSafe),
void SetSyncSessionsGUID(const std::string& guid);
// Maps |data_type| to its corresponding preference name.
- static const char* GetPrefNameForDataType(syncer::ModelType data_type);
+ static const char* GetPrefNameForDataType(ModelType data_type);
#if defined(OS_CHROMEOS)
// Use this spare bootstrap token only when setting up sync for the first
@@ -159,9 +158,9 @@ class SyncPrefs : NON_EXPORTED_BASE(public base::NonThreadSafe),
// Get/set for the last known sync invalidation versions.
void GetInvalidationVersions(
- std::map<syncer::ModelType, int64_t>* invalidation_versions) const;
+ std::map<ModelType, int64_t>* invalidation_versions) const;
void UpdateInvalidationVersions(
- const std::map<syncer::ModelType, int64_t>& invalidation_versions);
+ const std::map<ModelType, int64_t>& invalidation_versions);
// Will return the contents of the LastRunVersion preference. This may be an
// empty string if no version info was present, and is only valid at
@@ -178,8 +177,8 @@ class SyncPrefs : NON_EXPORTED_BASE(public base::NonThreadSafe),
// Get/set for saved Nigori state that needs to be passed to backend
// initialization after transition.
void SetSavedNigoriStateForPassphraseEncryptionTransition(
- const syncer::SyncEncryptionHandler::NigoriState& nigori_state);
- std::unique_ptr<syncer::SyncEncryptionHandler::NigoriState>
+ const SyncEncryptionHandler::NigoriState& nigori_state);
+ std::unique_ptr<SyncEncryptionHandler::NigoriState>
GetSavedNigoriStateForPassphraseEncryptionTransition() const;
private:
@@ -187,15 +186,15 @@ class SyncPrefs : NON_EXPORTED_BASE(public base::NonThreadSafe),
static void RegisterDataTypePreferredPref(
user_prefs::PrefRegistrySyncable* prefs,
- syncer::ModelType type,
+ ModelType type,
bool is_preferred);
- bool GetDataTypePreferred(syncer::ModelType type) const;
- void SetDataTypePreferred(syncer::ModelType type, bool is_preferred);
+ bool GetDataTypePreferred(ModelType type) const;
+ void SetDataTypePreferred(ModelType type, bool is_preferred);
// Returns a ModelTypeSet based on |types| expanded to include pref groups
// (see |pref_groups_|), but as a subset of |registered_types|.
- syncer::ModelTypeSet ResolvePrefGroups(syncer::ModelTypeSet registered_types,
- syncer::ModelTypeSet types) const;
+ ModelTypeSet ResolvePrefGroups(ModelTypeSet registered_types,
+ ModelTypeSet types) const;
void OnSyncManagedPrefChanged();
@@ -211,16 +210,16 @@ class SyncPrefs : NON_EXPORTED_BASE(public base::NonThreadSafe),
// Groups of prefs that always have the same value as a "master" pref.
// For example, the APPS group has {APP_NOTIFICATIONS, APP_SETTINGS}
// (as well as APPS, but that is implied), so
- // pref_groups_[syncer::APPS] = { syncer::APP_NOTIFICATIONS,
- // syncer::APP_SETTINGS }
- // pref_groups_[syncer::EXTENSIONS] = { syncer::EXTENSION_SETTINGS }
+ // pref_groups_[APPS] = { APP_NOTIFICATIONS,
+ // APP_SETTINGS }
+ // pref_groups_[EXTENSIONS] = { EXTENSION_SETTINGS }
// etc.
- typedef std::map<syncer::ModelType, syncer::ModelTypeSet> PrefGroupsMap;
+ typedef std::map<ModelType, ModelTypeSet> PrefGroupsMap;
PrefGroupsMap pref_groups_;
DISALLOW_COPY_AND_ASSIGN(SyncPrefs);
};
-} // namespace sync_driver
+} // namespace syncer
#endif // COMPONENTS_SYNC_DRIVER_SYNC_PREFS_H_
« no previous file with comments | « components/sync/driver/sync_policy_handler_unittest.cc ('k') | components/sync/driver/sync_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698