| 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 aff33e7350b57ed4a3b22c6fef416a517674337f..d774157ac8a2fcafb6ec3273e9d40fd5b474aab6 100644
|
| --- a/chrome/browser/component_updater/component_updater_configurator.cc
|
| +++ b/chrome/browser/component_updater/component_updater_configurator.cc
|
| @@ -29,6 +29,9 @@ const char kDebugFastUpdate[] = "fast-update";
|
| const char kDebugOutOfProcess[] = "out-of-process";
|
| // Add "testrequest=1" parameter to the update check query.
|
| const char kDebugRequestParam[] = "test-request";
|
| +// Use the sandbox/staging Omaha for debugging instead of Omaha.
|
| +const char kDebugUpdateURL[] = "staging-update-url";
|
| +
|
|
|
| bool HasDebugValue(const std::vector<std::string>& vec, const char* test) {
|
| if (vec.empty())
|
| @@ -102,6 +105,7 @@ class ChromeConfigurator : public ComponentUpdateService::Configurator {
|
| std::string extra_info_;
|
| bool fast_update_;
|
| bool out_of_process_;
|
| + bool use_debug_url_;
|
| };
|
|
|
| ChromeConfigurator::ChromeConfigurator(const CommandLine* cmdline,
|
| @@ -114,6 +118,8 @@ ChromeConfigurator::ChromeConfigurator(const CommandLine* cmdline,
|
| ",", &debug_values);
|
| fast_update_ = HasDebugValue(debug_values, kDebugFastUpdate);
|
| out_of_process_ = HasDebugValue(debug_values, kDebugOutOfProcess);
|
| + use_debug_url_ = HasDebugValue(debug_values, kDebugUpdateURL);
|
| +
|
| // 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();
|
| @@ -138,7 +144,11 @@ int ChromeConfigurator::MinimumReCheckWait() {
|
| }
|
|
|
| GURL ChromeConfigurator::UpdateUrl() {
|
| - return GURL("http://clients2.google.com/service/update2/crx");
|
| + if (!use_debug_url_) {
|
| + return GURL("http://clients2.google.com/service/update2/crx");
|
| + } else {
|
| + return GURL("http://omaha.sandbox.google.com/service/update2/crx");
|
| + }
|
| }
|
|
|
| const char* ChromeConfigurator::ExtraRequestParams() {
|
|
|