Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CSPSource_h | 5 #ifndef CSPSource_h |
| 6 #define CSPSource_h | 6 #define CSPSource_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/frame/csp/ContentSecurityPolicy.h" | 9 #include "core/frame/csp/ContentSecurityPolicy.h" |
| 10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 25 const String& scheme, | 25 const String& scheme, |
| 26 const String& host, | 26 const String& host, |
| 27 int port, | 27 int port, |
| 28 const String& path, | 28 const String& path, |
| 29 WildcardDisposition hostWildcard, | 29 WildcardDisposition hostWildcard, |
| 30 WildcardDisposition portWildcard); | 30 WildcardDisposition portWildcard); |
| 31 bool matches(const KURL&, | 31 bool matches(const KURL&, |
| 32 ResourceRequest::RedirectStatus = | 32 ResourceRequest::RedirectStatus = |
| 33 ResourceRequest::RedirectStatus::NoRedirect) const; | 33 ResourceRequest::RedirectStatus::NoRedirect) const; |
| 34 | 34 |
| 35 // Check whether this CSPSource is subsuming of a given CSPSource for a | |
|
jochen (gone - plz use gerrit)
2016/11/04 09:15:43
not sure whether subsuming *of* is correct english
Mike West
2016/11/04 09:48:10
I'd say "this CSPSource _subsumes_ a given CSPSour
| |
| 36 // subsumption algorithm described here: | |
| 37 // https://w3c.github.io/webappsec-csp/embedded/#subsume-policy | |
| 38 bool isSubsumingOf(CSPSource*); | |
| 39 | |
| 35 DECLARE_TRACE(); | 40 DECLARE_TRACE(); |
| 36 | 41 |
| 37 private: | 42 private: |
| 38 bool schemeMatches(const String&) const; | 43 bool schemeMatches(const String&) const; |
| 39 bool hostMatches(const String&) const; | 44 bool hostMatches(const String&) const; |
| 40 bool pathMatches(const String&) const; | 45 bool pathMatches(const String&) const; |
| 41 // Protocol is necessary to determine default port if it is zero. | 46 // Protocol is necessary to determine default port if it is zero. |
| 42 bool portMatches(int port, const String& protocol) const; | 47 bool portMatches(int port, const String& protocol) const; |
| 43 bool isSchemeOnly() const; | 48 bool isSchemeOnly() const; |
| 44 | 49 |
| 45 Member<ContentSecurityPolicy> m_policy; | 50 Member<ContentSecurityPolicy> m_policy; |
| 46 String m_scheme; | 51 String m_scheme; |
| 47 String m_host; | 52 String m_host; |
| 48 int m_port; | 53 int m_port; |
| 49 String m_path; | 54 String m_path; |
| 50 | 55 |
| 51 WildcardDisposition m_hostWildcard; | 56 WildcardDisposition m_hostWildcard; |
| 52 WildcardDisposition m_portWildcard; | 57 WildcardDisposition m_portWildcard; |
| 53 }; | 58 }; |
| 54 | 59 |
| 55 } // namespace blink | 60 } // namespace blink |
| 56 | 61 |
| 57 #endif | 62 #endif |
| OLD | NEW |