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

Unified Diff: content/public/common/origin_util.h

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: Minor changes from nasko@'s comments 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
« no previous file with comments | « content/public/browser/web_contents_delegate.cc ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/common/origin_util.h
diff --git a/content/public/common/origin_util.h b/content/public/common/origin_util.h
index c24361b4feaf376566efe40ea4000e505355b1e4..faaadafc827d67766caf5bc8c00cfed33f10cb52 100644
--- a/content/public/common/origin_util.h
+++ b/content/public/common/origin_util.h
@@ -6,6 +6,7 @@
#define CONTENT_PUBLIC_COMMON_ORIGIN_UTIL_H_
#include "content/common/content_export.h"
+#include "url/origin.h"
class GURL;
@@ -22,6 +23,15 @@ bool CONTENT_EXPORT IsOriginSecure(const GURL& url);
// http (localhost only), https, or a custom-set secure scheme.
bool CONTENT_EXPORT OriginCanAccessServiceWorkers(const GURL& url);
+// Returns true if the origin is unique or was considered secure by the client.
+// This behaves as close as possible to
+// SecurityPolicy::isOriginWhiteListedTrustworthy.
+bool CONTENT_EXPORT IsOriginWhiteListedTrustworthy(const url::Origin& origin);
+
+// This is based on SecurityOrigin::isPotentiallyTrustworthy and tries to mimic
+// its behavior.
+bool CONTENT_EXPORT IsPotentiallyTrustworthyOrigin(const url::Origin& origin);
+
} // namespace content
#endif // CONTENT_PUBLIC_COMMON_ORIGIN_UTIL_H_
« no previous file with comments | « content/public/browser/web_contents_delegate.cc ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698