Index: chrome/browser/component_updater/component_updater_configurator.cc |
diff --git a/chrome/browser/component_updater/component_updater_configurator.cc b/chrome/browser/component_updater/component_updater_configurator.cc |
index 7588192c93f63371dd6818b90c82e91f90b82797..5f93d7ac9e0eb042ddef245b0fad40eb2a09358d 100644 |
--- a/chrome/browser/component_updater/component_updater_configurator.cc |
+++ b/chrome/browser/component_updater/component_updater_configurator.cc |
@@ -110,6 +110,7 @@ class ChromeConfigurator : public ComponentUpdateService::Configurator { |
std::string extra_info_; |
bool fast_update_; |
bool out_of_process_; |
+ GURL app_update_url_; |
}; |
ChromeConfigurator::ChromeConfigurator(const CommandLine* cmdline, |
@@ -122,6 +123,15 @@ ChromeConfigurator::ChromeConfigurator(const CommandLine* cmdline, |
",", &debug_values); |
fast_update_ = HasDebugValue(debug_values, kDebugFastUpdate); |
out_of_process_ = HasDebugValue(debug_values, kDebugOutOfProcess); |
+ |
+ // Allow switch to override update URL (piggyback on AppsGalleryUpdateURL). |
+ if (cmdline->HasSwitch(switches::kAppsGalleryUpdateURL)) { |
+ app_update_url_ = |
+ GURL(cmdline->GetSwitchValueASCII(switches::kAppsGalleryUpdateURL)); |
+ } else { |
+ app_update_url_ = GURL("http://clients2.google.com/service/update2/crx"); |
+ } |
+ |
// Make the extra request params, they are necessary so omaha does |
// not deliver components that are going to be rejected at install time. |
extra_info_ += chrome::VersionInfo().Version(); |
@@ -146,7 +156,7 @@ int ChromeConfigurator::MinimumReCheckWait() { |
} |
GURL ChromeConfigurator::UpdateUrl() { |
- return GURL("http://clients2.google.com/service/update2/crx"); |
+ return app_update_url_; |
} |
const char* ChromeConfigurator::ExtraRequestParams() { |