Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Unified Diff: net/base/registry_controlled_domain.cc

Issue 31004: Have tld_cleanup generate a .cc file that contains the effective (Closed)
Patch Set: Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/base/registry_controlled_domain.h ('k') | net/build/convert_tld_data.rules » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/registry_controlled_domain.cc
diff --git a/net/base/registry_controlled_domain.cc b/net/base/registry_controlled_domain.cc
index f6aa02a6c48c7a19663e245d494c880d61c14636..7ea0a18e79bba9ac390252cd564002a8bbe78a4c 100644
--- a/net/base/registry_controlled_domain.cc
+++ b/net/base/registry_controlled_domain.cc
@@ -47,22 +47,8 @@
#include "net/base/net_module.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
-// resource file is not available. It should be kept exceedingly short to
-// avoid impacting unit test performance.
-static const char kDefaultDomainData[] = "com\n"
- "edu\n"
- "gov\n"
- "net\n"
- "org\n"
- "co.uk\n";
-
// static
std::string RegistryControlledDomainService::GetDomainAndRegistry(
const GURL& gurl) {
@@ -287,14 +273,7 @@ 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
+ ParseDomainData(kDomainData);
}
void RegistryControlledDomainService::ParseDomainData(const StringPiece& data) {
« no previous file with comments | « net/base/registry_controlled_domain.h ('k') | net/build/convert_tld_data.rules » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698