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

Side by Side Diff: webkit/tools/test_shell/test_shell_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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/proxy/proxy_service.cc ('k') | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "webkit/tools/test_shell/test_shell_request_context.h" 5 #include "webkit/tools/test_shell/test_shell_request_context.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "net/base/cookie_monster.h" 10 #include "net/base/cookie_monster.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // TODO(port): rename "linux" to some nonspecific unix. 52 // TODO(port): rename "linux" to some nonspecific unix.
53 scoped_ptr<net::ProxyConfigService> proxy_config_service( 53 scoped_ptr<net::ProxyConfigService> proxy_config_service(
54 new net::ProxyConfigServiceFixed(net::ProxyConfig())); 54 new net::ProxyConfigServiceFixed(net::ProxyConfig()));
55 #else 55 #else
56 // Use the system proxy settings. 56 // Use the system proxy settings.
57 scoped_ptr<net::ProxyConfigService> proxy_config_service( 57 scoped_ptr<net::ProxyConfigService> proxy_config_service(
58 net::ProxyService::CreateSystemProxyConfigService(NULL, NULL)); 58 net::ProxyService::CreateSystemProxyConfigService(NULL, NULL));
59 #endif 59 #endif
60 host_resolver_ = net::CreateSystemHostResolver(); 60 host_resolver_ = net::CreateSystemHostResolver();
61 proxy_service_ = net::ProxyService::Create(proxy_config_service.release(), 61 proxy_service_ = net::ProxyService::Create(proxy_config_service.release(),
62 false, NULL, NULL, NULL); 62 false, 0, NULL, NULL, NULL);
63 ssl_config_service_ = net::SSLConfigService::CreateSystemSSLConfigService(); 63 ssl_config_service_ = net::SSLConfigService::CreateSystemSSLConfigService();
64 64
65 http_auth_handler_factory_ = net::HttpAuthHandlerFactory::CreateDefault(); 65 http_auth_handler_factory_ = net::HttpAuthHandlerFactory::CreateDefault();
66 66
67 net::HttpCache::DefaultBackend* backend = new net::HttpCache::DefaultBackend( 67 net::HttpCache::DefaultBackend* backend = new net::HttpCache::DefaultBackend(
68 cache_path.empty() ? net::MEMORY_CACHE : net::DISK_CACHE, 68 cache_path.empty() ? net::MEMORY_CACHE : net::DISK_CACHE,
69 cache_path, 0, SimpleResourceLoaderBridge::GetCacheThread()); 69 cache_path, 0, SimpleResourceLoaderBridge::GetCacheThread());
70 70
71 net::HttpCache* cache = 71 net::HttpCache* cache =
72 new net::HttpCache(host_resolver_, proxy_service_, ssl_config_service_, 72 new net::HttpCache(host_resolver_, proxy_service_, ssl_config_service_,
73 http_auth_handler_factory_, NULL, NULL, backend); 73 http_auth_handler_factory_, NULL, NULL, backend);
74 74
75 cache->set_mode(cache_mode); 75 cache->set_mode(cache_mode);
76 http_transaction_factory_ = cache; 76 http_transaction_factory_ = cache;
77 77
78 ftp_transaction_factory_ = new net::FtpNetworkLayer(host_resolver_); 78 ftp_transaction_factory_ = new net::FtpNetworkLayer(host_resolver_);
79 } 79 }
80 80
81 TestShellRequestContext::~TestShellRequestContext() { 81 TestShellRequestContext::~TestShellRequestContext() {
82 delete ftp_transaction_factory_; 82 delete ftp_transaction_factory_;
83 delete http_transaction_factory_; 83 delete http_transaction_factory_;
84 delete http_auth_handler_factory_; 84 delete http_auth_handler_factory_;
85 delete static_cast<net::StaticCookiePolicy*>(cookie_policy_); 85 delete static_cast<net::StaticCookiePolicy*>(cookie_policy_);
86 } 86 }
87 87
88 const std::string& TestShellRequestContext::GetUserAgent( 88 const std::string& TestShellRequestContext::GetUserAgent(
89 const GURL& url) const { 89 const GURL& url) const {
90 return webkit_glue::GetUserAgent(url); 90 return webkit_glue::GetUserAgent(url);
91 } 91 }
OLDNEW
« no previous file with comments | « net/proxy/proxy_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698