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

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

Issue 11859044: Add a way to specify different source urls for the component updater (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 11 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/component_updater/component_updater_service.h » ('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
===================================================================
--- chrome/browser/component_updater/component_updater_configurator.cc (revision 177059)
+++ chrome/browser/component_updater/component_updater_configurator.cc (working copy)
@@ -31,6 +31,13 @@
// Add "testrequest=1" parameter to the update check query.
const char kDebugRequestParam[] = "test-request";
+// The urls from which an update manifest can be fetched.
+const char* kUrlSources[] = {
+ "http://clients2.google.com/service/update2/crx", // BANDAID
+ "http://omaha.google.com/service/update2/crx", // CWS_PUBLIC
+ "http://omaha.sandbox.google.com/service/update2/crx" // CWS_SANDBOX
+};
+
bool HasDebugValue(const std::vector<std::string>& vec, const char* test) {
if (vec.empty())
return 0;
@@ -107,7 +114,7 @@
virtual int NextCheckDelay() OVERRIDE;
virtual int StepDelay() OVERRIDE;
virtual int MinimumReCheckWait() OVERRIDE;
- virtual GURL UpdateUrl() OVERRIDE;
+ virtual GURL UpdateUrl(CrxComponent::UrlSource source) OVERRIDE;
virtual const char* ExtraRequestParams() OVERRIDE;
virtual size_t UrlSizeLimit() OVERRIDE;
virtual net::URLRequestContextGetter* RequestContext() OVERRIDE;
@@ -119,7 +126,6 @@
std::string extra_info_;
bool fast_update_;
bool out_of_process_;
- GURL app_update_url_;
};
ChromeConfigurator::ChromeConfigurator(const CommandLine* cmdline,
@@ -133,14 +139,6 @@
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();
@@ -169,8 +167,8 @@
return fast_update_ ? 30 : (6 * kDelayOneHour);
}
-GURL ChromeConfigurator::UpdateUrl() {
- return app_update_url_;
+GURL ChromeConfigurator::UpdateUrl(CrxComponent::UrlSource source) {
+ return GURL(kUrlSources[source]);
}
const char* ChromeConfigurator::ExtraRequestParams() {
« no previous file with comments | « no previous file | chrome/browser/component_updater/component_updater_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698