Chromium Code Reviews| 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..afe1d79f6cf0986040b8ff9729388aeddba60d2d 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_; |
| + std::string 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). |
|
jvoung - send to chromium...
2011/11/11 22:57:34
Is it okay to override the update URL using this c
|
| + if (cmdline->HasSwitch(switches::kAppsGalleryUpdateURL)) { |
| + app_update_url_ = |
| + cmdline->GetSwitchValueASCII(switches::kAppsGalleryUpdateURL); |
| + } else { |
| + app_update_url_ = ""; |
| + } |
| + |
| // 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,11 @@ int ChromeConfigurator::MinimumReCheckWait() { |
| } |
| GURL ChromeConfigurator::UpdateUrl() { |
| - return GURL("http://clients2.google.com/service/update2/crx"); |
| + if (app_update_url_.empty()) { |
| + return GURL("http://clients2.google.com/service/update2/crx"); |
| + } else { |
| + return GURL(app_update_url_); |
| + } |
| } |
| const char* ChromeConfigurator::ExtraRequestParams() { |