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 15 matching lines...) Expand all Loading... |
26 #include "chrome/browser/net/passive_log_collector.h" | 26 #include "chrome/browser/net/passive_log_collector.h" |
27 #include "chrome/browser/net/pref_proxy_config_service.h" | 27 #include "chrome/browser/net/pref_proxy_config_service.h" |
28 #include "chrome/browser/net/proxy_service_factory.h" | 28 #include "chrome/browser/net/proxy_service_factory.h" |
29 #include "chrome/browser/net/sdch_dictionary_fetcher.h" | 29 #include "chrome/browser/net/sdch_dictionary_fetcher.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/content_client.h" |
36 #include "content/common/net/url_fetcher.h" | 37 #include "content/common/net/url_fetcher.h" |
37 #include "net/base/cert_verifier.h" | 38 #include "net/base/cert_verifier.h" |
38 #include "net/base/cookie_monster.h" | 39 #include "net/base/cookie_monster.h" |
39 #include "net/base/default_origin_bound_cert_store.h" | 40 #include "net/base/default_origin_bound_cert_store.h" |
40 #include "net/base/dnsrr_resolver.h" | 41 #include "net/base/dnsrr_resolver.h" |
41 #include "net/base/host_cache.h" | 42 #include "net/base/host_cache.h" |
42 #include "net/base/host_resolver.h" | 43 #include "net/base/host_resolver.h" |
43 #include "net/base/host_resolver_impl.h" | 44 #include "net/base/host_resolver_impl.h" |
44 #include "net/base/mapped_host_resolver.h" | 45 #include "net/base/mapped_host_resolver.h" |
45 #include "net/base/net_util.h" | 46 #include "net/base/net_util.h" |
46 #include "net/base/origin_bound_cert_service.h" | 47 #include "net/base/origin_bound_cert_service.h" |
47 #include "net/base/sdch_manager.h" | 48 #include "net/base/sdch_manager.h" |
48 #include "net/dns/async_host_resolver.h" | 49 #include "net/dns/async_host_resolver.h" |
49 #include "net/ftp/ftp_network_layer.h" | 50 #include "net/ftp/ftp_network_layer.h" |
50 #include "net/http/http_auth_filter.h" | 51 #include "net/http/http_auth_filter.h" |
51 #include "net/http/http_auth_handler_factory.h" | 52 #include "net/http/http_auth_handler_factory.h" |
52 #include "net/http/http_network_layer.h" | 53 #include "net/http/http_network_layer.h" |
53 #include "net/http/http_network_session.h" | 54 #include "net/http/http_network_session.h" |
54 #include "net/http/http_server_properties_impl.h" | 55 #include "net/http/http_server_properties_impl.h" |
55 #include "net/proxy/proxy_config_service.h" | 56 #include "net/proxy/proxy_config_service.h" |
56 #include "net/proxy/proxy_script_fetcher_impl.h" | 57 #include "net/proxy/proxy_script_fetcher_impl.h" |
57 #include "net/proxy/proxy_service.h" | 58 #include "net/proxy/proxy_service.h" |
58 #include "net/socket/dns_cert_provenance_checker.h" | 59 #include "net/socket/dns_cert_provenance_checker.h" |
59 #include "webkit/glue/webkit_glue.h" | |
60 | 60 |
61 #if defined(USE_NSS) | 61 #if defined(USE_NSS) |
62 #include "net/ocsp/nss_ocsp.h" | 62 #include "net/ocsp/nss_ocsp.h" |
63 #endif // defined(USE_NSS) | 63 #endif // defined(USE_NSS) |
64 | 64 |
65 namespace { | 65 namespace { |
66 | 66 |
67 // Custom URLRequestContext used by requests which aren't associated with a | 67 // Custom URLRequestContext used by requests which aren't associated with a |
68 // particular profile. We need to use a subclass of URLRequestContext in order | 68 // particular profile. We need to use a subclass of URLRequestContext in order |
69 // to provide the correct User-Agent. | 69 // to provide the correct User-Agent. |
70 class URLRequestContextWithUserAgent : public net::URLRequestContext { | 70 class URLRequestContextWithUserAgent : public net::URLRequestContext { |
71 public: | 71 public: |
72 virtual const std::string& GetUserAgent( | 72 virtual const std::string& GetUserAgent( |
73 const GURL& url) const OVERRIDE { | 73 const GURL& url) const OVERRIDE { |
74 return webkit_glue::GetUserAgent(url); | 74 return content::GetUserAgent(url); |
75 } | 75 } |
76 }; | 76 }; |
77 | 77 |
78 // Used for the "system" URLRequestContext. If this grows more complicated, then | 78 // Used for the "system" URLRequestContext. If this grows more complicated, then |
79 // consider inheriting directly from URLRequestContext rather than using | 79 // consider inheriting directly from URLRequestContext rather than using |
80 // implementation inheritance. | 80 // implementation inheritance. |
81 class SystemURLRequestContext : public URLRequestContextWithUserAgent { | 81 class SystemURLRequestContext : public URLRequestContextWithUserAgent { |
82 public: | 82 public: |
83 SystemURLRequestContext() { | 83 SystemURLRequestContext() { |
84 #if defined(USE_NSS) | 84 #if defined(USE_NSS) |
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
625 system_params.network_delegate = globals_->system_network_delegate.get(); | 625 system_params.network_delegate = globals_->system_network_delegate.get(); |
626 system_params.net_log = net_log_; | 626 system_params.net_log = net_log_; |
627 globals_->system_http_transaction_factory.reset( | 627 globals_->system_http_transaction_factory.reset( |
628 new net::HttpNetworkLayer( | 628 new net::HttpNetworkLayer( |
629 new net::HttpNetworkSession(system_params))); | 629 new net::HttpNetworkSession(system_params))); |
630 globals_->system_ftp_transaction_factory.reset( | 630 globals_->system_ftp_transaction_factory.reset( |
631 new net::FtpNetworkLayer(globals_->host_resolver.get())); | 631 new net::FtpNetworkLayer(globals_->host_resolver.get())); |
632 globals_->system_request_context = | 632 globals_->system_request_context = |
633 ConstructSystemRequestContext(globals_, net_log_); | 633 ConstructSystemRequestContext(globals_, net_log_); |
634 } | 634 } |
OLD | NEW |