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

Side by Side Diff: chrome/browser/net/proxy_service_factory.cc

Issue 7204024: Revert 89629 - Revert 89486 - Revert 87047 - Revert 86422 - Make DHCP WPAD on by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/net/connection_tester.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/net/proxy_service_factory.h" 5 #include "chrome/browser/net/proxy_service_factory.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/string_number_conversions.h" 8 #include "base/string_number_conversions.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/net/pref_proxy_config_service.h" 10 #include "chrome/browser/net/pref_proxy_config_service.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 if (base::StringToInt(s, &n) && n > 0) { 79 if (base::StringToInt(s, &n) && n > 0) {
80 num_pac_threads = static_cast<size_t>(n); 80 num_pac_threads = static_cast<size_t>(n);
81 } else { 81 } else {
82 LOG(ERROR) << "Invalid switch for number of PAC threads: " << s; 82 LOG(ERROR) << "Invalid switch for number of PAC threads: " << s;
83 } 83 }
84 } 84 }
85 85
86 net::ProxyService* proxy_service; 86 net::ProxyService* proxy_service;
87 if (use_v8) { 87 if (use_v8) {
88 net::DhcpProxyScriptFetcherFactory dhcp_factory; 88 net::DhcpProxyScriptFetcherFactory dhcp_factory;
89 if (command_line.HasSwitch(switches::kEnableDhcpWpad)) { 89 if (command_line.HasSwitch(switches::kDisableDhcpWpad)) {
90 dhcp_factory.set_enabled(true); 90 dhcp_factory.set_enabled(false);
91 } 91 }
92 92
93 proxy_service = net::ProxyService::CreateUsingV8ProxyResolver( 93 proxy_service = net::ProxyService::CreateUsingV8ProxyResolver(
94 proxy_config_service, 94 proxy_config_service,
95 num_pac_threads, 95 num_pac_threads,
96 new net::ProxyScriptFetcherImpl(context), 96 new net::ProxyScriptFetcherImpl(context),
97 dhcp_factory.Create(context), 97 dhcp_factory.Create(context),
98 context->host_resolver(), 98 context->host_resolver(),
99 net_log, 99 net_log,
100 context->network_delegate()); 100 context->network_delegate());
101 } else { 101 } else {
102 proxy_service = net::ProxyService::CreateUsingSystemProxyResolver( 102 proxy_service = net::ProxyService::CreateUsingSystemProxyResolver(
103 proxy_config_service, 103 proxy_config_service,
104 num_pac_threads, 104 num_pac_threads,
105 net_log); 105 net_log);
106 } 106 }
107 107
108 #if defined(OS_CHROMEOS) 108 #if defined(OS_CHROMEOS)
109 if (chromeos::CrosLibrary::Get()->EnsureLoaded()) { 109 if (chromeos::CrosLibrary::Get()->EnsureLoaded()) {
110 chromeos::CrosLibrary::Get()->GetLibCrosServiceLibrary()->StartService(); 110 chromeos::CrosLibrary::Get()->GetLibCrosServiceLibrary()->StartService();
111 } 111 }
112 #endif // defined(OS_CHROMEOS) 112 #endif // defined(OS_CHROMEOS)
113 113
114 return proxy_service; 114 return proxy_service;
115 } 115 }
OLDNEW
« no previous file with comments | « chrome/browser/net/connection_tester.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698