| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 | 53 |
| 54 enum MatchResult { | 54 enum MatchResult { |
| 55 MatchesOrigin, | 55 MatchesOrigin, |
| 56 MatchesOriginButIsPublicSuffix, | 56 MatchesOriginButIsPublicSuffix, |
| 57 DoesNotMatchOrigin | 57 DoesNotMatchOrigin |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 // If host is empty string and SubdomainSetting is not DisallowSubdomains, t
he entry will match all domains in the specified protocol. | 60 // If host is empty string and SubdomainSetting is not DisallowSubdomains, t
he entry will match all domains in the specified protocol. |
| 61 // IPv6 addresses must include brackets (e.g. '[2001:db8:85a3::8a2e:370:7334
]', not '2001:db8:85a3::8a2e:370:7334'). | 61 // IPv6 addresses must include brackets (e.g. '[2001:db8:85a3::8a2e:370:7334
]', not '2001:db8:85a3::8a2e:370:7334'). |
| 62 OriginAccessEntry(const String& protocol, const String& host, SubdomainSetti
ng); | 62 OriginAccessEntry(const String& protocol, const String& host, SubdomainSetti
ng); |
| 63 |
| 64 // 'matchesOrigin' requires a protocol match (e.g. 'http' != 'https'). 'matc
hesDomain' |
| 65 // relaxes this constraint. |
| 63 MatchResult matchesOrigin(const SecurityOrigin&) const; | 66 MatchResult matchesOrigin(const SecurityOrigin&) const; |
| 67 MatchResult matchesDomain(const SecurityOrigin&) const; |
| 64 | 68 |
| 65 const String& protocol() const { return m_protocol; } | 69 const String& protocol() const { return m_protocol; } |
| 66 const String& host() const { return m_host; } | 70 const String& host() const { return m_host; } |
| 67 SubdomainSetting subdomainSettings() const { return m_subdomainSettings; } | 71 SubdomainSetting subdomainSettings() const { return m_subdomainSettings; } |
| 68 bool hostIsIPAddress() const { return m_hostIsIPAddress; } | 72 bool hostIsIPAddress() const { return m_hostIsIPAddress; } |
| 69 const String& registerable() const { return m_registerableDomain; } | 73 const String& registerable() const { return m_registerableDomain; } |
| 70 | 74 |
| 71 private: | 75 private: |
| 72 String m_protocol; | 76 String m_protocol; |
| 73 String m_host; | 77 String m_host; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 85 } | 89 } |
| 86 | 90 |
| 87 PLATFORM_EXPORT inline bool operator!=(const OriginAccessEntry& a, const OriginA
ccessEntry& b) | 91 PLATFORM_EXPORT inline bool operator!=(const OriginAccessEntry& a, const OriginA
ccessEntry& b) |
| 88 { | 92 { |
| 89 return !(a == b); | 93 return !(a == b); |
| 90 } | 94 } |
| 91 | 95 |
| 92 } // namespace blink | 96 } // namespace blink |
| 93 | 97 |
| 94 #endif // OriginAccessEntry_h | 98 #endif // OriginAccessEntry_h |
| OLD | NEW |