diff options
Diffstat (limited to 'net/base/registry_controlled_domain.cc')
-rw-r--r-- | net/base/registry_controlled_domain.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/net/base/registry_controlled_domain.cc b/net/base/registry_controlled_domain.cc index be485ac7..f6aa02a 100644 --- a/net/base/registry_controlled_domain.cc +++ b/net/base/registry_controlled_domain.cc @@ -45,9 +45,12 @@ #include "googleurl/src/gurl.h" #include "googleurl/src/url_parse.h" #include "net/base/net_module.h" -#include "net/base/net_resources.h" #include "net/base/net_util.h" +#if !defined(OS_MACOSX) +#include "net_resources.h" +#endif + namespace net { // This list of rules is used by unit tests and any other time that the main @@ -284,10 +287,14 @@ void RegistryControlledDomainService::UseDomainData(const std::string& data) { } void RegistryControlledDomainService::Init() { +#if defined(OS_MACOSX) + ParseDomainData(kDefaultDomainData); +#else // The resource file isn't present for some unit tests, for example. Fall // back to a tiny, basic list of rules in that case. StringPiece res_data = NetModule::GetResource(IDR_EFFECTIVE_TLD_NAMES); ParseDomainData(!res_data.empty() ? res_data : kDefaultDomainData); +#endif } void RegistryControlledDomainService::ParseDomainData(const StringPiece& data) { |