diff options
author | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-17 17:55:35 +0000 |
---|---|---|
committer | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-17 17:55:35 +0000 |
commit | 00106e1c05c9dcd01f055f8682e87bc97a09c648 (patch) | |
tree | 9fb08a6a44726056dd75607022dbbf31315cb994 /net/proxy/proxy_service.cc | |
parent | 92c6608cda88cf297275ba4b964b64f3475abbd6 (diff) | |
download | chromium_src-00106e1c05c9dcd01f055f8682e87bc97a09c648.zip chromium_src-00106e1c05c9dcd01f055f8682e87bc97a09c648.tar.gz chromium_src-00106e1c05c9dcd01f055f8682e87bc97a09c648.tar.bz2 |
Revert 85646 - Adds support for the DHCP portion of the WPAD (proxy auto-discovery) protocol.
This is Windows-only for now, and is disabled by default. Start
Chrome with the flag --enable-dhcp-wpad to enable the feature. See
discussion in comment on DhcpProxyScriptFetcherFactory for why this
needs to be done in a per-platform way rather than cross-platform.
The code is factored so that adding other platform implementations
will be straight forward.
Most of the implementation is stand-alone and extends the
ScriptProxyFetcher class hierarchy (and makes its interface slightly
more generic). The integration point into existing code is in
InitProxyResolver, which previously handled fallback from DNS
auto-detect to custom PAC URL and now does fallback from DHCP to DNS
to custom PAC URL.
BUG=18575
TEST=net_unittests has good coverage for the new and changed code, but
manual tests on a network with a PAC URL configured in DHCP are also
needed.
Review URL: http://codereview.chromium.org/6831025
TBR=joi@chromium.org
Review URL: http://codereview.chromium.org/7019015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85648 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/proxy/proxy_service.cc')
-rw-r--r-- | net/proxy/proxy_service.cc | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/net/proxy/proxy_service.cc b/net/proxy/proxy_service.cc index a16cb57..a134133 100644 --- a/net/proxy/proxy_service.cc +++ b/net/proxy/proxy_service.cc @@ -16,7 +16,6 @@ #include "net/base/net_errors.h" #include "net/base/net_log.h" #include "net/base/net_util.h" -#include "net/proxy/dhcp_proxy_script_fetcher.h" #include "net/proxy/init_proxy_resolver.h" #include "net/proxy/multi_threaded_proxy_resolver.h" #include "net/proxy/network_delegate_error_observer.h" @@ -410,13 +409,11 @@ ProxyService* ProxyService::CreateUsingV8ProxyResolver( ProxyConfigService* proxy_config_service, size_t num_pac_threads, ProxyScriptFetcher* proxy_script_fetcher, - DhcpProxyScriptFetcher* dhcp_proxy_script_fetcher, HostResolver* host_resolver, NetLog* net_log, NetworkDelegate* network_delegate) { DCHECK(proxy_config_service); DCHECK(proxy_script_fetcher); - DCHECK(dhcp_proxy_script_fetcher); DCHECK(host_resolver); if (num_pac_threads == 0) @@ -436,9 +433,8 @@ ProxyService* ProxyService::CreateUsingV8ProxyResolver( ProxyService* proxy_service = new ProxyService(proxy_config_service, proxy_resolver, net_log); - // Configure fetchers to use for PAC script downloads and auto-detect. - proxy_service->SetProxyScriptFetchers(proxy_script_fetcher, - dhcp_proxy_script_fetcher); + // Configure PAC script downloads to be issued using |proxy_script_fetcher|. + proxy_service->SetProxyScriptFetcher(proxy_script_fetcher); return proxy_service; } @@ -778,13 +774,11 @@ int ProxyService::DidFinishResolvingProxy(ProxyInfo* result, return result_code; } -void ProxyService::SetProxyScriptFetchers( - ProxyScriptFetcher* proxy_script_fetcher, - DhcpProxyScriptFetcher* dhcp_proxy_script_fetcher) { +void ProxyService::SetProxyScriptFetcher( + ProxyScriptFetcher* proxy_script_fetcher) { DCHECK(CalledOnValidThread()); State previous_state = ResetProxyConfig(false); proxy_script_fetcher_.reset(proxy_script_fetcher); - dhcp_proxy_script_fetcher_.reset(dhcp_proxy_script_fetcher); if (previous_state != STATE_NONE) ApplyProxyConfigIfAvailable(); } @@ -933,9 +927,7 @@ void ProxyService::InitializeUsingLastFetchedConfig() { current_state_ = STATE_WAITING_FOR_INIT_PROXY_RESOLVER; init_proxy_resolver_.reset( - new InitProxyResolver(resolver_.get(), - proxy_script_fetcher_.get(), - dhcp_proxy_script_fetcher_.get(), + new InitProxyResolver(resolver_.get(), proxy_script_fetcher_.get(), net_log_)); // If we changed networks recently, we should delay running proxy auto-config. |