| Index: Source/weborigin/OriginAccessEntry.h
|
| diff --git a/Source/weborigin/OriginAccessEntry.h b/Source/weborigin/OriginAccessEntry.h
|
| index eab8a5b6c79cf872bd7762c89987667152dd4da6..d93bbfea4f13bd934a98b61e62fe6f5421a243ab 100644
|
| --- a/Source/weborigin/OriginAccessEntry.h
|
| +++ b/Source/weborigin/OriginAccessEntry.h
|
| @@ -31,40 +31,51 @@
|
| #ifndef OriginAccessEntry_h
|
| #define OriginAccessEntry_h
|
|
|
| +#include "weborigin/WebOriginExport.h"
|
| #include "wtf/text/WTFString.h"
|
|
|
| namespace WebCore {
|
|
|
| class SecurityOrigin;
|
|
|
| -class OriginAccessEntry {
|
| +class WEBORIGIN_EXPORT OriginAccessEntry {
|
| public:
|
| enum SubdomainSetting {
|
| AllowSubdomains,
|
| DisallowSubdomains
|
| };
|
|
|
| + enum IPAddressSetting {
|
| + TreatIPAddressAsDomain,
|
| + TreatIPAddressAsIPAddress
|
| + };
|
| +
|
| // If host is empty string and SubdomainSetting is AllowSubdomains, the entry will match all domains in the specified protocol.
|
| - OriginAccessEntry(const String& protocol, const String& host, SubdomainSetting);
|
| + OriginAccessEntry(const String& protocol, const String& host, SubdomainSetting, IPAddressSetting);
|
| bool matchesOrigin(const SecurityOrigin&) const;
|
|
|
| const String& protocol() const { return m_protocol; }
|
| const String& host() const { return m_host; }
|
| SubdomainSetting subdomainSettings() const { return m_subdomainSettings; }
|
| + IPAddressSetting ipAddressSettings() const { return m_ipAddressSettings; }
|
|
|
| private:
|
| String m_protocol;
|
| String m_host;
|
| SubdomainSetting m_subdomainSettings;
|
| + IPAddressSetting m_ipAddressSettings;
|
| bool m_hostIsIPAddress;
|
| };
|
|
|
| -inline bool operator==(const OriginAccessEntry& a, const OriginAccessEntry& b)
|
| +WEBORIGIN_EXPORT inline bool operator==(const OriginAccessEntry& a, const OriginAccessEntry& b)
|
| {
|
| - return equalIgnoringCase(a.protocol(), b.protocol()) && equalIgnoringCase(a.host(), b.host()) && a.subdomainSettings() == b.subdomainSettings();
|
| + return equalIgnoringCase(a.protocol(), b.protocol())
|
| + && equalIgnoringCase(a.host(), b.host())
|
| + && a.subdomainSettings() == b.subdomainSettings()
|
| + && a.ipAddressSettings() == b.ipAddressSettings();
|
| }
|
|
|
| -inline bool operator!=(const OriginAccessEntry& a, const OriginAccessEntry& b)
|
| +WEBORIGIN_EXPORT inline bool operator!=(const OriginAccessEntry& a, const OriginAccessEntry& b)
|
| {
|
| return !(a == b);
|
| }
|
|
|