diff options
author | ericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-19 22:17:53 +0000 |
---|---|---|
committer | ericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-19 22:17:53 +0000 |
commit | 51fff29dc2dae1a8be5ea107d2b13205510c4e46 (patch) | |
tree | 56a82f110e5605f9aed8f75b2cf954cc5765ed1a /net/http/http_network_layer_unittest.cc | |
parent | 4750a86ea19e14d99a6b5fc94cd18d08ced463da (diff) | |
download | chromium_src-51fff29dc2dae1a8be5ea107d2b13205510c4e46.zip chromium_src-51fff29dc2dae1a8be5ea107d2b13205510c4e46.tar.gz chromium_src-51fff29dc2dae1a8be5ea107d2b13205510c4e46.tar.bz2 |
Split ProxyResolver into two interfaces: A. interface for retrieving the system proxy settings (ProxyConfigService) B. interface for resolving the proxy (ProxyResolver)The motivation behind this change is: 1. Simplify sharing the WinHTTP code that fetches IE settings, with the V8 proxy resolver (avoids having platform-specific code in ProxyResolverV8). 2. Restrict objects to one thread. (ProxyService calls the config getter on IO thread, and the proxy resolving on the PAC thread).(ProxyResolver is now only 1 method, but this will grow shortly).
Review URL: http://codereview.chromium.org/15070
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7323 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_network_layer_unittest.cc')
-rw-r--r-- | net/http/http_network_layer_unittest.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/net/http/http_network_layer_unittest.cc b/net/http/http_network_layer_unittest.cc index 0460947..aae4ed5 100644 --- a/net/http/http_network_layer_unittest.cc +++ b/net/http/http_network_layer_unittest.cc @@ -5,7 +5,6 @@ #include "net/base/scoped_host_mapper.h" #include "net/http/http_network_layer.h" #include "net/http/http_transaction_unittest.h" -#include "net/proxy/proxy_resolver_null.h" #include "net/proxy/proxy_service.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/platform_test.h" @@ -22,15 +21,15 @@ class HttpNetworkLayerTest : public PlatformTest { }; TEST_F(HttpNetworkLayerTest, CreateAndDestroy) { - net::ProxyService proxy_service(new net::ProxyResolverNull); - net::HttpNetworkLayer factory(&proxy_service); + scoped_ptr<net::ProxyService> proxy_service(net::ProxyService::CreateNull()); + net::HttpNetworkLayer factory(proxy_service.get()); scoped_ptr<net::HttpTransaction> trans(factory.CreateTransaction()); } TEST_F(HttpNetworkLayerTest, Suspend) { - net::ProxyService proxy_service(new net::ProxyResolverNull); - net::HttpNetworkLayer factory(&proxy_service); + scoped_ptr<net::ProxyService> proxy_service(net::ProxyService::CreateNull()); + net::HttpNetworkLayer factory(proxy_service.get()); scoped_ptr<net::HttpTransaction> trans(factory.CreateTransaction()); trans.reset(); @@ -46,8 +45,8 @@ TEST_F(HttpNetworkLayerTest, Suspend) { } TEST_F(HttpNetworkLayerTest, GoogleGET) { - net::ProxyService proxy_service(new net::ProxyResolverNull); - net::HttpNetworkLayer factory(&proxy_service); + scoped_ptr<net::ProxyService> proxy_service(net::ProxyService::CreateNull()); + net::HttpNetworkLayer factory(proxy_service.get()); TestCompletionCallback callback; |