OLD | NEW |
---|---|
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/io_thread.h" | 5 #include "chrome/browser/io_thread.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/leak_tracker.h" | 10 #include "base/debug/leak_tracker.h" |
(...skipping 18 matching lines...) Expand all Loading... | |
29 #include "chrome/browser/net/proxy_service_factory.h" | 29 #include "chrome/browser/net/proxy_service_factory.h" |
30 #include "chrome/browser/prefs/pref_service.h" | 30 #include "chrome/browser/prefs/pref_service.h" |
31 #include "chrome/common/chrome_switches.h" | 31 #include "chrome/common/chrome_switches.h" |
32 #include "chrome/common/pref_names.h" | 32 #include "chrome/common/pref_names.h" |
33 #include "content/browser/browser_thread.h" | 33 #include "content/browser/browser_thread.h" |
34 #include "content/browser/gpu/gpu_process_host.h" | 34 #include "content/browser/gpu/gpu_process_host.h" |
35 #include "content/browser/in_process_webkit/indexed_db_key_utility_client.h" | 35 #include "content/browser/in_process_webkit/indexed_db_key_utility_client.h" |
36 #include "content/common/url_fetcher.h" | 36 #include "content/common/url_fetcher.h" |
37 #include "net/base/cert_verifier.h" | 37 #include "net/base/cert_verifier.h" |
38 #include "net/base/cookie_monster.h" | 38 #include "net/base/cookie_monster.h" |
39 #include "net/base/default_origin_bound_cert_store.h" | |
39 #include "net/base/dnsrr_resolver.h" | 40 #include "net/base/dnsrr_resolver.h" |
40 #include "net/base/host_cache.h" | 41 #include "net/base/host_cache.h" |
41 #include "net/base/host_resolver.h" | 42 #include "net/base/host_resolver.h" |
42 #include "net/base/host_resolver_impl.h" | 43 #include "net/base/host_resolver_impl.h" |
43 #include "net/base/mapped_host_resolver.h" | 44 #include "net/base/mapped_host_resolver.h" |
44 #include "net/base/net_util.h" | 45 #include "net/base/net_util.h" |
46 #include "net/base/origin_bound_cert_service.h" | |
45 #include "net/dns/async_host_resolver.h" | 47 #include "net/dns/async_host_resolver.h" |
46 #include "net/ftp/ftp_network_layer.h" | 48 #include "net/ftp/ftp_network_layer.h" |
47 #include "net/http/http_auth_filter.h" | 49 #include "net/http/http_auth_filter.h" |
48 #include "net/http/http_auth_handler_factory.h" | 50 #include "net/http/http_auth_handler_factory.h" |
49 #include "net/http/http_network_layer.h" | 51 #include "net/http/http_network_layer.h" |
50 #include "net/http/http_network_session.h" | 52 #include "net/http/http_network_session.h" |
51 #include "net/proxy/proxy_config_service.h" | 53 #include "net/proxy/proxy_config_service.h" |
52 #include "net/proxy/proxy_script_fetcher_impl.h" | 54 #include "net/proxy/proxy_script_fetcher_impl.h" |
53 #include "net/proxy/proxy_service.h" | 55 #include "net/proxy/proxy_service.h" |
54 #include "net/socket/dns_cert_provenance_checker.h" | 56 #include "net/socket/dns_cert_provenance_checker.h" |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
248 context->set_dnsrr_resolver(globals->dnsrr_resolver.get()); | 250 context->set_dnsrr_resolver(globals->dnsrr_resolver.get()); |
249 context->set_http_auth_handler_factory( | 251 context->set_http_auth_handler_factory( |
250 globals->http_auth_handler_factory.get()); | 252 globals->http_auth_handler_factory.get()); |
251 context->set_proxy_service(globals->proxy_script_fetcher_proxy_service.get()); | 253 context->set_proxy_service(globals->proxy_script_fetcher_proxy_service.get()); |
252 context->set_http_transaction_factory( | 254 context->set_http_transaction_factory( |
253 globals->proxy_script_fetcher_http_transaction_factory.get()); | 255 globals->proxy_script_fetcher_http_transaction_factory.get()); |
254 context->set_ftp_transaction_factory( | 256 context->set_ftp_transaction_factory( |
255 globals->proxy_script_fetcher_ftp_transaction_factory.get()); | 257 globals->proxy_script_fetcher_ftp_transaction_factory.get()); |
256 // In-memory cookie store. | 258 // In-memory cookie store. |
257 context->set_cookie_store(new net::CookieMonster(NULL, NULL)); | 259 context->set_cookie_store(new net::CookieMonster(NULL, NULL)); |
260 // In-memory origin bound cert-store. | |
wtc
2011/08/04 00:56:20
Nit: origin bound cert-store => origin-bound cert
| |
261 context->set_origin_bound_cert_service( | |
262 new net::OriginBoundCertService( | |
263 new net::DefaultOriginBoundCertStore(NULL))); | |
258 context->set_network_delegate(globals->system_network_delegate.get()); | 264 context->set_network_delegate(globals->system_network_delegate.get()); |
259 return context; | 265 return context; |
260 } | 266 } |
261 | 267 |
262 scoped_refptr<net::URLRequestContext> | 268 scoped_refptr<net::URLRequestContext> |
263 ConstructSystemRequestContext(IOThread::Globals* globals, | 269 ConstructSystemRequestContext(IOThread::Globals* globals, |
264 net::NetLog* net_log) { | 270 net::NetLog* net_log) { |
265 scoped_refptr<net::URLRequestContext> context( | 271 scoped_refptr<net::URLRequestContext> context( |
266 new SystemURLRequestContext); | 272 new SystemURLRequestContext); |
267 context->set_net_log(net_log); | 273 context->set_net_log(net_log); |
268 context->set_host_resolver(globals->host_resolver.get()); | 274 context->set_host_resolver(globals->host_resolver.get()); |
269 context->set_cert_verifier(globals->cert_verifier.get()); | 275 context->set_cert_verifier(globals->cert_verifier.get()); |
270 context->set_dnsrr_resolver(globals->dnsrr_resolver.get()); | 276 context->set_dnsrr_resolver(globals->dnsrr_resolver.get()); |
271 context->set_http_auth_handler_factory( | 277 context->set_http_auth_handler_factory( |
272 globals->http_auth_handler_factory.get()); | 278 globals->http_auth_handler_factory.get()); |
273 context->set_proxy_service(globals->system_proxy_service.get()); | 279 context->set_proxy_service(globals->system_proxy_service.get()); |
274 context->set_http_transaction_factory( | 280 context->set_http_transaction_factory( |
275 globals->system_http_transaction_factory.get()); | 281 globals->system_http_transaction_factory.get()); |
276 context->set_ftp_transaction_factory( | 282 context->set_ftp_transaction_factory( |
277 globals->system_ftp_transaction_factory.get()); | 283 globals->system_ftp_transaction_factory.get()); |
278 // In-memory cookie store. | 284 // In-memory cookie store. |
279 context->set_cookie_store(new net::CookieMonster(NULL, NULL)); | 285 context->set_cookie_store(new net::CookieMonster(NULL, NULL)); |
286 // In-memory origin bound cert-store. | |
287 context->set_origin_bound_cert_service( | |
288 new net::OriginBoundCertService( | |
289 new net::DefaultOriginBoundCertStore(NULL))); | |
280 return context; | 290 return context; |
281 } | 291 } |
282 | 292 |
283 } // namespace | 293 } // namespace |
284 | 294 |
285 class SystemURLRequestContextGetter : public net::URLRequestContextGetter { | 295 class SystemURLRequestContextGetter : public net::URLRequestContextGetter { |
286 public: | 296 public: |
287 explicit SystemURLRequestContextGetter(IOThread* io_thread); | 297 explicit SystemURLRequestContextGetter(IOThread* io_thread); |
288 virtual ~SystemURLRequestContextGetter(); | 298 virtual ~SystemURLRequestContextGetter(); |
289 | 299 |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
728 system_params.network_delegate = globals_->system_network_delegate.get(); | 738 system_params.network_delegate = globals_->system_network_delegate.get(); |
729 system_params.net_log = net_log_; | 739 system_params.net_log = net_log_; |
730 globals_->system_http_transaction_factory.reset( | 740 globals_->system_http_transaction_factory.reset( |
731 new net::HttpNetworkLayer( | 741 new net::HttpNetworkLayer( |
732 new net::HttpNetworkSession(system_params))); | 742 new net::HttpNetworkSession(system_params))); |
733 globals_->system_ftp_transaction_factory.reset( | 743 globals_->system_ftp_transaction_factory.reset( |
734 new net::FtpNetworkLayer(globals_->host_resolver.get())); | 744 new net::FtpNetworkLayer(globals_->host_resolver.get())); |
735 globals_->system_request_context = | 745 globals_->system_request_context = |
736 ConstructSystemRequestContext(globals_, net_log_); | 746 ConstructSystemRequestContext(globals_, net_log_); |
737 } | 747 } |
OLD | NEW |