summaryrefslogtreecommitdiffstats
path: root/WebCore/page/OriginAccessEntry.h
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/page/OriginAccessEntry.h')
-rw-r--r--WebCore/page/OriginAccessEntry.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/WebCore/page/OriginAccessEntry.h b/WebCore/page/OriginAccessEntry.h
index 767d75f..7c8d556 100644
--- a/WebCore/page/OriginAccessEntry.h
+++ b/WebCore/page/OriginAccessEntry.h
@@ -47,15 +47,28 @@ public:
// 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);
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; }
+
private:
String m_protocol;
String m_host;
SubdomainSetting m_subdomainSettings;
bool m_hostIsIPAddress;
-
};
+inline bool operator==(const OriginAccessEntry& a, const OriginAccessEntry& b)
+{
+ return equalIgnoringCase(a.protocol(), b.protocol()) && equalIgnoringCase(a.host(), b.host()) && a.subdomainSettings() == b.subdomainSettings();
+}
+
+inline bool operator!=(const OriginAccessEntry& a, const OriginAccessEntry& b)
+{
+ return !(a == b);
+}
+
} // namespace WebCore
#endif // CrossOriginAccess_h