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

Unified Diff: components/update_client/test_configurator.cc

Issue 1740333002: Allow fallback from https to http for component update checks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « components/update_client/test_configurator.h ('k') | components/update_client/update_checker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/update_client/test_configurator.cc
diff --git a/components/update_client/test_configurator.cc b/components/update_client/test_configurator.cc
index 93279c4e140fb3da679785b8255cc04fcfe2cf31..6ba5392befb2f185f0f93824c5fd44a9d31500af 100644
--- a/components/update_client/test_configurator.cc
+++ b/components/update_client/test_configurator.cc
@@ -55,10 +55,16 @@ int TestConfigurator::UpdateDelay() const {
}
std::vector<GURL> TestConfigurator::UpdateUrl() const {
+ if (!update_check_url_.is_empty())
+ return std::vector<GURL>(1, update_check_url_);
+
return MakeDefaultUrls();
}
std::vector<GURL> TestConfigurator::PingUrl() const {
+ if (!ping_url_.is_empty())
+ return std::vector<GURL>(1, ping_url_);
+
return UpdateUrl();
}
@@ -133,6 +139,14 @@ void TestConfigurator::SetDownloadPreference(
download_preference_ = download_preference;
}
+void TestConfigurator::SetUpdateCheckUrl(const GURL& url) {
+ update_check_url_ = url;
+}
+
+void TestConfigurator::SetPingUrl(const GURL& url) {
+ ping_url_ = url;
+}
+
scoped_refptr<base::SequencedTaskRunner>
TestConfigurator::GetSequencedTaskRunner() const {
DCHECK(worker_task_runner_.get());
« no previous file with comments | « components/update_client/test_configurator.h ('k') | components/update_client/update_checker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698