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

Unified Diff: third_party/WebKit/Source/platform/weborigin/SecurityOrigin.h

Issue 1723753002: Make Document::isSecureContext() work for OOPIFs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: layout test tweaks, remove unnecessarily #include Created 4 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
Index: third_party/WebKit/Source/platform/weborigin/SecurityOrigin.h
diff --git a/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.h b/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.h
index 4cdc68aa2807f85c0f11966e73c31e3947fa1ba1..7b5c70ee88f12684a4114d0e6c07f7f311ef36ba 100644
--- a/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.h
+++ b/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.h
@@ -44,6 +44,7 @@ class PLATFORM_EXPORT SecurityOrigin : public RefCounted<SecurityOrigin> {
WTF_MAKE_NONCOPYABLE(SecurityOrigin);
public:
static PassRefPtr<SecurityOrigin> create(const KURL&);
+ static PassRefPtr<SecurityOrigin> createUnique(bool isPotentiallyTrustworthy, bool shouldBypassSecureContextCheck);
static PassRefPtr<SecurityOrigin> createUnique();
static PassRefPtr<SecurityOrigin> createFromString(const String&);
@@ -144,6 +145,11 @@ public:
// Returns a human-readable error message describing that a non-secure origin's access to a feature is denied.
static String isPotentiallyTrustworthyErrorMessage();
+ void setIsPotentiallyTrustworthySandboxedOrigin();
+
+ // Returns true if the origin should bypass the secure context check.
+ bool bypassSecureContextCheck() const;
+
// Returns true if this SecurityOrigin can load local resources, such
// as images, iframes, and style sheets, and can link to local URLs.
// For example, call this function before creating an iframe to a
@@ -277,6 +283,12 @@ private:
bool m_domainWasSetInDOM;
bool m_canLoadLocalResources;
bool m_blockLocalAccessFromLocalOrigin;
+
+ // True if the origin is unique and should be considered potentially trustworthy.
+ bool m_isUniqueOriginPotentiallyTrustworthy;
+
+ // True if the origin is unique and should bypass the secure context check.
+ bool m_uniqueOriginShouldBypassSecureContextCheck;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698