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

Unified Diff: chrome/browser/component_updater/component_updater_configurator.cc

Issue 8348026: Add a component installer for Portable NaCl. Registration of installer is (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years, 2 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/ui/browser_init.cc » ('j') | chrome/nacl/pnacl_component_installer.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« no previous file with comments | « no previous file | chrome/browser/ui/browser_init.cc » ('j') | chrome/nacl/pnacl_component_installer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698