OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 IOS_CRNET_CRNET_ENVIRONMENT_H_ | 5 #ifndef IOS_CRNET_CRNET_ENVIRONMENT_H_ |
6 #define IOS_CRNET_CRNET_ENVIRONMENT_H_ | 6 #define IOS_CRNET_CRNET_ENVIRONMENT_H_ |
7 | 7 |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/synchronization/waitable_event.h" | 10 #include "base/synchronization/waitable_event.h" |
11 #include "base/threading/thread.h" | 11 #include "base/threading/thread.h" |
12 #import "ios/crnet/CrNet.h" | 12 #import "ios/crnet/CrNet.h" |
13 #include "ios/crnet/crnet_net_log.h" | |
14 #include "net/url_request/url_request.h" | 13 #include "net/url_request/url_request.h" |
15 #include "net/url_request/url_request_context.h" | 14 #include "net/url_request/url_request_context.h" |
16 | 15 |
17 namespace net { | 16 namespace net { |
18 class HttpCache; | 17 class HttpCache; |
19 class NetworkChangeNotifier; | 18 class NetworkChangeNotifier; |
| 19 class NetLog; |
20 class ProxyConfigService; | 20 class ProxyConfigService; |
21 class SdchManager; | 21 class SdchManager; |
22 class URLRequestContextGetter; | 22 class URLRequestContextGetter; |
| 23 class WriteToFileNetLogObserver; |
23 } | 24 } |
24 | 25 |
25 class CrNetHttpProtocolHandlerDelegate; | 26 class CrNetHttpProtocolHandlerDelegate; |
26 | 27 |
27 // CrNetEnvironment contains all the network stack configuration | 28 // CrNetEnvironment contains all the network stack configuration |
28 // and initialization. | 29 // and initialization. |
29 class CrNetEnvironment { | 30 class CrNetEnvironment { |
30 public: | 31 public: |
31 // Must be called on the main thread. | 32 // Must be called on the main thread. |
32 static void Initialize(); | 33 static void Initialize(); |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 scoped_ptr<base::Thread> file_thread_; | 137 scoped_ptr<base::Thread> file_thread_; |
137 scoped_ptr<base::Thread> file_user_blocking_thread_; | 138 scoped_ptr<base::Thread> file_user_blocking_thread_; |
138 scoped_ptr<net::SdchManager> sdch_manager_; | 139 scoped_ptr<net::SdchManager> sdch_manager_; |
139 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_; | 140 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_; |
140 scoped_ptr<net::ProxyConfigService> proxy_config_service_; | 141 scoped_ptr<net::ProxyConfigService> proxy_config_service_; |
141 scoped_ptr<net::HttpServerProperties> http_server_properties_; | 142 scoped_ptr<net::HttpServerProperties> http_server_properties_; |
142 scoped_refptr<net::URLRequestContextGetter> main_context_getter_; | 143 scoped_refptr<net::URLRequestContextGetter> main_context_getter_; |
143 scoped_ptr<net::URLRequestContext> main_context_; | 144 scoped_ptr<net::URLRequestContext> main_context_; |
144 scoped_ptr<CrNetHttpProtocolHandlerDelegate> http_protocol_handler_delegate_; | 145 scoped_ptr<CrNetHttpProtocolHandlerDelegate> http_protocol_handler_delegate_; |
145 std::string user_agent_product_name_; | 146 std::string user_agent_product_name_; |
146 base::Lock net_log_lock_; | 147 scoped_ptr<net::NetLog> net_log_; |
147 bool net_log_started_; | 148 scoped_ptr<net::WriteToFileNetLogObserver> net_log_observer_; |
148 scoped_ptr<CrNetNetLog> net_log_; | |
149 | 149 |
150 DISALLOW_COPY_AND_ASSIGN(CrNetEnvironment); | 150 DISALLOW_COPY_AND_ASSIGN(CrNetEnvironment); |
151 }; | 151 }; |
152 | 152 |
153 #endif // IOS_CRNET_CRNET_ENVIRONMENT_H_ | 153 #endif // IOS_CRNET_CRNET_ENVIRONMENT_H_ |
OLD | NEW |