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

Unified Diff: chrome/browser/browser_process_impl.cc

Issue 334783002: Componentize component_updater: Move some paths/constants to component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | « no previous file | chrome/browser/chrome_browser_main.cc » ('j') | chrome/browser/chrome_browser_main.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « no previous file | chrome/browser/chrome_browser_main.cc » ('j') | chrome/browser/chrome_browser_main.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698