Index: chrome/browser/browser_process_impl.cc |
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc |
index 7abddbb973f60c75d58406375ed62137f3e15817..51450fe181526cf761cb873d48f9ae507923989e 100644 |
--- a/chrome/browser/browser_process_impl.cc |
+++ b/chrome/browser/browser_process_impl.cc |
@@ -889,19 +889,18 @@ net_log::ChromeNetLog* BrowserProcessImpl::net_log() { |
component_updater::ComponentUpdateService* |
BrowserProcessImpl::component_updater() { |
- if (!component_updater_.get()) { |
- if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) |
- return NULL; |
- scoped_refptr<update_client::Configurator> configurator = |
- component_updater::MakeChromeComponentUpdaterConfigurator( |
- base::CommandLine::ForCurrentProcess(), |
- io_thread()->system_url_request_context_getter(), |
- g_browser_process->local_state()); |
- // Creating the component updater does not do anything, components |
- // need to be registered and Start() needs to be called. |
- component_updater_.reset(component_updater::ComponentUpdateServiceFactory( |
- configurator).release()); |
- } |
+ if (component_updater_) |
+ return component_updater_.get(); |
+ |
+ if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) |
sky
2016/09/14 18:11:00
I'm a bit confused by this check being only in the
|
+ return nullptr; |
+ |
+ component_updater_ = component_updater::ComponentUpdateServiceFactory( |
+ component_updater::MakeChromeComponentUpdaterConfigurator( |
+ base::CommandLine::ForCurrentProcess(), |
+ io_thread()->system_url_request_context_getter(), |
+ g_browser_process->local_state())); |
+ |
return component_updater_.get(); |
} |