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

Unified Diff: url/origin.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: url/origin.h
diff --git a/url/origin.h b/url/origin.h
index aab1f05a2013cc84cd4aedbb91a9e10b0df88307..6ae2704a4a1a74b426efa52121a2c42d73b75746 100644
--- a/url/origin.h
+++ b/url/origin.h
@@ -111,6 +111,26 @@ class URL_EXPORT Origin {
bool unique() const { return unique_; }
+ // Unique origins have some extra information attached to them, as a
+ // substitute for security decisions which normally would use the
+ // scheme.
+ bool is_unique_origin_potentially_trustworthy() const {
+ return is_unique_origin_potentially_trustworthy_;
+ }
+ void set_is_unique_origin_potentially_trustworthy(
+ bool is_unique_origin_potentially_trustworthy) {
+ is_unique_origin_potentially_trustworthy_ =
+ is_unique_origin_potentially_trustworthy;
+ }
+ bool should_unique_origin_bypass_secure_context_check() const {
+ return should_unique_origin_bypass_secure_context_check_;
+ }
+ void set_should_unique_origin_bypass_secure_context_check(
+ bool should_unique_origin_bypass_secure_context_check) {
+ should_unique_origin_bypass_secure_context_check_ =
+ should_unique_origin_bypass_secure_context_check;
+ }
Mike West 2016/03/02 14:02:57 Not LGTM, sorry. This isn't going to fly. `url::Or
+
// An ASCII serialization of the Origin as per Section 6.2 of RFC 6454, with
// the addition that all Origins with a 'file' scheme serialize to "file://".
std::string Serialize() const;
@@ -131,6 +151,8 @@ class URL_EXPORT Origin {
SchemeHostPort tuple_;
bool unique_;
+ bool is_unique_origin_potentially_trustworthy_;
+ bool should_unique_origin_bypass_secure_context_check_;
};
URL_EXPORT std::ostream& operator<<(std::ostream& out, const Origin& origin);

Powered by Google App Engine
This is Rietveld 408576698