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

Unified Diff: chrome/browser/browser_process_impl.cc

Issue 6905044: Refactor preference syncing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Self review Created 9 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
Index: chrome/browser/browser_process_impl.cc
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index 54d848ab413d77b90657b14bdc60cb648a36aad8..067ad8fbd315ffc901c8c85d482a332606143fa1 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -843,19 +843,24 @@ void BrowserProcessImpl::CreateLocalState() {
// Make sure the the plugin updater gets notifications of changes
// in the plugin policy lists.
- local_state_->RegisterListPref(prefs::kPluginsDisabledPlugins);
+ local_state_->RegisterListPref(prefs::kPluginsDisabledPlugins,
+ false /* don't sync pref */);
pref_change_registrar_.Add(prefs::kPluginsDisabledPlugins,
PluginUpdater::GetInstance());
- local_state_->RegisterListPref(prefs::kPluginsDisabledPluginsExceptions);
+ local_state_->RegisterListPref(prefs::kPluginsDisabledPluginsExceptions,
+ false /* don't sync pref */);
pref_change_registrar_.Add(prefs::kPluginsDisabledPluginsExceptions,
PluginUpdater::GetInstance());
- local_state_->RegisterListPref(prefs::kPluginsEnabledPlugins);
+ local_state_->RegisterListPref(prefs::kPluginsEnabledPlugins,
+ false /* don't sync pref */);
pref_change_registrar_.Add(prefs::kPluginsEnabledPlugins,
PluginUpdater::GetInstance());
// Initialize and set up notifications for the printing enabled
// preference.
- local_state_->RegisterBooleanPref(prefs::kPrintingEnabled, true);
+ local_state_->RegisterBooleanPref(prefs::kPrintingEnabled,
+ true,
+ false /* don't sync pref */);
bool printing_enabled =
local_state_->GetBoolean(prefs::kPrintingEnabled);
print_job_manager_->set_printing_enabled(printing_enabled);
@@ -864,7 +869,8 @@ void BrowserProcessImpl::CreateLocalState() {
// Initialize the notification for the default browser setting policy.
local_state_->RegisterBooleanPref(prefs::kDefaultBrowserSettingEnabled,
- false);
+ false,
+ false /* don't sync pref */);
if (local_state_->IsManagedPreference(prefs::kDefaultBrowserSettingEnabled)) {
if (local_state_->GetBoolean(prefs::kDefaultBrowserSettingEnabled))
ShellIntegration::SetAsDefaultBrowser();
@@ -873,14 +879,17 @@ void BrowserProcessImpl::CreateLocalState() {
// Initialize the preference for the plugin finder policy.
// This preference is only needed on the IO thread so make it available there.
- local_state_->RegisterBooleanPref(prefs::kDisablePluginFinder, false);
+ local_state_->RegisterBooleanPref(prefs::kDisablePluginFinder,
+ false,
+ false /* don't sync pref */);
plugin_finder_disabled_pref_.Init(prefs::kDisablePluginFinder,
local_state_.get(), NULL);
plugin_finder_disabled_pref_.MoveToThread(BrowserThread::IO);
// Initialize the preference for the disabled schemes policy, and
// load the initial policy on startup.
- local_state_->RegisterListPref(prefs::kDisabledSchemes);
+ local_state_->RegisterListPref(prefs::kDisabledSchemes,
+ false /* don't sync pref */);
disabled_schemes_pref_.Init(prefs::kDisabledSchemes, local_state_.get(),
this);
ApplyDisabledSchemesPolicy();

Powered by Google App Engine
This is Rietveld 408576698