summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-29 11:32:26 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-29 11:32:26 +0000
commit471822cad3c7f41002c28fd9a32243abe1bbb2a2 (patch)
tree68e4dc44d8d31cce4aaf683ef116db7743daa460
parent1aaf6e1ff14d0f627986f26ec68e87a8ea4e98fc (diff)
downloadchromium_src-471822cad3c7f41002c28fd9a32243abe1bbb2a2.zip
chromium_src-471822cad3c7f41002c28fd9a32243abe1bbb2a2.tar.gz
chromium_src-471822cad3c7f41002c28fd9a32243abe1bbb2a2.tar.bz2
Add more unit tests for net/base/host_resolver.
BUG=6661 Review URL: http://codereview.chromium.org/18775 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8872 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--net/base/host_resolver.cc23
-rw-r--r--net/base/host_resolver.h16
-rw-r--r--net/base/host_resolver_unittest.cc112
-rw-r--r--net/base/host_resolver_unittest.h143
-rw-r--r--net/base/run_all_unittests.cc13
-rw-r--r--net/base/scoped_host_mapper.h91
-rw-r--r--net/base/ssl_client_socket_unittest.cc14
-rw-r--r--net/http/http_network_layer_unittest.cc13
-rw-r--r--net/net.xcodeproj/project.pbxproj6
9 files changed, 315 insertions, 116 deletions
diff --git a/net/base/host_resolver.cc b/net/base/host_resolver.cc
index bf5d3c2..d5d97e7 100644
--- a/net/base/host_resolver.cc
+++ b/net/base/host_resolver.cc
@@ -28,6 +28,10 @@ namespace net {
static HostMapper* host_mapper;
+std::string HostMapper::MapUsingPrevious(const std::string& host) {
+ return previous_mapper_.get() ? previous_mapper_->Map(host) : host;
+}
+
HostMapper* SetHostMapper(HostMapper* value) {
std::swap(host_mapper, value);
return value;
@@ -46,11 +50,11 @@ static int HostResolverProc(
return err ? ERR_NAME_NOT_RESOLVED : OK;
}
-static int ResolveAddrInfo(
- const std::string& host, const std::string& port, struct addrinfo** out) {
+static int ResolveAddrInfo(HostMapper* mapper, const std::string& host,
+ const std::string& port, struct addrinfo** out) {
int rv;
- if (host_mapper) {
- rv = HostResolverProc(host_mapper->Map(host), port, out);
+ if (mapper) {
+ rv = HostResolverProc(mapper->Map(host), port, out);
} else {
rv = HostResolverProc(host, port, out);
}
@@ -73,6 +77,7 @@ class HostResolver::Request :
addresses_(addresses),
callback_(callback),
origin_loop_(MessageLoop::current()),
+ host_mapper_(host_mapper),
error_(OK),
results_(NULL) {
}
@@ -84,7 +89,7 @@ class HostResolver::Request :
void DoLookup() {
// Running on the worker thread
- error_ = ResolveAddrInfo(host_, port_, &results_);
+ error_ = ResolveAddrInfo(host_mapper_, host_, port_, &results_);
Task* reply = NewRunnableMethod(this, &Request::DoCallback);
@@ -144,6 +149,12 @@ class HostResolver::Request :
Lock origin_loop_lock_;
MessageLoop* origin_loop_;
+ // Hold an owning reference to the host mapper that we are going to use.
+ // This may not be the current host mapper by the time we call
+ // ResolveAddrInfo, but that's OK... we'll use it anyways, and the owning
+ // reference ensures that it remains valid until we are done.
+ scoped_refptr<HostMapper> host_mapper_;
+
// Assigned on the worker thread, read on the origin thread.
int error_;
struct addrinfo* results_;
@@ -172,7 +183,7 @@ int HostResolver::Resolve(const std::string& hostname, int port,
// Do a synchronous resolution.
if (!callback) {
struct addrinfo* results;
- int rv = ResolveAddrInfo(hostname, port_str, &results);
+ int rv = ResolveAddrInfo(host_mapper, hostname, port_str, &results);
if (rv == OK)
addresses->Adopt(results);
return rv;
diff --git a/net/base/host_resolver.h b/net/base/host_resolver.h
index 1f649f8..bfae53c 100644
--- a/net/base/host_resolver.h
+++ b/net/base/host_resolver.h
@@ -57,10 +57,24 @@ class HostResolver {
// A helper class used in unit tests to alter hostname mappings. See
// SetHostMapper for details.
-class HostMapper {
+class HostMapper : public base::RefCountedThreadSafe<HostMapper> {
public:
virtual ~HostMapper() {}
virtual std::string Map(const std::string& host) = 0;
+
+ protected:
+ // Ask previous host mapper (if set) for mapping of given host.
+ std::string MapUsingPrevious(const std::string& host);
+
+ private:
+ friend class ScopedHostMapper;
+
+ // Set mapper to ask when this mapper doesn't want to modify the result.
+ void set_previous_mapper(HostMapper* mapper) {
+ previous_mapper_ = mapper;
+ }
+
+ scoped_refptr<HostMapper> previous_mapper_;
};
#ifdef UNIT_TEST
diff --git a/net/base/host_resolver_unittest.cc b/net/base/host_resolver_unittest.cc
index 018246d..2d13734 100644
--- a/net/base/host_resolver_unittest.cc
+++ b/net/base/host_resolver_unittest.cc
@@ -11,19 +11,127 @@
#include <netdb.h>
#endif
+#include <string>
+
+#include "base/compiler_specific.h"
+#include "base/message_loop.h"
+#include "base/ref_counted.h"
#include "net/base/address_list.h"
+#include "net/base/completion_callback.h"
+#include "net/base/host_resolver_unittest.h"
+#include "net/base/net_errors.h"
#include "testing/gtest/include/gtest/gtest.h"
+using net::RuleBasedHostMapper;
+using net::ScopedHostMapper;
+using net::WaitingHostMapper;
+
namespace {
-TEST(HostResolverTest, NumericAddresses) {
+class HostResolverTest : public testing::Test {
+ public:
+ HostResolverTest()
+ : callback_called_(false),
+ ALLOW_THIS_IN_INITIALIZER_LIST(
+ callback_(this, &HostResolverTest::OnLookupFinished)) {
+ }
+
+ protected:
+ bool callback_called_;
+ int callback_result_;
+ net::CompletionCallbackImpl<HostResolverTest> callback_;
+
+ private:
+ void OnLookupFinished(int result) {
+ callback_called_ = true;
+ callback_result_ = result;
+ MessageLoop::current()->Quit();
+ }
+};
+
+TEST_F(HostResolverTest, SynchronousLookup) {
+ net::HostResolver host_resolver;
+ net::AddressList adrlist;
+ const int kPortnum = 80;
+
+ scoped_refptr<RuleBasedHostMapper> mapper = new RuleBasedHostMapper();
+ mapper->AddRule("just.testing", "192.168.1.42");
+ ScopedHostMapper scoped_mapper(mapper.get());
+
+ int err = host_resolver.Resolve("just.testing", kPortnum, &adrlist, NULL);
+ EXPECT_EQ(net::OK, err);
+
+ const struct addrinfo* ainfo = adrlist.head();
+ EXPECT_EQ(static_cast<addrinfo*>(NULL), ainfo->ai_next);
+ EXPECT_EQ(sizeof(struct sockaddr_in), ainfo->ai_addrlen);
+
+ const struct sockaddr* sa = ainfo->ai_addr;
+ const struct sockaddr_in* sa_in = (const struct sockaddr_in*) sa;
+ EXPECT_TRUE(htons(kPortnum) == sa_in->sin_port);
+ EXPECT_TRUE(htonl(0xc0a8012a) == sa_in->sin_addr.s_addr);
+}
+
+TEST_F(HostResolverTest, AsynchronousLookup) {
+ net::HostResolver host_resolver;
+ net::AddressList adrlist;
+ const int kPortnum = 80;
+
+ scoped_refptr<RuleBasedHostMapper> mapper = new RuleBasedHostMapper();
+ mapper->AddRule("just.testing", "192.168.1.42");
+ ScopedHostMapper scoped_mapper(mapper.get());
+
+ int err = host_resolver.Resolve("just.testing", kPortnum, &adrlist,
+ &callback_);
+ EXPECT_EQ(net::ERR_IO_PENDING, err);
+
+ MessageLoop::current()->Run();
+
+ ASSERT_TRUE(callback_called_);
+ ASSERT_EQ(net::OK, callback_result_);
+
+ const struct addrinfo* ainfo = adrlist.head();
+ EXPECT_EQ(static_cast<addrinfo*>(NULL), ainfo->ai_next);
+ EXPECT_EQ(sizeof(struct sockaddr_in), ainfo->ai_addrlen);
+
+ const struct sockaddr* sa = ainfo->ai_addr;
+ const struct sockaddr_in* sa_in = (const struct sockaddr_in*) sa;
+ EXPECT_TRUE(htons(kPortnum) == sa_in->sin_port);
+ EXPECT_TRUE(htonl(0xc0a8012a) == sa_in->sin_addr.s_addr);
+}
+
+TEST_F(HostResolverTest, CanceledAsynchronousLookup) {
+ scoped_refptr<WaitingHostMapper> mapper = new WaitingHostMapper();
+ ScopedHostMapper scoped_mapper(mapper.get());
+
+ {
+ net::HostResolver host_resolver;
+ net::AddressList adrlist;
+ const int kPortnum = 80;
+
+ int err = host_resolver.Resolve("just.testing", kPortnum, &adrlist,
+ &callback_);
+ EXPECT_EQ(net::ERR_IO_PENDING, err);
+
+ // Make sure we will exit the queue even when callback is not called.
+ MessageLoop::current()->PostDelayedTask(FROM_HERE,
+ new MessageLoop::QuitTask(),
+ 1000);
+ MessageLoop::current()->Run();
+ }
+
+ mapper->Signal();
+
+ EXPECT_FALSE(callback_called_);
+}
+
+TEST_F(HostResolverTest, NumericAddresses) {
// Stevens says dotted quads with AI_UNSPEC resolve to a single sockaddr_in.
net::HostResolver host_resolver;
net::AddressList adrlist;
const int kPortnum = 5555;
int err = host_resolver.Resolve("127.0.0.1", kPortnum, &adrlist, NULL);
- EXPECT_EQ(0, err);
+ EXPECT_EQ(net::OK, err);
const struct addrinfo* ainfo = adrlist.head();
EXPECT_EQ(static_cast<addrinfo*>(NULL), ainfo->ai_next);
diff --git a/net/base/host_resolver_unittest.h b/net/base/host_resolver_unittest.h
new file mode 100644
index 0000000..5531bd0
--- /dev/null
+++ b/net/base/host_resolver_unittest.h
@@ -0,0 +1,143 @@
+// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef NET_BASE_HOST_RESOLVER_UNITTEST_H_
+#define NET_BASE_HOST_RESOLVER_UNITTEST_H_
+
+#ifdef UNIT_TEST
+
+#include <list>
+
+#include "base/string_util.h"
+#include "base/platform_thread.h"
+#include "base/ref_counted.h"
+#include "base/waitable_event.h"
+#include "net/base/host_resolver.h"
+#include "net/base/net_errors.h"
+
+namespace net {
+
+// In most cases, it is important that unit tests avoid making actual DNS
+// queries since the resulting tests can be flaky, especially if the network is
+// unreliable for some reason. To simplify writing tests that avoid making
+// actual DNS queries, the following helper class may be used:
+//
+// scoped_refptr<RuleBasedHostMapper> host_mapper = new RuleBasedHostMapper();
+// host_mapper->AddRule("foo.com", "1.2.3.4");
+// host_mapper->AddRule("bar.com", "2.3.4.5");
+//
+// Don't forget to actually set your mapper, probably with ScopedHostMapper!
+//
+// The above rules define a static mapping from hostnames to IP address
+// literals. The first parameter to AddRule specifies a host pattern to match
+// against, and the second parameter indicates what value should be used to
+// replace the given hostname. So, the following is also supported:
+//
+// host_mapper->AddRule("*.com", "127.0.0.1");
+//
+// Replacement doesn't have to be string representing an IP address. It can
+// re-map one hostname to another as well.
+class RuleBasedHostMapper : public HostMapper {
+ public:
+ // Any hostname matching the given pattern will be replaced with the given
+ // replacement value. Usually, replacement should be an IP address literal.
+ void AddRule(const char* host_pattern, const char* replacement) {
+ rules_.push_back(Rule(host_pattern, replacement));
+ }
+
+ void AddRuleWithLatency(const char* host_pattern, const char* replacement,
+ int latency) {
+ rules_.push_back(Rule(host_pattern, replacement, latency));
+ }
+
+ private:
+ std::string Map(const std::string& host) {
+ RuleList::iterator r;
+ for (r = rules_.begin(); r != rules_.end(); ++r) {
+ if (MatchPattern(host, r->host_pattern)) {
+ if (r->latency != 0) {
+ PlatformThread::Sleep(r->latency);
+ r->latency = 1; // Simulate cache warmup.
+ }
+ return r->replacement;
+ }
+ }
+ return MapUsingPrevious(host);
+ }
+
+ struct Rule {
+ std::string host_pattern;
+ std::string replacement;
+ int latency; // in milliseconds
+ Rule(const char* h, const char* r)
+ : host_pattern(h),
+ replacement(r),
+ latency(0) {}
+ Rule(const char* h, const char* r, const int l)
+ : host_pattern(h),
+ replacement(r),
+ latency(l) {}
+ };
+ typedef std::list<Rule> RuleList;
+
+ RuleList rules_;
+};
+
+// Using WaitingHostMapper you can simulate very long lookups, for example
+// to test code which cancels a request. Example usage:
+//
+// scoped_refptr<WaitingHostMapper> mapper = new WaitingHostMapper();
+// ScopedHostMapper scoped_mapper(mapper.get());
+//
+// (start the lookup asynchronously)
+// (cancel the lookup)
+//
+// mapper->Signal();
+class WaitingHostMapper : public HostMapper {
+ public:
+ WaitingHostMapper() : event_(false, false) {
+ }
+
+ void Signal() {
+ event_.Signal();
+ }
+
+ private:
+ std::string Map(const std::string& host) {
+ event_.Wait();
+ return MapUsingPrevious(host);
+ }
+
+ base::WaitableEvent event_;
+};
+
+// This class sets the HostMapper for a particular scope. If there are multiple
+// ScopedHostMappers in existence, then the last one allocated will be used.
+// However, if it does not provide a matching rule, then it should delegate
+// to the previously set HostMapper (see SetHostMapper). This is true for all
+// mappers defined in this file. If no HostMapper matches a given hostname, then
+// the hostname will be unmodified.
+class ScopedHostMapper {
+ public:
+ ScopedHostMapper(HostMapper* mapper) : current_host_mapper_(mapper) {
+ previous_host_mapper_ = SetHostMapper(current_host_mapper_.get());
+ current_host_mapper_->set_previous_mapper(previous_host_mapper_.get());
+ }
+
+ ~ScopedHostMapper() {
+ HostMapper* old_mapper = SetHostMapper(previous_host_mapper_.get());
+ // The lifetimes of multiple instances must be nested.
+ CHECK(old_mapper == current_host_mapper_.get());
+ }
+
+ private:
+ scoped_refptr<HostMapper> current_host_mapper_;
+ scoped_refptr<HostMapper> previous_host_mapper_;
+};
+
+} // namespace net
+
+#endif // UNIT_TEST
+
+#endif // NET_BASE_HOST_RESOLVER_UNITTEST_H_
diff --git a/net/base/run_all_unittests.cc b/net/base/run_all_unittests.cc
index 71dada9..15741e4 100644
--- a/net/base/run_all_unittests.cc
+++ b/net/base/run_all_unittests.cc
@@ -28,16 +28,20 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "base/message_loop.h"
+#include "base/ref_counted.h"
#include "base/test_suite.h"
-#include "net/base/scoped_host_mapper.h"
+#include "net/base/host_resolver_unittest.h"
class NetTestSuite : public TestSuite {
public:
- NetTestSuite(int argc, char** argv) : TestSuite(argc, argv) {
+ NetTestSuite(int argc, char** argv)
+ : TestSuite(argc, argv),
+ host_mapper_(new net::RuleBasedHostMapper()),
+ scoped_host_mapper_(host_mapper_.get()) {
// In case any attempts are made to resolve host names, force them all to
// be mapped to localhost. This prevents DNS queries from being sent in
// the process of running these unit tests.
- host_mapper_.AddRule("*", "127.0.0.1");
+ host_mapper_->AddRule("*", "127.0.0.1");
}
virtual void Initialize() {
@@ -56,7 +60,8 @@ class NetTestSuite : public TestSuite {
private:
scoped_ptr<MessageLoop> message_loop_;
- net::ScopedHostMapper host_mapper_;
+ scoped_refptr<net::RuleBasedHostMapper> host_mapper_;
+ net::ScopedHostMapper scoped_host_mapper_;
};
int main(int argc, char** argv) {
diff --git a/net/base/scoped_host_mapper.h b/net/base/scoped_host_mapper.h
deleted file mode 100644
index 836cb34..0000000
--- a/net/base/scoped_host_mapper.h
+++ /dev/null
@@ -1,91 +0,0 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This file defines ScopedHostMapper, which is a helper class for writing
-// tests that use HostResolver either directly or indirectly.
-//
-// In most cases, it is important that unit tests avoid making actual DNS
-// queries since the resulting tests can be flaky, especially if the network is
-// unreliable for some reason. To simplify writing tests that avoid making
-// actual DNS queries, the following helper class may be used:
-//
-// ScopedHostMapper scoped_host_mapper;
-// scoped_host_mapper.AddRule("foo.com", "1.2.3.4");
-// scoped_host_mapper.AddRule("bar.com", "2.3.4.5");
-// ...
-//
-// The above rules define a static mapping from hostnames to IP address
-// literals. The first parameter to AddRule specifies a host pattern to match
-// against, and the second parameter indicates what value should be used to
-// replace the given hostname. So, the following is also supported:
-//
-// scoped_host_mapper.AddRule("*.com", "127.0.0.1");
-//
-// If there are multiple ScopedHostMappers in existence, then the last one
-// allocated will be used. However, if it does not provide a matching rule,
-// then it will delegate to the previously set HostMapper (see SetHostMapper).
-// Finally, if no HostMapper matches a given hostname, then the hostname will
-// be unmodified.
-//
-// IMPORTANT: ScopedHostMapper is only designed to be used on a single thread,
-// and it is a requirement that the lifetimes of multiple instances be nested.
-
-#ifndef NET_BASE_SCOPED_HOST_MAPPER_H_
-#define NET_BASE_SCOPED_HOST_MAPPER_H_
-
-#ifdef UNIT_TEST
-
-#include <list>
-
-#include "base/string_util.h"
-#include "net/base/host_resolver.h"
-#include "net/base/net_errors.h"
-
-namespace net {
-
-// This class sets the HostMapper for a particular scope.
-class ScopedHostMapper : public HostMapper {
- public:
- ScopedHostMapper() {
- previous_host_mapper_ = SetHostMapper(this);
- }
-
- ~ScopedHostMapper() {
- HostMapper* old_mapper = SetHostMapper(previous_host_mapper_);
- // The lifetimes of multiple instances must be nested.
- CHECK(old_mapper == this);
- }
-
- // Any hostname matching the given pattern will be replaced with the given
- // replacement value. Usually, replacement should be an IP address literal.
- void AddRule(const char* host_pattern, const char* replacement) {
- rules_.push_back(Rule(host_pattern, replacement));
- }
-
- private:
- std::string Map(const std::string& host) {
- RuleList::const_iterator r;
- for (r = rules_.begin(); r != rules_.end(); ++r) {
- if (MatchPattern(host, r->host_pattern))
- return r->replacement;
- }
- return previous_host_mapper_ ? previous_host_mapper_->Map(host) : host;
- }
-
- struct Rule {
- std::string host_pattern;
- std::string replacement;
- Rule(const char* h, const char* r) : host_pattern(h), replacement(r) {}
- };
- typedef std::list<Rule> RuleList;
-
- HostMapper* previous_host_mapper_;
- RuleList rules_;
-};
-
-} // namespace net
-
-#endif // UNIT_TEST
-
-#endif // NET_BASE_SCOPED_HOST_MAPPER_H_
diff --git a/net/base/ssl_client_socket_unittest.cc b/net/base/ssl_client_socket_unittest.cc
index cd7a1ed..faf5a4a 100644
--- a/net/base/ssl_client_socket_unittest.cc
+++ b/net/base/ssl_client_socket_unittest.cc
@@ -2,11 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/ref_counted.h"
#include "net/base/address_list.h"
#include "net/base/client_socket_factory.h"
#include "net/base/host_resolver.h"
+#include "net/base/host_resolver_unittest.h"
#include "net/base/net_errors.h"
-#include "net/base/scoped_host_mapper.h"
#include "net/base/ssl_client_socket.h"
#include "net/base/ssl_config_service.h"
#include "net/base/tcp_client_socket.h"
@@ -21,14 +22,17 @@ const net::SSLConfig kDefaultSSLConfig;
class SSLClientSocketTest : public PlatformTest {
public:
SSLClientSocketTest()
- : socket_factory_(net::ClientSocketFactory::GetDefaultFactory()) {
+ : host_mapper_(new net::RuleBasedHostMapper()),
+ scoped_host_mapper_(host_mapper_.get()),
+ socket_factory_(net::ClientSocketFactory::GetDefaultFactory()) {
// TODO(darin): kill this exception once we have a way to test out the
// TCPClientSocket class using loopback connections.
- host_mapper_.AddRule("bugs.webkit.org", "bugs.webkit.org");
+ host_mapper_->AddRule("bugs.webkit.org", "bugs.webkit.org");
}
-
+
protected:
- net::ScopedHostMapper host_mapper_;
+ scoped_refptr<net::RuleBasedHostMapper> host_mapper_;
+ net::ScopedHostMapper scoped_host_mapper_;
net::ClientSocketFactory* socket_factory_;
};
diff --git a/net/http/http_network_layer_unittest.cc b/net/http/http_network_layer_unittest.cc
index aae4ed5..eae1815 100644
--- a/net/http/http_network_layer_unittest.cc
+++ b/net/http/http_network_layer_unittest.cc
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/base/scoped_host_mapper.h"
+#include "base/ref_counted.h"
+#include "net/base/host_resolver_unittest.h"
#include "net/http/http_network_layer.h"
#include "net/http/http_transaction_unittest.h"
#include "net/proxy/proxy_service.h"
@@ -11,13 +12,17 @@
class HttpNetworkLayerTest : public PlatformTest {
public:
- HttpNetworkLayerTest() {
+ HttpNetworkLayerTest()
+ : host_mapper_(new net::RuleBasedHostMapper()),
+ scoped_host_mapper_(host_mapper_.get()) {
// TODO(darin): kill this exception once we have a way to test out the
// HttpNetworkLayer class using loopback connections.
- host_mapper_.AddRule("www.google.com", "www.google.com");
+ host_mapper_->AddRule("www.google.com", "www.google.com");
}
+
private:
- net::ScopedHostMapper host_mapper_;
+ scoped_refptr<net::RuleBasedHostMapper> host_mapper_;
+ net::ScopedHostMapper scoped_host_mapper_;
};
TEST_F(HttpNetworkLayerTest, CreateAndDestroy) {
diff --git a/net/net.xcodeproj/project.pbxproj b/net/net.xcodeproj/project.pbxproj
index e37f380..e0bce49 100644
--- a/net/net.xcodeproj/project.pbxproj
+++ b/net/net.xcodeproj/project.pbxproj
@@ -444,6 +444,8 @@
533102E60E5E3EBF00FF8E32 /* net_util_posix.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = net_util_posix.cc; sourceTree = "<group>"; };
7B2630600E82F282001CE27F /* libevent.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = libevent.xcodeproj; path = third_party/libevent/libevent.xcodeproj; sourceTree = "<group>"; };
7B82FF450E763620008F45CF /* host_resolver_unittest.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = host_resolver_unittest.cc; sourceTree = "<group>"; };
+ 7BA3615D0E8C35A50023C8B9 /* host_resolver_unittest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = host_resolver_unittest.h; sourceTree = "<group>"; };
+ 7BA3615E0E8C35A50023C8B9 /* sdch_filter.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sdch_filter.cc; sourceTree = "<group>"; };
7B8501F10E5A372500730B43 /* googleurl.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = googleurl.xcodeproj; path = build/googleurl.xcodeproj; sourceTree = "<group>"; };
7B8502620E5A38BB00730B43 /* modp_b64.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = modp_b64.xcodeproj; path = third_party/modp_b64/modp_b64.xcodeproj; sourceTree = "<group>"; };
7BA015570E5A1C3E00044150 /* icu.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = icu.xcodeproj; path = third_party/icu38/icu.xcodeproj; sourceTree = "<group>"; };
@@ -452,8 +454,6 @@
7BA016930E5A1E8700044150 /* zlib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = zlib.xcodeproj; path = third_party/zlib/zlib.xcodeproj; sourceTree = "<group>"; };
7BA357A60E8990260023C8B9 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = "<group>"; };
7BA361440E8C341F0023C8B9 /* test_completion_callback_unittest.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_completion_callback_unittest.cc; sourceTree = "<group>"; };
- 7BA3615D0E8C35A50023C8B9 /* scoped_host_mapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = scoped_host_mapper.h; sourceTree = "<group>"; };
- 7BA3615E0E8C35A50023C8B9 /* sdch_filter.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sdch_filter.cc; sourceTree = "<group>"; };
7BA3615F0E8C35A50023C8B9 /* sdch_filter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sdch_filter.h; sourceTree = "<group>"; };
7BA361600E8C35A50023C8B9 /* sdch_filter_unittest.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sdch_filter_unittest.cc; sourceTree = "<group>"; };
7BA361EB0E8C38C60023C8B9 /* http_version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = http_version.h; sourceTree = "<group>"; };
@@ -939,6 +939,7 @@
7BED32B50E5A181C00A747DB /* host_resolver.cc */,
7BED32B40E5A181C00A747DB /* host_resolver.h */,
7B82FF450E763620008F45CF /* host_resolver_unittest.cc */,
+ 7BA3615D0E8C35A50023C8B9 /* host_resolver_unittest.h */,
7BED32B30E5A181C00A747DB /* listen_socket.cc */,
7BED32B20E5A181C00A747DB /* listen_socket.h */,
7BED32B10E5A181C00A747DB /* listen_socket_unittest.cc */,
@@ -967,7 +968,6 @@
7BED329A0E5A181C00A747DB /* registry_controlled_domain.h */,
7BED32990E5A181C00A747DB /* registry_controlled_domain_unittest.cc */,
E4AFA6420E5241B400201347 /* run_all_unittests.cc */,
- 7BA3615D0E8C35A50023C8B9 /* scoped_host_mapper.h */,
7BA3615E0E8C35A50023C8B9 /* sdch_filter.cc */,
7BA3615F0E8C35A50023C8B9 /* sdch_filter.h */,
7BA361600E8C35A50023C8B9 /* sdch_filter_unittest.cc */,