summaryrefslogtreecommitdiffstats
path: root/net/url_request
diff options
context:
space:
mode:
authorericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-19 22:17:53 +0000
committerericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-19 22:17:53 +0000
commit51fff29dc2dae1a8be5ea107d2b13205510c4e46 (patch)
tree56a82f110e5605f9aed8f75b2cf954cc5765ed1a /net/url_request
parent4750a86ea19e14d99a6b5fc94cd18d08ced463da (diff)
downloadchromium_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/url_request')
-rw-r--r--net/url_request/url_request_unittest.cc3
-rw-r--r--net/url_request/url_request_unittest.h3
2 files changed, 2 insertions, 4 deletions
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
index d344319..be26da9 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -29,7 +29,6 @@
#include "net/disk_cache/disk_cache.h"
#include "net/http/http_cache.h"
#include "net/http/http_network_layer.h"
-#include "net/proxy/proxy_resolver_null.h"
#include "net/proxy/proxy_service.h"
#include "net/url_request/url_request.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -42,7 +41,7 @@ namespace {
class URLRequestHttpCacheContext : public URLRequestContext {
public:
URLRequestHttpCacheContext() {
- proxy_service_ = new net::ProxyService(new net::ProxyResolverNull);
+ proxy_service_ = net::ProxyService::CreateNull();
http_transaction_factory_ =
new net::HttpCache(net::HttpNetworkLayer::CreateFactory(proxy_service_),
disk_cache::CreateInMemoryCacheBackend(0));
diff --git a/net/url_request/url_request_unittest.h b/net/url_request/url_request_unittest.h
index 52fa429..a33be39 100644
--- a/net/url_request/url_request_unittest.h
+++ b/net/url_request/url_request_unittest.h
@@ -23,7 +23,6 @@
#include "net/base/net_errors.h"
#include "net/http/http_network_layer.h"
#include "net/url_request/url_request.h"
-#include "net/proxy/proxy_resolver_null.h"
#include "net/proxy/proxy_service.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "googleurl/src/url_util.h"
@@ -35,7 +34,7 @@ const std::string kDefaultHostName("localhost");
class TestURLRequestContext : public URLRequestContext {
public:
TestURLRequestContext() {
- proxy_service_ = new net::ProxyService(new net::ProxyResolverNull);
+ proxy_service_ = net::ProxyService::CreateNull();
http_transaction_factory_ =
net::HttpNetworkLayer::CreateFactory(proxy_service_);
}