summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-17 15:30:58 +0000
committerjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-17 15:30:58 +0000
commit882de97f03f969ec62682d534bbe868b83d4aa6f (patch)
tree3abc16760743be2799318b386e2d473caaa30257
parent7781b6ea007566b9cd027b46b7d63b89176e223b (diff)
downloadchromium_src-882de97f03f969ec62682d534bbe868b83d4aa6f.zip
chromium_src-882de97f03f969ec62682d534bbe868b83d4aa6f.tar.gz
chromium_src-882de97f03f969ec62682d534bbe868b83d4aa6f.tar.bz2
Revert 87047 - Revert 86422 - Make DHCP WPAD on by default.
Reason: Turning back on for trunk to collect data as performance worries are addressed. BUG=18575,84047 TEST=Run Chrome on Windows without any flags. Enable auto-detect in proxy configuration. Net log should show attempts to auto-detect via DHCP. Review URL: http://codereview.chromium.org/7167016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89486 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/net/connection_tester.cc4
-rw-r--r--chrome/browser/net/proxy_service_factory.cc4
-rw-r--r--chrome/common/chrome_switches.cc8
-rw-r--r--chrome/common/chrome_switches.h2
-rw-r--r--net/proxy/dhcp_proxy_script_fetcher_factory.cc4
-rw-r--r--net/proxy/dhcp_proxy_script_fetcher_factory.h2
-rw-r--r--net/proxy/dhcp_proxy_script_fetcher_factory_unittest.cc6
7 files changed, 16 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 702b9a9..18206a4 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -202,6 +202,9 @@ const char kDisableConnectBackupJobs[] = "disable-connect-backup-jobs";
// Disables the custom JumpList on Windows 7.
const char kDisableCustomJumpList[] = "disable-custom-jumplist";
+// 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";
@@ -377,11 +380,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 df33000..22dabc3 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -68,6 +68,7 @@ extern const char kDisableBackgroundNetworking[];
extern const char kDisableClientSidePhishingDetection[];
extern const char kDisableConnectBackupJobs[];
extern const char kDisableCustomJumpList[];
+extern const char kDisableDhcpWpad[];
extern const char kDisableExtensionsFileAccessCheck[];
extern const char kDisableExtensions[];
extern const char kDisableFlashSandbox[];
@@ -115,7 +116,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 kEnableExperimentalExtensionApis[];
extern const char kEnableExtensionTimelineApi[];
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 02f1dcd..273f321 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 902a41b..97730bc 100644
--- a/net/proxy/dhcp_proxy_script_fetcher_factory_unittest.cc
+++ b/net/proxy/dhcp_proxy_script_fetcher_factory_unittest.cc
@@ -9,8 +9,10 @@
namespace net {
namespace {
+
TEST(DhcpProxyScriptFetcherFactoryTest, DoNothingWhenDisabled) {
DhcpProxyScriptFetcherFactory factory;
+ factory.set_enabled(false);
scoped_ptr<DhcpProxyScriptFetcher> fetcher(factory.Create(NULL));
EXPECT_EQ("", fetcher->GetFetcherName());
}
@@ -36,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());