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

Unified Diff: components/update_client/utils.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/utils.h ('k') | components/update_client/utils_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/update_client/utils.cc
diff --git a/components/update_client/utils.cc b/components/update_client/utils.cc
index a76e07329fac74a7c32c71d97fdb4edfd8fe4e9a..caa00cea2073b1cab34ba0dd42df24da940012c4 100644
--- a/components/update_client/utils.cc
+++ b/components/update_client/utils.cc
@@ -34,6 +34,7 @@
#include "net/url_request/url_fetcher.h"
#include "net/url_request/url_request_context_getter.h"
#include "net/url_request/url_request_status.h"
+#include "url/gurl.h"
namespace update_client {
@@ -238,4 +239,12 @@ bool IsValidBrand(const std::string& brand) {
}) == brand.end();
}
+void RemoveUnsecureUrls(std::vector<GURL>* urls) {
+ DCHECK(urls);
+ urls->erase(std::remove_if(
+ urls->begin(), urls->end(),
+ [](const GURL& url) { return !url.SchemeIsCryptographic(); }),
+ urls->end());
+}
+
} // namespace update_client
« no previous file with comments | « components/update_client/utils.h ('k') | components/update_client/utils_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698