summaryrefslogtreecommitdiffstats
path: root/net/base
diff options
context:
space:
mode:
Diffstat (limited to 'net/base')
-rw-r--r--net/base/net_resources.grd18
-rw-r--r--net/base/net_resources.h4
-rw-r--r--net/base/net_resources.rc20
-rw-r--r--net/base/net_util.cc5
-rw-r--r--net/base/registry_controlled_domain.cc9
5 files changed, 30 insertions, 26 deletions
diff --git a/net/base/net_resources.grd b/net/base/net_resources.grd
new file mode 100644
index 0000000..655b785ca
--- /dev/null
+++ b/net/base/net_resources.grd
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<grit latest_public_release="0" current_release="1">
+ <outputs>
+ <output filename="net_resources.h" type="rc_header">
+ <emit emit_type='prepend'></emit>
+ </output>
+ <output filename="net_resources.rc" type="rc_all" />
+ </outputs>
+ <translations />
+ <release seq="1">
+ <includes>
+ <include name="IDR_DIR_HEADER_HTML" file="dir_header.html" type="BINDATA" />
+
+ <!-- This file is generated by tld_cleanup. -->
+ <include name="IDR_EFFECTIVE_TLD_NAMES" file="effective_tld_names_clean.dat" filenameonly="true" type="BINDATA" />
+ </includes>
+ </release>
+</grit>
diff --git a/net/base/net_resources.h b/net/base/net_resources.h
deleted file mode 100644
index d0b9f8b..0000000
--- a/net/base/net_resources.h
+++ /dev/null
@@ -1,4 +0,0 @@
-// TODO(tc): Come up with a way to automate the generation of these
-// IDs so they don't collide with other rc files.
-#define IDR_DIR_HEADER_HTML 400
-#define IDR_EFFECTIVE_TLD_NAMES 401
diff --git a/net/base/net_resources.rc b/net/base/net_resources.rc
deleted file mode 100644
index a85f4d3..0000000
--- a/net/base/net_resources.rc
+++ /dev/null
@@ -1,20 +0,0 @@
-// Resources used by the net module. This rc file is meant to be included by
-// the application rc file (e.g., app/chrome_dll.rc).
-//
-// Paths in this file are relative to SolutionDir (//trunk/chrome/).
-
-#ifdef APSTUDIO_INVOKED
- #error // Don't open in the Visual Studio resource editor!
-#endif //APSTUDIO_INVOKED
-
-#include "net\\base\\net_resources.h"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// data resources
-//
-
-IDR_DIR_HEADER_HTML BINDATA "net\\base\\dir_header.html"
-
-// The converted file is generated, so we need to use a path relative to "obj".
-IDR_EFFECTIVE_TLD_NAMES BINDATA "net\\effective_tld_names_clean.dat"
diff --git a/net/base/net_util.cc b/net/base/net_util.cc
index 64f4d1d..6b24fe7 100644
--- a/net/base/net_util.cc
+++ b/net/base/net_util.cc
@@ -40,10 +40,13 @@
#include "googleurl/src/url_parse.h"
#include "net/base/escape.h"
#include "net/base/net_module.h"
-#include "net/base/net_resources.h"
#include "net/base/base64.h"
#include "unicode/datefmt.h"
+#if !defined(OS_MACOSX)
+#include "net_resources.h"
+#endif
+
using base::Time;
namespace {
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) {