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

Unified Diff: chrome/browser/profiles/profile_impl.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/profiles/profile_impl.h ('k') | chrome/browser/profiles/profile_keyed_base_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_impl.cc
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index 58f568eb64a746fd1e0bfb0fe4e53953f6996036..7d9922ad640f5c5abdfe1e369a2f5a06b28036e1 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -272,58 +272,72 @@ int ProfileImpl::create_readme_delay_ms = 60000;
const char* const ProfileImpl::kPrefExitTypeNormal = "Normal";
// static
-void ProfileImpl::RegisterUserPrefs(PrefRegistrySyncable* registry) {
- registry->RegisterBooleanPref(prefs::kSavingBrowserHistoryDisabled,
- false,
- PrefRegistrySyncable::UNSYNCABLE_PREF);
- registry->RegisterBooleanPref(prefs::kAllowDeletingBrowserHistory,
- true,
- PrefRegistrySyncable::UNSYNCABLE_PREF);
- registry->RegisterBooleanPref(prefs::kSigninAllowed,
- true,
- PrefRegistrySyncable::UNSYNCABLE_PREF);
- registry->RegisterBooleanPref(prefs::kForceSafeSearch,
- false,
- PrefRegistrySyncable::UNSYNCABLE_PREF);
- registry->RegisterIntegerPref(prefs::kProfileAvatarIndex,
- -1,
- PrefRegistrySyncable::SYNCABLE_PREF);
- registry->RegisterStringPref(
- prefs::kProfileName, std::string(), PrefRegistrySyncable::SYNCABLE_PREF);
- registry->RegisterBooleanPref(prefs::kProfileIsManaged,
- false,
- PrefRegistrySyncable::SYNCABLE_PREF);
+void ProfileImpl::RegisterUserPrefs(
+ user_prefs::PrefRegistrySyncable* registry) {
+ registry->RegisterBooleanPref(
+ prefs::kSavingBrowserHistoryDisabled,
+ false,
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
+ registry->RegisterBooleanPref(
+ prefs::kAllowDeletingBrowserHistory,
+ true,
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
+ registry->RegisterBooleanPref(
+ prefs::kSigninAllowed,
+ true,
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
+ registry->RegisterBooleanPref(
+ prefs::kForceSafeSearch,
+ false,
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
+ registry->RegisterIntegerPref(
+ prefs::kProfileAvatarIndex,
+ -1,
+ user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
+ registry->RegisterStringPref(prefs::kProfileName,
+ std::string(),
+ user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
+ registry->RegisterBooleanPref(
+ prefs::kProfileIsManaged,
+ false,
+ user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
registry->RegisterStringPref(prefs::kHomePage,
std::string(),
- PrefRegistrySyncable::SYNCABLE_PREF);
+ user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
#if defined(ENABLE_PRINTING)
- registry->RegisterBooleanPref(prefs::kPrintingEnabled,
- true,
- PrefRegistrySyncable::UNSYNCABLE_PREF);
+ registry->RegisterBooleanPref(
+ prefs::kPrintingEnabled,
+ true,
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
#endif
- registry->RegisterBooleanPref(prefs::kPrintPreviewDisabled,
+ registry->RegisterBooleanPref(
+ prefs::kPrintPreviewDisabled,
#if defined(GOOGLE_CHROME_BUILD)
- false,
+ false,
#else
- true,
+ true,
#endif
- PrefRegistrySyncable::UNSYNCABLE_PREF);
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
// Initialize the cache prefs.
- registry->RegisterFilePathPref(prefs::kDiskCacheDir,
- base::FilePath(),
- PrefRegistrySyncable::UNSYNCABLE_PREF);
- registry->RegisterIntegerPref(prefs::kDiskCacheSize,
- 0,
- PrefRegistrySyncable::UNSYNCABLE_PREF);
- registry->RegisterIntegerPref(prefs::kMediaCacheSize,
- 0,
- PrefRegistrySyncable::UNSYNCABLE_PREF);
+ registry->RegisterFilePathPref(
+ prefs::kDiskCacheDir,
+ base::FilePath(),
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
+ registry->RegisterIntegerPref(
+ prefs::kDiskCacheSize,
+ 0,
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
+ registry->RegisterIntegerPref(
+ prefs::kMediaCacheSize,
+ 0,
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
// Deprecated. Kept around for migration.
- registry->RegisterBooleanPref(prefs::kClearSiteDataOnExit,
- false,
- PrefRegistrySyncable::SYNCABLE_PREF);
+ registry->RegisterBooleanPref(
+ prefs::kClearSiteDataOnExit,
+ false,
+ user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
}
ProfileImpl::ProfileImpl(
@@ -334,7 +348,7 @@ ProfileImpl::ProfileImpl(
: zoom_callback_(base::Bind(&ProfileImpl::OnZoomLevelChanged,
base::Unretained(this))),
path_(path),
- pref_registry_(new PrefRegistrySyncable),
+ pref_registry_(new user_prefs::PrefRegistrySyncable),
io_data_(this),
host_content_settings_map_(NULL),
last_session_exit_type_(EXIT_NORMAL),
« no previous file with comments | « chrome/browser/profiles/profile_impl.h ('k') | chrome/browser/profiles/profile_keyed_base_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698