Index: chrome/browser/browser_process_impl.cc |
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc |
index 01e0d306124af77fbe1edf0330537b559eca7a2e..5bbe790e1dd13ab17fcd86678f056bb234518d46 100644 |
--- a/chrome/browser/browser_process_impl.cc |
+++ b/chrome/browser/browser_process_impl.cc |
@@ -18,10 +18,12 @@ |
#include "base/prefs/json_pref_store.h" |
#include "base/prefs/pref_registry_simple.h" |
#include "base/prefs/pref_service.h" |
+#include "base/strings/string_util.h" |
#include "base/synchronization/waitable_event.h" |
#include "base/threading/thread.h" |
#include "base/threading/thread_restrictions.h" |
#include "base/time/default_tick_clock.h" |
+#include "base/version.h" |
#include "chrome/browser/apps/chrome_apps_client.h" |
#include "chrome/browser/background/background_mode_manager.h" |
#include "chrome/browser/chrome_browser_main.h" |
@@ -70,6 +72,7 @@ |
#include "chrome/common/chrome_constants.h" |
#include "chrome/common/chrome_paths.h" |
#include "chrome/common/chrome_switches.h" |
+#include "chrome/common/chrome_version_info.h" |
#include "chrome/common/extensions/chrome_extensions_client.h" |
#include "chrome/common/pref_names.h" |
#include "chrome/common/switch_utils.h" |
@@ -794,13 +797,21 @@ BrowserProcessImpl::component_updater() { |
if (!component_updater_.get()) { |
if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) |
return NULL; |
+ // Parse comma-delimited debug flags. |
+ CommandLine* cmdline = CommandLine::ForCurrentProcess(); |
+ std::vector<std::string> switch_values; |
+ Tokenize(cmdline->GetSwitchValueASCII(switches::kComponentUpdater), |
blundell
2014/06/17 17:26:42
is the reason that you moved this code because swi
tommycli
2014/06/17 19:01:57
Done.
|
+ ",", |
+ &switch_values); |
component_updater::ComponentUpdateService::Configurator* configurator = |
component_updater::MakeChromeComponentUpdaterConfigurator( |
- CommandLine::ForCurrentProcess(), |
+ switch_values, |
io_thread()->system_url_request_context_getter()); |
// Creating the component updater does not do anything, components |
// need to be registered and Start() needs to be called. |
- component_updater_.reset(ComponentUpdateServiceFactory(configurator)); |
+ component_updater_.reset(ComponentUpdateServiceFactory( |
+ configurator, chrome::VersionInfo().Version(), |
+ chrome::VersionInfo().OSType())); |
} |
return component_updater_.get(); |
} |