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

Unified Diff: content/common/origin_util.cc

Issue 1905033002: PlzNavigate: Move navigation-level mixed content checks to the browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@console-security-message
Patch Set: Addressed all jam@ latest comments. Created 3 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
Index: content/common/origin_util.cc
diff --git a/content/common/origin_util.cc b/content/common/origin_util.cc
index 11873d63cfd9de6f8b7b2c4592d785abef089e42..b172c71823e7f582bf8e5aab1a9dfd8e55cc6b21 100644
--- a/content/common/origin_util.cc
+++ b/content/common/origin_util.cc
@@ -66,10 +66,8 @@ bool IsOriginSecure(const GURL& url) {
url.scheme()))
return true;
- if (base::ContainsKey(g_trustworthy_whitelist.Get().secure_origins(),
- url.GetOrigin())) {
+ if (IsOriginWhiteListedTrustworthy(url))
return true;
- }
return false;
}
@@ -86,6 +84,11 @@ bool OriginCanAccessServiceWorkers(const GURL& url) {
return false;
}
+bool IsOriginWhiteListedTrustworthy(const GURL& url) {
+ return base::ContainsKey(g_trustworthy_whitelist.Get().secure_origins(),
+ url.GetOrigin());
+}
+
void ResetSchemesAndOriginsWhitelistForTesting() {
g_trustworthy_whitelist.Get().Reset();
}

Powered by Google App Engine
This is Rietveld 408576698