| Index: chrome/browser/component_updater/chrome_component_updater_configurator.cc
|
| diff --git a/chrome/browser/component_updater/chrome_component_updater_configurator.cc b/chrome/browser/component_updater/chrome_component_updater_configurator.cc
|
| index 4e1b1ad10b42d4611ba32049796d170bccb3126e..570437c2c406c25d96a5c9c76672a44cfa7667d2 100644
|
| --- a/chrome/browser/component_updater/chrome_component_updater_configurator.cc
|
| +++ b/chrome/browser/component_updater/chrome_component_updater_configurator.cc
|
| @@ -18,10 +18,12 @@
|
| #include "chrome/browser/google/google_brand.h"
|
| #include "chrome/browser/update_client/chrome_update_query_params_delegate.h"
|
| #include "chrome/common/channel_info.h"
|
| +#include "chrome/common/pref_names.h"
|
| #if defined(OS_WIN)
|
| #include "chrome/installer/util/google_update_settings.h"
|
| #endif
|
| #include "components/component_updater/configurator_impl.h"
|
| +#include "components/prefs/pref_registry_simple.h"
|
| #include "components/prefs/pref_service.h"
|
| #include "content/public/browser/browser_thread.h"
|
|
|
| @@ -65,7 +67,6 @@ class ChromeConfigurator : public update_client::Configurator {
|
| friend class base::RefCountedThreadSafe<ChromeConfigurator>;
|
|
|
| ConfiguratorImpl configurator_impl_;
|
| -
|
| PrefService* pref_service_; // This member is not owned by this class.
|
|
|
| ~ChromeConfigurator() override {}
|
| @@ -164,7 +165,7 @@ bool ChromeConfigurator::EnabledDeltas() const {
|
| }
|
|
|
| bool ChromeConfigurator::EnabledComponentUpdates() const {
|
| - return configurator_impl_.EnabledComponentUpdates();
|
| + return pref_service_->GetBoolean(prefs::kComponentUpdatesEnabled);
|
| }
|
|
|
| bool ChromeConfigurator::EnabledBackgroundDownloader() const {
|
| @@ -194,6 +195,12 @@ PrefService* ChromeConfigurator::GetPrefService() const {
|
|
|
| } // namespace
|
|
|
| +void RegisterPrefsForChromeComponentUpdaterConfigurator(
|
| + PrefRegistrySimple* registry) {
|
| + // The component updates are enabled by default, if the preference is not set.
|
| + registry->RegisterBooleanPref(prefs::kComponentUpdatesEnabled, true);
|
| +}
|
| +
|
| scoped_refptr<update_client::Configurator>
|
| MakeChromeComponentUpdaterConfigurator(
|
| const base::CommandLine* cmdline,
|
|
|