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

Side by Side Diff: chrome/service/net/service_url_request_context.cc

Issue 9476035: Make CertVerifier a pure virtual interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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
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/service/net/service_url_request_context.h" 5 #include "chrome/service/net/service_url_request_context.h"
6 6
7 #if defined(OS_POSIX) && !defined(OS_MACOSX) 7 #if defined(OS_POSIX) && !defined(OS_MACOSX)
8 #include <sys/utsname.h> 8 #include <sys/utsname.h>
9 #endif 9 #endif
10 10
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/message_loop_proxy.h" 12 #include "base/message_loop_proxy.h"
13 #include "base/stringprintf.h" 13 #include "base/stringprintf.h"
14 #include "base/sys_info.h" 14 #include "base/sys_info.h"
15 #include "chrome/common/chrome_version_info.h" 15 #include "chrome/common/chrome_version_info.h"
16 #include "chrome/service/service_process.h" 16 #include "chrome/service/service_process.h"
17 #include "net/base/cert_verifier.h"
18 #include "net/base/cookie_monster.h" 17 #include "net/base/cookie_monster.h"
19 #include "net/base/host_resolver.h" 18 #include "net/base/host_resolver.h"
19 #include "net/base/multi_threaded_cert_verifier.h"
20 #include "net/base/ssl_config_service_defaults.h" 20 #include "net/base/ssl_config_service_defaults.h"
21 #include "net/ftp/ftp_network_layer.h" 21 #include "net/ftp/ftp_network_layer.h"
22 #include "net/http/http_auth_handler_factory.h" 22 #include "net/http/http_auth_handler_factory.h"
23 #include "net/http/http_cache.h" 23 #include "net/http/http_cache.h"
24 #include "net/http/http_network_session.h" 24 #include "net/http/http_network_session.h"
25 #include "net/http/http_server_properties_impl.h" 25 #include "net/http/http_server_properties_impl.h"
26 #include "net/proxy/proxy_config_service.h" 26 #include "net/proxy/proxy_config_service.h"
27 #include "net/proxy/proxy_service.h" 27 #include "net/proxy/proxy_service.h"
28 28
29 namespace { 29 namespace {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 const std::string& user_agent, 108 const std::string& user_agent,
109 net::ProxyConfigService* net_proxy_config_service) 109 net::ProxyConfigService* net_proxy_config_service)
110 : user_agent_(user_agent), 110 : user_agent_(user_agent),
111 ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) { 111 ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) {
112 storage_.set_host_resolver( 112 storage_.set_host_resolver(
113 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism, 113 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism,
114 net::HostResolver::kDefaultRetryAttempts, 114 net::HostResolver::kDefaultRetryAttempts,
115 NULL)); 115 NULL));
116 storage_.set_proxy_service(net::ProxyService::CreateUsingSystemProxyResolver( 116 storage_.set_proxy_service(net::ProxyService::CreateUsingSystemProxyResolver(
117 net_proxy_config_service, 0u, NULL)); 117 net_proxy_config_service, 0u, NULL));
118 storage_.set_cert_verifier(new net::CertVerifier); 118 storage_.set_cert_verifier(new net::MultiThreadedCertVerifier);
119 storage_.set_ftp_transaction_factory( 119 storage_.set_ftp_transaction_factory(
120 new net::FtpNetworkLayer(host_resolver())); 120 new net::FtpNetworkLayer(host_resolver()));
121 storage_.set_ssl_config_service(new net::SSLConfigServiceDefaults); 121 storage_.set_ssl_config_service(new net::SSLConfigServiceDefaults);
122 storage_.set_http_auth_handler_factory( 122 storage_.set_http_auth_handler_factory(
123 net::HttpAuthHandlerFactory::CreateDefault(host_resolver())); 123 net::HttpAuthHandlerFactory::CreateDefault(host_resolver()));
124 storage_.set_http_server_properties(new net::HttpServerPropertiesImpl); 124 storage_.set_http_server_properties(new net::HttpServerPropertiesImpl);
125 125
126 net::HttpNetworkSession::Params session_params; 126 net::HttpNetworkSession::Params session_params;
127 session_params.host_resolver = host_resolver(); 127 session_params.host_resolver = host_resolver();
128 session_params.cert_verifier = cert_verifier(); 128 session_params.cert_verifier = cert_verifier();
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 proxy_config_service_.release()); 176 proxy_config_service_.release());
177 return url_request_context_; 177 return url_request_context_;
178 } 178 }
179 179
180 scoped_refptr<base::MessageLoopProxy> 180 scoped_refptr<base::MessageLoopProxy>
181 ServiceURLRequestContextGetter::GetIOMessageLoopProxy() const { 181 ServiceURLRequestContextGetter::GetIOMessageLoopProxy() const {
182 return io_message_loop_proxy_; 182 return io_message_loop_proxy_;
183 } 183 }
184 184
185 ServiceURLRequestContextGetter::~ServiceURLRequestContextGetter() {} 185 ServiceURLRequestContextGetter::~ServiceURLRequestContextGetter() {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698