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

Side by Side Diff: third_party/WebKit/Source/platform/weborigin/SecurityOrigin.h

Issue 2009453002: service worker: Don't control a subframe of an insecure context (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 // Returns true if |document| can display content from the given URL (e.g., 134 // Returns true if |document| can display content from the given URL (e.g.,
135 // in an iframe or as an image). For example, web sites generally cannot 135 // in an iframe or as an image). For example, web sites generally cannot
136 // display content from the user's files system. 136 // display content from the user's files system.
137 bool canDisplay(const KURL&) const; 137 bool canDisplay(const KURL&) const;
138 138
139 // Returns true if the origin loads resources either from the local 139 // Returns true if the origin loads resources either from the local
140 // machine or over the network from a 140 // machine or over the network from a
141 // cryptographically-authenticated origin, as described in 141 // cryptographically-authenticated origin, as described in
142 // https://w3c.github.io/webappsec/specs/powerfulfeatures/#is-origin-trustwo rthy. 142 // https://w3c.github.io/webappsec/specs/powerfulfeatures/#is-origin-trustwo rthy.
143 bool isPotentiallyTrustworthy() const; 143 bool isPotentiallyTrustworthy() const;
144 bool isPotentiallyTrustworthy(String* errorMessage) const;
144 145
145 // Returns a human-readable error message describing that a non-secure origi n's access to a feature is denied. 146 // Returns a human-readable error message describing that a non-secure origi n's access to a feature is denied.
146 static String isPotentiallyTrustworthyErrorMessage(); 147 static String isPotentiallyTrustworthyErrorMessage();
147 148
148 // Returns true if this SecurityOrigin can load local resources, such 149 // Returns true if this SecurityOrigin can load local resources, such
149 // as images, iframes, and style sheets, and can link to local URLs. 150 // as images, iframes, and style sheets, and can link to local URLs.
150 // For example, call this function before creating an iframe to a 151 // For example, call this function before creating an iframe to a
151 // file:// URL. 152 // file:// URL.
152 // 153 //
153 // Note: A SecurityOrigin might be allowed to load local resources 154 // Note: A SecurityOrigin might be allowed to load local resources
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 bool m_universalAccess; 284 bool m_universalAccess;
284 bool m_domainWasSetInDOM; 285 bool m_domainWasSetInDOM;
285 bool m_canLoadLocalResources; 286 bool m_canLoadLocalResources;
286 bool m_blockLocalAccessFromLocalOrigin; 287 bool m_blockLocalAccessFromLocalOrigin;
287 bool m_isUniqueOriginPotentiallyTrustworthy; 288 bool m_isUniqueOriginPotentiallyTrustworthy;
288 }; 289 };
289 290
290 } // namespace blink 291 } // namespace blink
291 292
292 #endif // SecurityOrigin_h 293 #endif // SecurityOrigin_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698