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

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: Now using shared scheme collections from url_util.h. 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 d6e806a3c85073b7e287415ebc2c1a93f9533d1f..06f06a29f5cdf55d548437f3e0bf8dba846202ea 100644
--- a/content/common/origin_util.cc
+++ b/content/common/origin_util.cc
@@ -30,9 +30,8 @@ bool IsOriginSecure(const GURL& url) {
if (base::ContainsValue(url::GetSecureSchemes(), url.scheme()))
return true;
- if (base::ContainsValue(GetSecureOrigins(), url.GetOrigin())) {
+ if (IsOriginWhiteListedTrustworthy(url))
return true;
- }
return false;
}
@@ -48,4 +47,8 @@ bool OriginCanAccessServiceWorkers(const GURL& url) {
return false;
}
+bool IsOriginWhiteListedTrustworthy(const GURL& url) {
+ return base::ContainsValue(GetSecureOrigins(), url.GetOrigin());
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698