diff options
-rw-r--r-- | chrome/browser/net/connection_tester.cc | 4 | ||||
-rw-r--r-- | chrome/browser/net/proxy_service_factory.cc | 4 | ||||
-rw-r--r-- | chrome/common/chrome_switches.cc | 8 | ||||
-rw-r--r-- | chrome/common/chrome_switches.h | 2 | ||||
-rw-r--r-- | net/proxy/dhcp_proxy_script_fetcher_factory.cc | 4 | ||||
-rw-r--r-- | net/proxy/dhcp_proxy_script_fetcher_factory.h | 2 | ||||
-rw-r--r-- | net/proxy/dhcp_proxy_script_fetcher_factory_unittest.cc | 5 |
7 files changed, 15 insertions, 14 deletions
diff --git a/chrome/browser/net/connection_tester.cc b/chrome/browser/net/connection_tester.cc index 2cf1e42..4ca5b42 100644 --- a/chrome/browser/net/connection_tester.cc +++ b/chrome/browser/net/connection_tester.cc @@ -187,8 +187,8 @@ class ExperimentURLRequestContext : public net::URLRequestContext { net::DhcpProxyScriptFetcherFactory dhcp_factory; if (CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableDhcpWpad)) { - dhcp_factory.set_enabled(true); + switches::kDisableDhcpWpad)) { + dhcp_factory.set_enabled(false); } proxy_service->reset(net::ProxyService::CreateUsingV8ProxyResolver( diff --git a/chrome/browser/net/proxy_service_factory.cc b/chrome/browser/net/proxy_service_factory.cc index cf97923..898596eb 100644 --- a/chrome/browser/net/proxy_service_factory.cc +++ b/chrome/browser/net/proxy_service_factory.cc @@ -86,8 +86,8 @@ 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); + if (command_line.HasSwitch(switches::kDisableDhcpWpad)) { + dhcp_factory.set_enabled(false); } proxy_service = net::ProxyService::CreateUsingV8ProxyResolver( diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index d8ff05d..ecfd141 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -214,6 +214,9 @@ const char kDisableCustomJumpList[] = "disable-custom-jumplist"; // Browser flag to disable the web inspector for all renderers. const char kDisableDevTools[] = "disable-dev-tools"; +// Disables retrieval of PAC URLs from DHCP as per the WPAD standard. +const char kDisableDhcpWpad[] = "disable-dhcp-wpad"; + // Disable extensions. const char kDisableExtensions[] = "disable-extensions"; @@ -410,11 +413,6 @@ const char kEnableConnectBackupJobs[] = "enable-connect-backup-jobs"; // Enables web developers to create apps for Chrome without using crx packages. const char kEnableCrxlessWebApps[] = "enable-crxless-web-apps"; -// Enables retrieval of PAC URLs from DHCP as per the WPAD standard. Note -// that this feature is not supported on all platforms, and using the flag -// is a no-op on such platforms. -const char kEnableDhcpWpad[] = "enable-dhcp-wpad"; - // Enable DNS side checking of certificates. Still experimental, should only // be used by developers at the current time. const char kEnableDNSCertProvenanceChecking[] = diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index 52b3055..b673e36 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -72,6 +72,7 @@ extern const char kDisableClientSidePhishingDetection[]; extern const char kDisableConnectBackupJobs[]; extern const char kDisableCustomJumpList[]; extern const char kDisableDevTools[]; +extern const char kDisableDhcpWpad[]; extern const char kDisableExtensionsFileAccessCheck[]; extern const char kDisableExtensions[]; extern const char kDisableFlashSandbox[]; @@ -124,7 +125,6 @@ extern const char kEnableCompactNavigation[]; extern const char kEnableCompositeToTexture[]; extern const char kEnableConnectBackupJobs[]; extern const char kEnableCrxlessWebApps[]; -extern const char kEnableDhcpWpad[]; extern const char kEnableDNSCertProvenanceChecking[]; extern const char kEnableDNSSECCerts[]; extern const char kEnableExperimentalAppManifests[]; diff --git a/net/proxy/dhcp_proxy_script_fetcher_factory.cc b/net/proxy/dhcp_proxy_script_fetcher_factory.cc index faedf86..01ede05 100644 --- a/net/proxy/dhcp_proxy_script_fetcher_factory.cc +++ b/net/proxy/dhcp_proxy_script_fetcher_factory.cc @@ -15,9 +15,7 @@ namespace net { DhcpProxyScriptFetcherFactory::DhcpProxyScriptFetcherFactory() : feature_enabled_(false) { - // TODO(joi): Change this default, and the comment on |set_enabled()|, - // when the time is right. - set_enabled(false); + set_enabled(true); } DhcpProxyScriptFetcher* DhcpProxyScriptFetcherFactory::Create( diff --git a/net/proxy/dhcp_proxy_script_fetcher_factory.h b/net/proxy/dhcp_proxy_script_fetcher_factory.h index 4bb2446..57e0172 100644 --- a/net/proxy/dhcp_proxy_script_fetcher_factory.h +++ b/net/proxy/dhcp_proxy_script_fetcher_factory.h @@ -47,7 +47,7 @@ class NET_API DhcpProxyScriptFetcherFactory { // Attempts to enable/disable the DHCP WPAD feature. Does nothing // if |IsSupported()| returns false. // - // The current default is |enabled() == false|. + // The default is |enabled() == true|. void set_enabled(bool enabled); // Returns true if the DHCP WPAD feature is enabled. Always returns diff --git a/net/proxy/dhcp_proxy_script_fetcher_factory_unittest.cc b/net/proxy/dhcp_proxy_script_fetcher_factory_unittest.cc index a9ed9c3..e28cc19 100644 --- a/net/proxy/dhcp_proxy_script_fetcher_factory_unittest.cc +++ b/net/proxy/dhcp_proxy_script_fetcher_factory_unittest.cc @@ -12,6 +12,7 @@ namespace { TEST(DhcpProxyScriptFetcherFactoryTest, DoNothingWhenDisabled) { DhcpProxyScriptFetcherFactory factory; + factory.set_enabled(false); scoped_ptr<DhcpProxyScriptFetcher> fetcher(factory.Create(NULL)); EXPECT_EQ("", fetcher->GetFetcherName()); } @@ -37,7 +38,11 @@ TEST(DhcpProxyScriptFetcherFactoryTest, IsSupported) { TEST(DhcpProxyScriptFetcherFactoryTest, SetEnabled) { DhcpProxyScriptFetcherFactory factory; +#if defined(OS_WIN) + EXPECT_TRUE(factory.enabled()); +#else EXPECT_FALSE(factory.enabled()); +#endif // defined(OS_WIN) factory.set_enabled(false); EXPECT_FALSE(factory.enabled()); |