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

Unified Diff: chrome/browser/net/proxy_service_factory.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/proxy_service_factory.cc
diff --git a/chrome/browser/net/proxy_service_factory.cc b/chrome/browser/net/proxy_service_factory.cc
index ba1cb9a7523d7887eba533515fea015b478afe4f..cf9792317a8d1e34cd7bea8309171f9702204f8b 100644
--- a/chrome/browser/net/proxy_service_factory.cc
+++ b/chrome/browser/net/proxy_service_factory.cc
@@ -12,6 +12,7 @@
#include "chrome/common/chrome_switches.h"
#include "content/browser/browser_thread.h"
#include "net/base/net_log.h"
+#include "net/proxy/dhcp_proxy_script_fetcher_factory.h"
#include "net/proxy/proxy_config_service.h"
#include "net/proxy/proxy_script_fetcher_impl.h"
#include "net/proxy/proxy_service.h"
@@ -84,10 +85,16 @@ net::ProxyService* ProxyServiceFactory::CreateProxyService(
net::ProxyService* proxy_service;
if (use_v8) {
+ net::DhcpProxyScriptFetcherFactory dhcp_factory;
+ if (command_line.HasSwitch(switches::kEnableDhcpWpad)) {
+ dhcp_factory.set_enabled(true);
+ }
+
proxy_service = net::ProxyService::CreateUsingV8ProxyResolver(
proxy_config_service,
num_pac_threads,
new net::ProxyScriptFetcherImpl(context),
+ dhcp_factory.Create(context),
context->host_resolver(),
net_log,
context->network_delegate());

Powered by Google App Engine
This is Rietveld 408576698