| Index: third_party/WebKit/Source/platform/weborigin/OriginAccessEntry.cpp
|
| diff --git a/third_party/WebKit/Source/platform/weborigin/OriginAccessEntry.cpp b/third_party/WebKit/Source/platform/weborigin/OriginAccessEntry.cpp
|
| index cdd2e6b828115467516339d3e7819e4f66d5c5f5..fc694fd1d178e2aab88ddaac16224ff444e5218c 100644
|
| --- a/third_party/WebKit/Source/platform/weborigin/OriginAccessEntry.cpp
|
| +++ b/third_party/WebKit/Source/platform/weborigin/OriginAccessEntry.cpp
|
| @@ -30,10 +30,9 @@
|
|
|
| #include "platform/weborigin/OriginAccessEntry.h"
|
|
|
| +#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
|
| #include "platform/weborigin/KURL.h"
|
| #include "platform/weborigin/SecurityOrigin.h"
|
| -#include "public/platform/Platform.h"
|
| -#include "public/platform/WebPublicSuffixList.h"
|
| #include "url/third_party/mozilla/url_parse.h"
|
| #include "url/url_canon.h"
|
|
|
| @@ -88,11 +87,14 @@ OriginAccessEntry::OriginAccessEntry(const String& protocol, const String& host,
|
|
|
| // Look for top-level domains, either with or without an additional dot.
|
| if (!m_hostIsIPAddress) {
|
| - WebPublicSuffixList* suffixList = Platform::current()->publicSuffixList();
|
| - if (!suffixList)
|
| - return;
|
| + std::string hostString(reinterpret_cast<const char*>(m_host.characters8()), m_host.length());
|
| + size_t publicSuffixLength = net::registry_controlled_domains::GetRegistryLength(
|
| + hostString,
|
| + net::registry_controlled_domains::INCLUDE_UNKNOWN_REGISTRIES,
|
| + net::registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES);
|
| + if (!publicSuffixLength)
|
| + publicSuffixLength = m_host.length();
|
|
|
| - size_t publicSuffixLength = suffixList->getPublicSuffixLength(m_host);
|
| if (m_host.length() <= publicSuffixLength + 1) {
|
| m_hostIsPublicSuffix = true;
|
| } else if (subdomainSetting == AllowRegisterableDomains && publicSuffixLength) {
|
|
|