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

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: rebase Created 9 years 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/component_updater/pnacl/OWNERS » ('j') | no next file with comments »
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 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() {
« no previous file with comments | « no previous file | chrome/browser/component_updater/pnacl/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698