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

Unified Diff: components/component_updater/configurator_impl.cc

Issue 2654033009: Update component updater URLs. (Closed)
Patch Set: git pull Created 3 years, 10 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
Index: components/component_updater/configurator_impl.cc
diff --git a/components/component_updater/configurator_impl.cc b/components/component_updater/configurator_impl.cc
index 1da87add716765eaa3a4104ea808b6ae15c37246..db6790696ebc88acf59d85f86d0751827243071e 100644
--- a/components/component_updater/configurator_impl.cc
+++ b/components/component_updater/configurator_impl.cc
@@ -9,6 +9,7 @@
#include <algorithm>
#include "base/command_line.h"
+#include "base/feature_list.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/version.h"
@@ -54,6 +55,9 @@ const char kSwitchDisableDeltaUpdates[] = "disable-delta-updates";
const char kSwitchDisableBackgroundDownloads[] = "disable-background-downloads";
#endif // defined(OS_WIN)
+const base::Feature kAlternateComponentUrls{"AlternateComponentUrls",
+ base::FEATURE_DISABLED_BY_DEFAULT};
+
// Returns true if and only if |test| is contained in |vec|.
bool HasSwitchValue(const std::vector<std::string>& vec, const char* test) {
if (vec.empty())
@@ -148,8 +152,14 @@ std::vector<GURL> ConfiguratorImpl::UpdateUrl() const {
return urls;
}
- urls.push_back(GURL(kUpdaterDefaultUrl));
- urls.push_back(GURL(kUpdaterFallbackUrl));
+ if (base::FeatureList::IsEnabled(kAlternateComponentUrls)) {
+ urls.push_back(GURL(kUpdaterDefaultUrlAlt));
+ urls.push_back(GURL(kUpdaterFallbackUrlAlt));
+ } else {
+ urls.push_back(GURL(kUpdaterDefaultUrl));
+ urls.push_back(GURL(kUpdaterFallbackUrl));
+ }
+
if (require_encryption_)
update_client::RemoveUnsecureUrls(&urls);
« no previous file with comments | « components/component_updater/component_updater_url_constants.cc ('k') | testing/variations/fieldtrial_testing_config.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698