Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2056)

Unified Diff: chrome/browser/net/connection_tester.cc

Issue 6831025: Adds support for the DHCP portion of the WPAD (proxy auto-discovery) protocol. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix memory leaks in unit test. Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/net/connection_tester.cc
diff --git a/chrome/browser/net/connection_tester.cc b/chrome/browser/net/connection_tester.cc
index 84d45d9dfcf63b54bbfc0c18ea9c303888ee8805..3aa578e36ee6e8e5779e420979093c0ab7bbef6c 100644
--- a/chrome/browser/net/connection_tester.cc
+++ b/chrome/browser/net/connection_tester.cc
@@ -26,6 +26,7 @@
#include "net/http/http_auth_handler_factory.h"
#include "net/http/http_cache.h"
#include "net/http/http_network_session.h"
+#include "net/proxy/dhcp_proxy_script_fetcher_factory.h"
#include "net/proxy/proxy_config_service_fixed.h"
#include "net/proxy/proxy_script_fetcher_impl.h"
#include "net/proxy/proxy_service.h"
@@ -182,10 +183,17 @@ class ExperimentURLRequestContext : public net::URLRequestContext {
return net::ERR_NOT_IMPLEMENTED;
}
+ net::DhcpProxyScriptFetcherFactory dhcp_factory;
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableDhcpWpad)) {
+ dhcp_factory.set_enabled(true);
+ }
+
proxy_service->reset(net::ProxyService::CreateUsingV8ProxyResolver(
config_service.release(),
0u,
new net::ProxyScriptFetcherImpl(proxy_request_context_),
+ dhcp_factory.Create(proxy_request_context_),
host_resolver(),
NULL,
NULL));
« no previous file with comments | « no previous file | chrome/browser/net/proxy_service_factory.cc » ('j') | net/proxy/dhcp_proxy_script_fetcher_win_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698