OLD | NEW |
1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_IO_THREAD_H_ | 5 #ifndef CHROME_BROWSER_IO_THREAD_H_ |
6 #define CHROME_BROWSER_IO_THREAD_H_ | 6 #define CHROME_BROWSER_IO_THREAD_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <list> | 9 #include <list> |
10 #include <string> | 10 #include <string> |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/ref_counted.h" | 12 #include "base/ref_counted.h" |
13 #include "base/scoped_ptr.h" | 13 #include "base/scoped_ptr.h" |
14 #include "chrome/browser/browser_process_sub_thread.h" | 14 #include "chrome/browser/browser_process_sub_thread.h" |
15 #include "chrome/browser/net/chrome_network_delegate.h" | 15 #include "chrome/browser/net/chrome_network_delegate.h" |
16 #include "chrome/common/net/predictor_common.h" | 16 #include "chrome/common/net/predictor_common.h" |
17 #include "net/base/network_change_notifier.h" | 17 #include "net/base/network_change_notifier.h" |
18 | 18 |
19 class ChromeNetLog; | 19 class ChromeNetLog; |
20 class ChromeURLRequestContextGetter; | 20 class ChromeURLRequestContextGetter; |
21 class ListValue; | 21 class ListValue; |
22 class PrefService; | 22 class PrefService; |
23 class PrerenderInterceptor; | 23 class PrerenderInterceptor; |
24 class URLRequestContext; | |
25 | 24 |
26 namespace chrome_browser_net { | 25 namespace chrome_browser_net { |
27 class ConnectInterceptor; | 26 class ConnectInterceptor; |
28 class Predictor; | 27 class Predictor; |
29 } // namespace chrome_browser_net | 28 } // namespace chrome_browser_net |
30 | 29 |
31 namespace net { | 30 namespace net { |
32 class CertVerifier; | 31 class CertVerifier; |
33 class ClientSocketFactory; | 32 class ClientSocketFactory; |
34 class DnsRRResolver; | 33 class DnsRRResolver; |
35 class HostResolver; | 34 class HostResolver; |
36 class HttpAuthHandlerFactory; | 35 class HttpAuthHandlerFactory; |
37 class HttpTransactionFactory; | 36 class HttpTransactionFactory; |
38 class ProxyScriptFetcher; | 37 class ProxyScriptFetcher; |
39 class ProxyService; | 38 class ProxyService; |
40 class SSLConfigService; | 39 class SSLConfigService; |
| 40 class URLRequestContext; |
41 class URLSecurityManager; | 41 class URLSecurityManager; |
42 } // namespace net | 42 } // namespace net |
43 | 43 |
44 class IOThread : public BrowserProcessSubThread { | 44 class IOThread : public BrowserProcessSubThread { |
45 public: | 45 public: |
46 struct Globals { | 46 struct Globals { |
47 Globals(); | 47 Globals(); |
48 ~Globals(); | 48 ~Globals(); |
49 | 49 |
50 net::ClientSocketFactory* client_socket_factory; | 50 net::ClientSocketFactory* client_socket_factory; |
51 scoped_ptr<net::HostResolver> host_resolver; | 51 scoped_ptr<net::HostResolver> host_resolver; |
52 scoped_ptr<net::CertVerifier> cert_verifier; | 52 scoped_ptr<net::CertVerifier> cert_verifier; |
53 scoped_ptr<net::DnsRRResolver> dnsrr_resolver; | 53 scoped_ptr<net::DnsRRResolver> dnsrr_resolver; |
54 scoped_refptr<net::SSLConfigService> ssl_config_service; | 54 scoped_refptr<net::SSLConfigService> ssl_config_service; |
55 scoped_ptr<net::HttpAuthHandlerFactory> http_auth_handler_factory; | 55 scoped_ptr<net::HttpAuthHandlerFactory> http_auth_handler_factory; |
56 scoped_refptr<net::ProxyService> proxy_script_fetcher_proxy_service; | 56 scoped_refptr<net::ProxyService> proxy_script_fetcher_proxy_service; |
57 scoped_ptr<net::HttpTransactionFactory> | 57 scoped_ptr<net::HttpTransactionFactory> |
58 proxy_script_fetcher_http_transaction_factory; | 58 proxy_script_fetcher_http_transaction_factory; |
59 scoped_ptr<net::URLSecurityManager> url_security_manager; | 59 scoped_ptr<net::URLSecurityManager> url_security_manager; |
60 ChromeNetworkDelegate network_delegate; | 60 ChromeNetworkDelegate network_delegate; |
61 scoped_refptr<URLRequestContext> proxy_script_fetcher_context; | 61 scoped_refptr<net::URLRequestContext> proxy_script_fetcher_context; |
62 }; | 62 }; |
63 | 63 |
64 // |net_log| must either outlive the IOThread or be NULL. | 64 // |net_log| must either outlive the IOThread or be NULL. |
65 IOThread(PrefService* local_state, ChromeNetLog* net_log); | 65 IOThread(PrefService* local_state, ChromeNetLog* net_log); |
66 | 66 |
67 virtual ~IOThread(); | 67 virtual ~IOThread(); |
68 | 68 |
69 // Can only be called on the IO thread. | 69 // Can only be called on the IO thread. |
70 Globals* globals(); | 70 Globals* globals(); |
71 | 71 |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 | 161 |
162 // Keeps track of all live ChromeURLRequestContextGetters, so the | 162 // Keeps track of all live ChromeURLRequestContextGetters, so the |
163 // ChromeURLRequestContexts can be released during | 163 // ChromeURLRequestContexts can be released during |
164 // IOThread::CleanUpAfterMessageLoopDestruction(). | 164 // IOThread::CleanUpAfterMessageLoopDestruction(). |
165 std::list<ChromeURLRequestContextGetter*> url_request_context_getters_; | 165 std::list<ChromeURLRequestContextGetter*> url_request_context_getters_; |
166 | 166 |
167 DISALLOW_COPY_AND_ASSIGN(IOThread); | 167 DISALLOW_COPY_AND_ASSIGN(IOThread); |
168 }; | 168 }; |
169 | 169 |
170 #endif // CHROME_BROWSER_IO_THREAD_H_ | 170 #endif // CHROME_BROWSER_IO_THREAD_H_ |
OLD | NEW |