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

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

Issue 1067903003: Re-disable V8-based proxy resolving with the --single-process command line is set. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « no previous file | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 net::URLRequestContext* context, 97 net::URLRequestContext* context,
98 net::NetworkDelegate* network_delegate, 98 net::NetworkDelegate* network_delegate,
99 net::ProxyConfigService* proxy_config_service, 99 net::ProxyConfigService* proxy_config_service,
100 const base::CommandLine& command_line, 100 const base::CommandLine& command_line,
101 bool quick_check_enabled) { 101 bool quick_check_enabled) {
102 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 102 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
103 #if defined(OS_IOS) 103 #if defined(OS_IOS)
104 bool use_v8 = false; 104 bool use_v8 = false;
105 #else 105 #else
106 bool use_v8 = !command_line.HasSwitch(switches::kWinHttpProxyResolver); 106 bool use_v8 = !command_line.HasSwitch(switches::kWinHttpProxyResolver);
107 // TODO(eroman): Figure out why this doesn't work in single-process mode.
108 // Should be possible now that a private isolate is used.
109 // http://crbug.com/474654
110 if (use_v8 && command_line.HasSwitch(switches::kSingleProcess)) {
111 LOG(ERROR) << "Cannot use V8 Proxy resolver in single process mode.";
112 use_v8 = false; // Fallback to non-v8 implementation.
113 }
107 #endif // defined(OS_IOS) 114 #endif // defined(OS_IOS)
108 115
109 size_t num_pac_threads = 0u; // Use default number of threads. 116 size_t num_pac_threads = 0u; // Use default number of threads.
110 117
111 // Check the command line for an override on the number of proxy resolver 118 // Check the command line for an override on the number of proxy resolver
112 // threads to use. 119 // threads to use.
113 if (command_line.HasSwitch(switches::kNumPacThreads)) { 120 if (command_line.HasSwitch(switches::kNumPacThreads)) {
114 std::string s = command_line.GetSwitchValueASCII(switches::kNumPacThreads); 121 std::string s = command_line.GetSwitchValueASCII(switches::kNumPacThreads);
115 122
116 // Parse the switch (it should be a positive integer formatted as decimal). 123 // Parse the switch (it should be a positive integer formatted as decimal).
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 proxy_service = net::ProxyService::CreateUsingSystemProxyResolver( 169 proxy_service = net::ProxyService::CreateUsingSystemProxyResolver(
163 proxy_config_service, 170 proxy_config_service,
164 num_pac_threads, 171 num_pac_threads,
165 net_log); 172 net_log);
166 } 173 }
167 174
168 proxy_service->set_quick_check_enabled(quick_check_enabled); 175 proxy_service->set_quick_check_enabled(quick_check_enabled);
169 176
170 return proxy_service; 177 return proxy_service;
171 } 178 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698