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

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

Issue 14622003: components: Move PrefRegistrySyncable into user_prefs namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 7 years, 8 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/browser/sync/sync_prefs.h ('k') | chrome/browser/themes/theme_service_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/sync_prefs.cc
diff --git a/chrome/browser/sync/sync_prefs.cc b/chrome/browser/sync/sync_prefs.cc
index 9a2d798893f398564b919e27b08c424a68add0f9..9c5ac80d24de280fc95ac203a98dbda087b13811 100644
--- a/chrome/browser/sync/sync_prefs.cc
+++ b/chrome/browser/sync/sync_prefs.cc
@@ -45,24 +45,28 @@ SyncPrefs::~SyncPrefs() {
}
// static
-void SyncPrefs::RegisterUserPrefs(PrefRegistrySyncable* registry) {
+void SyncPrefs::RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry) {
// TODO(joi): Remove |prefs| parameter.
- registry->RegisterBooleanPref(prefs::kSyncHasSetupCompleted,
- false,
- PrefRegistrySyncable::UNSYNCABLE_PREF);
- registry->RegisterBooleanPref(prefs::kSyncSuppressStart,
- false,
- PrefRegistrySyncable::UNSYNCABLE_PREF);
- registry->RegisterInt64Pref(prefs::kSyncLastSyncedTime,
- 0,
- PrefRegistrySyncable::UNSYNCABLE_PREF);
+ registry->RegisterBooleanPref(
+ prefs::kSyncHasSetupCompleted,
+ false,
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
+ registry->RegisterBooleanPref(
+ prefs::kSyncSuppressStart,
+ false,
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
+ registry->RegisterInt64Pref(
+ prefs::kSyncLastSyncedTime,
+ 0,
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
// All datatypes are on by default, but this gets set explicitly
// when you configure sync (when turning it on), in
// ProfileSyncService::OnUserChoseDatatypes.
- registry->RegisterBooleanPref(prefs::kSyncKeepEverythingSynced,
- true,
- PrefRegistrySyncable::UNSYNCABLE_PREF);
+ registry->RegisterBooleanPref(
+ prefs::kSyncKeepEverythingSynced,
+ true,
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
syncer::ModelTypeSet user_types = syncer::UserTypes();
@@ -83,24 +87,29 @@ void SyncPrefs::RegisterUserPrefs(PrefRegistrySyncable* registry) {
RegisterDataTypePreferredPref(registry, it.Get(), false);
}
- registry->RegisterBooleanPref(prefs::kSyncManaged,
- false,
- PrefRegistrySyncable::UNSYNCABLE_PREF);
- registry->RegisterStringPref(prefs::kSyncEncryptionBootstrapToken,
- std::string(),
- PrefRegistrySyncable::UNSYNCABLE_PREF);
- registry->RegisterStringPref(prefs::kSyncKeystoreEncryptionBootstrapToken,
- std::string(),
- PrefRegistrySyncable::UNSYNCABLE_PREF);
+ registry->RegisterBooleanPref(
+ prefs::kSyncManaged,
+ false,
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
+ registry->RegisterStringPref(
+ prefs::kSyncEncryptionBootstrapToken,
+ std::string(),
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
+ registry->RegisterStringPref(
+ prefs::kSyncKeystoreEncryptionBootstrapToken,
+ std::string(),
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
#if defined(OS_CHROMEOS)
- registry->RegisterStringPref(prefs::kSyncSpareBootstrapToken,
- "",
- PrefRegistrySyncable::UNSYNCABLE_PREF);
+ registry->RegisterStringPref(
+ prefs::kSyncSpareBootstrapToken,
+ "",
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
#endif
- registry->RegisterStringPref(prefs::kSyncSessionsGUID,
- std::string(),
- PrefRegistrySyncable::UNSYNCABLE_PREF);
+ registry->RegisterStringPref(
+ prefs::kSyncSessionsGUID,
+ std::string(),
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
// We will start prompting people about new data types after the launch of
// SESSIONS - all previously launched data types are treated as if they are
@@ -120,7 +129,7 @@ void SyncPrefs::RegisterUserPrefs(PrefRegistrySyncable* registry) {
model_set.Put(syncer::SESSIONS);
registry->RegisterListPref(prefs::kSyncAcknowledgedSyncTypes,
syncer::ModelTypeSetToValue(model_set),
- PrefRegistrySyncable::UNSYNCABLE_PREF);
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
}
// static
@@ -427,16 +436,19 @@ void SyncPrefs::RegisterPrefGroups() {
}
// static
-void SyncPrefs::RegisterDataTypePreferredPref(PrefRegistrySyncable* registry,
- syncer::ModelType type,
- bool is_preferred) {
+void SyncPrefs::RegisterDataTypePreferredPref(
+ user_prefs::PrefRegistrySyncable* registry,
+ syncer::ModelType type,
+ bool is_preferred) {
const char* pref_name = GetPrefNameForDataType(type);
if (!pref_name) {
NOTREACHED();
return;
}
- registry->RegisterBooleanPref(pref_name, is_preferred,
- PrefRegistrySyncable::UNSYNCABLE_PREF);
+ registry->RegisterBooleanPref(
+ pref_name,
+ is_preferred,
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
}
bool SyncPrefs::GetDataTypePreferred(syncer::ModelType type) const {
« no previous file with comments | « chrome/browser/sync/sync_prefs.h ('k') | chrome/browser/themes/theme_service_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698