diff options
author | ericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-10 04:11:27 +0000 |
---|---|---|
committer | ericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-10 04:11:27 +0000 |
commit | 63de95b265c665320b776c821f4cc44872c65c87 (patch) | |
tree | d60769b5e1907b060870af7d88ed567671a24e4e /net/url_request/url_request_unittest.h | |
parent | bcdae8c9c9d90889fa0ca6491ae191a9e2f944b4 (diff) | |
download | chromium_src-63de95b265c665320b776c821f4cc44872c65c87.zip chromium_src-63de95b265c665320b776c821f4cc44872c65c87.tar.gz chromium_src-63de95b265c665320b776c821f4cc44872c65c87.tar.bz2 |
Misc proxy service changes.
(1) Changed the proxy service ownership model -- rather than being a
detail of the HTTP stack, it is now a dependency owned by
UrlRequestContext.
- ProxyService is owned by UrlRequestContext (before was
HttpNetworkSession)
- ProxyResolver is owned by ProxyService (before was
HttpNetworkSession)
Being able to share the proxy service is needed in several places,
including incognito mode http context (http://crbug.com/3564), and for
proxy resolving in the new FTP stack.
(2) Added an IPC for getting of the ProxyResolverWinHttp dependency in
the plugin process. Not hooked up yet, but intent is to route the
proxy resolve requests through the browser process.
(3) Changed some unit tests which were depending on the system proxy
settings (this was a sideffect of their calling
HttpNetworkLayer::CreateFactory(NULL)).
(4) Moved the first-time ProxyService::UpdateConfig out of the
constructor and into the initial request. Done to avoid startup
perf regressions, since the ProxyService construction is now done
earlier (on the startup critical path).
BUG=3564
Review URL: http://codereview.chromium.org/12938
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6693 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request/url_request_unittest.h')
-rw-r--r-- | net/url_request/url_request_unittest.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/url_request/url_request_unittest.h b/net/url_request/url_request_unittest.h index c0c62a3..786f40a 100644 --- a/net/url_request/url_request_unittest.h +++ b/net/url_request/url_request_unittest.h @@ -20,6 +20,8 @@ #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" @@ -30,11 +32,14 @@ const std::string kDefaultHostName("localhost"); class TestURLRequestContext : public URLRequestContext { public: TestURLRequestContext() { - http_transaction_factory_ = net::HttpNetworkLayer::CreateFactory(NULL); + proxy_service_ = new net::ProxyService(new net::ProxyResolverNull); + http_transaction_factory_ = + net::HttpNetworkLayer::CreateFactory(proxy_service_); } virtual ~TestURLRequestContext() { delete http_transaction_factory_; + delete proxy_service_; } }; |