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/http/http_network_layer.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/http/http_network_layer.h')
-rw-r--r-- | net/http/http_network_layer.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/http/http_network_layer.h b/net/http/http_network_layer.h index 93e7eb4..5364642 100644 --- a/net/http/http_network_layer.h +++ b/net/http/http_network_layer.h @@ -13,16 +13,17 @@ namespace net { class HttpNetworkSession; class ProxyInfo; -class ProxyResolver; +class ProxyService; class HttpNetworkLayer : public HttpTransactionFactory { public: - explicit HttpNetworkLayer(const ProxyInfo* pi); + // |proxy_service| must remain valid for the lifetime of HttpNetworkLayer. + explicit HttpNetworkLayer(ProxyService* proxy_service); ~HttpNetworkLayer(); // This function hides the details of how a network layer gets instantiated // and allows other implementations to be substituted. - static HttpTransactionFactory* CreateFactory(const ProxyInfo* pi); + static HttpTransactionFactory* CreateFactory(ProxyService* proxy_service); #if defined(OS_WIN) // If value is true, then WinHTTP will be used. @@ -39,9 +40,8 @@ class HttpNetworkLayer : public HttpTransactionFactory { static bool use_winhttp_; #endif - // The pending proxy resolver to use when lazily creating session_. - // NULL afterwards. - scoped_ptr<ProxyResolver> proxy_resolver_; + // The proxy service being used for the session. + ProxyService* proxy_service_; scoped_refptr<HttpNetworkSession> session_; bool suspended_; |