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

Unified Diff: chrome/browser/net/chrome_url_request_context.cc

Issue 2893005: Change the default number of proxy resolver threads used for evaluating PAC s... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Address wtc comments Created 10 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/net/connection_tester.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/chrome_url_request_context.cc
===================================================================
--- chrome/browser/net/chrome_url_request_context.cc (revision 51924)
+++ chrome/browser/net/chrome_url_request_context.cc (working copy)
@@ -96,9 +96,26 @@
use_v8 = false; // Fallback to non-v8 implementation.
}
+ size_t num_pac_threads = 0u; // Use default number of threads.
+
+ // Check the command line for an override on the number of proxy resolver
+ // threads to use.
+ if (command_line.HasSwitch(switches::kNumPacThreads)) {
+ std::string s = command_line.GetSwitchValueASCII(switches::kNumPacThreads);
+
+ // Parse the switch (it should be a positive integer formatted as decimal).
+ int n;
+ if (StringToInt(s, &n) && n > 0) {
+ num_pac_threads = static_cast<size_t>(n);
+ } else {
+ LOG(ERROR) << "Invalid switch for number of PAC threads: " << s;
+ }
+ }
+
return net::ProxyService::Create(
proxy_config_service,
use_v8,
+ num_pac_threads,
context,
net_log,
io_loop);
« no previous file with comments | « no previous file | chrome/browser/net/connection_tester.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698