| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_CHROME_BROWSER_IOS_CHROME_IO_THREAD_H_ | 5 #ifndef IOS_CHROME_BROWSER_IOS_CHROME_IO_THREAD_H_ |
| 6 #define IOS_CHROME_BROWSER_IOS_CHROME_IO_THREAD_H_ | 6 #define IOS_CHROME_BROWSER_IOS_CHROME_IO_THREAD_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include <map> | 11 #include <map> |
| 12 #include <memory> |
| 12 #include <set> | 13 #include <set> |
| 13 #include <string> | 14 #include <string> |
| 14 #include <vector> | 15 #include <vector> |
| 15 | 16 |
| 16 #include "base/compiler_specific.h" | 17 #include "base/compiler_specific.h" |
| 17 #include "base/macros.h" | 18 #include "base/macros.h" |
| 18 #include "base/memory/ref_counted.h" | 19 #include "base/memory/ref_counted.h" |
| 19 #include "base/memory/scoped_ptr.h" | |
| 20 #include "base/memory/weak_ptr.h" | 20 #include "base/memory/weak_ptr.h" |
| 21 #include "base/strings/string_piece.h" | 21 #include "base/strings/string_piece.h" |
| 22 #include "base/time/time.h" | 22 #include "base/time/time.h" |
| 23 #include "components/prefs/pref_member.h" | 23 #include "components/prefs/pref_member.h" |
| 24 #include "components/ssl_config/ssl_config_service_manager.h" | 24 #include "components/ssl_config/ssl_config_service_manager.h" |
| 25 #include "ios/web/public/web_thread_delegate.h" | 25 #include "ios/web/public/web_thread_delegate.h" |
| 26 #include "net/base/network_change_notifier.h" | 26 #include "net/base/network_change_notifier.h" |
| 27 #include "net/http/http_network_session.h" | 27 #include "net/http/http_network_session.h" |
| 28 | 28 |
| 29 class PrefProxyConfigTracker; | 29 class PrefProxyConfigTracker; |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 | 98 |
| 99 private: | 99 private: |
| 100 Globals* const globals_; | 100 Globals* const globals_; |
| 101 }; | 101 }; |
| 102 | 102 |
| 103 Globals(); | 103 Globals(); |
| 104 ~Globals(); | 104 ~Globals(); |
| 105 | 105 |
| 106 // The "system" NetworkDelegate, used for BrowserState-agnostic network | 106 // The "system" NetworkDelegate, used for BrowserState-agnostic network |
| 107 // events. | 107 // events. |
| 108 scoped_ptr<net::NetworkDelegate> system_network_delegate; | 108 std::unique_ptr<net::NetworkDelegate> system_network_delegate; |
| 109 scoped_ptr<net::HostResolver> host_resolver; | 109 std::unique_ptr<net::HostResolver> host_resolver; |
| 110 scoped_ptr<net::CertVerifier> cert_verifier; | 110 std::unique_ptr<net::CertVerifier> cert_verifier; |
| 111 // The ChannelIDService must outlive the HttpTransactionFactory. | 111 // The ChannelIDService must outlive the HttpTransactionFactory. |
| 112 scoped_ptr<net::ChannelIDService> system_channel_id_service; | 112 std::unique_ptr<net::ChannelIDService> system_channel_id_service; |
| 113 // This TransportSecurityState doesn't load or save any state. It's only | 113 // This TransportSecurityState doesn't load or save any state. It's only |
| 114 // used to enforce pinning for system requests and will only use built-in | 114 // used to enforce pinning for system requests and will only use built-in |
| 115 // pins. | 115 // pins. |
| 116 scoped_ptr<net::TransportSecurityState> transport_security_state; | 116 std::unique_ptr<net::TransportSecurityState> transport_security_state; |
| 117 scoped_ptr<net::CTVerifier> cert_transparency_verifier; | 117 std::unique_ptr<net::CTVerifier> cert_transparency_verifier; |
| 118 scoped_ptr<net::CTPolicyEnforcer> ct_policy_enforcer; | 118 std::unique_ptr<net::CTPolicyEnforcer> ct_policy_enforcer; |
| 119 scoped_refptr<net::SSLConfigService> ssl_config_service; | 119 scoped_refptr<net::SSLConfigService> ssl_config_service; |
| 120 scoped_ptr<net::HttpAuthPreferences> http_auth_preferences; | 120 std::unique_ptr<net::HttpAuthPreferences> http_auth_preferences; |
| 121 scoped_ptr<net::HttpAuthHandlerFactory> http_auth_handler_factory; | 121 std::unique_ptr<net::HttpAuthHandlerFactory> http_auth_handler_factory; |
| 122 scoped_ptr<net::HttpServerProperties> http_server_properties; | 122 std::unique_ptr<net::HttpServerProperties> http_server_properties; |
| 123 scoped_ptr<net::URLRequestBackoffManager> url_request_backoff_manager; | 123 std::unique_ptr<net::URLRequestBackoffManager> url_request_backoff_manager; |
| 124 scoped_ptr<net::ProxyService> system_proxy_service; | 124 std::unique_ptr<net::ProxyService> system_proxy_service; |
| 125 scoped_ptr<net::HttpNetworkSession> system_http_network_session; | 125 std::unique_ptr<net::HttpNetworkSession> system_http_network_session; |
| 126 scoped_ptr<net::HttpTransactionFactory> system_http_transaction_factory; | 126 std::unique_ptr<net::HttpTransactionFactory> |
| 127 scoped_ptr<net::URLRequestJobFactory> system_url_request_job_factory; | 127 system_http_transaction_factory; |
| 128 scoped_ptr<net::URLRequestContext> system_request_context; | 128 std::unique_ptr<net::URLRequestJobFactory> system_url_request_job_factory; |
| 129 std::unique_ptr<net::URLRequestContext> system_request_context; |
| 129 SystemRequestContextLeakChecker system_request_context_leak_checker; | 130 SystemRequestContextLeakChecker system_request_context_leak_checker; |
| 130 scoped_ptr<net::CookieStore> system_cookie_store; | 131 std::unique_ptr<net::CookieStore> system_cookie_store; |
| 131 scoped_ptr<net::HttpUserAgentSettings> http_user_agent_settings; | 132 std::unique_ptr<net::HttpUserAgentSettings> http_user_agent_settings; |
| 132 scoped_ptr<net::NetworkQualityEstimator> network_quality_estimator; | 133 std::unique_ptr<net::NetworkQualityEstimator> network_quality_estimator; |
| 133 uint16_t testing_fixed_http_port; | 134 uint16_t testing_fixed_http_port; |
| 134 uint16_t testing_fixed_https_port; | 135 uint16_t testing_fixed_https_port; |
| 135 Optional<bool> enable_tcp_fast_open_for_ssl; | 136 Optional<bool> enable_tcp_fast_open_for_ssl; |
| 136 | 137 |
| 137 Optional<bool> enable_spdy31; | 138 Optional<bool> enable_spdy31; |
| 138 Optional<bool> enable_http2; | 139 Optional<bool> enable_http2; |
| 139 Optional<bool> parse_alternative_services; | 140 Optional<bool> parse_alternative_services; |
| 140 Optional<bool> enable_alternative_service_with_different_host; | 141 Optional<bool> enable_alternative_service_with_different_host; |
| 141 | 142 |
| 142 Optional<bool> enable_npn; | 143 Optional<bool> enable_npn; |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 // using scoped_ptr. This is because the destructor of IOSChromeIOThread runs | 369 // using scoped_ptr. This is because the destructor of IOSChromeIOThread runs |
| 369 // on the wrong thread. All member variables should be deleted in CleanUp(). | 370 // on the wrong thread. All member variables should be deleted in CleanUp(). |
| 370 | 371 |
| 371 // These member variables are initialized in Init() and do not change for the | 372 // These member variables are initialized in Init() and do not change for the |
| 372 // lifetime of the IO thread. | 373 // lifetime of the IO thread. |
| 373 | 374 |
| 374 Globals* globals_; | 375 Globals* globals_; |
| 375 | 376 |
| 376 // Observer that logs network changes to the ChromeNetLog. | 377 // Observer that logs network changes to the ChromeNetLog. |
| 377 class LoggingNetworkChangeObserver; | 378 class LoggingNetworkChangeObserver; |
| 378 scoped_ptr<LoggingNetworkChangeObserver> network_change_observer_; | 379 std::unique_ptr<LoggingNetworkChangeObserver> network_change_observer_; |
| 379 | 380 |
| 380 // This is an instance of the default SSLConfigServiceManager for the current | 381 // This is an instance of the default SSLConfigServiceManager for the current |
| 381 // platform and it gets SSL preferences from local_state object. | 382 // platform and it gets SSL preferences from local_state object. |
| 382 scoped_ptr<ssl_config::SSLConfigServiceManager> ssl_config_service_manager_; | 383 std::unique_ptr<ssl_config::SSLConfigServiceManager> |
| 384 ssl_config_service_manager_; |
| 383 | 385 |
| 384 // These member variables are initialized by a task posted to the IO thread, | 386 // These member variables are initialized by a task posted to the IO thread, |
| 385 // which gets posted by calling certain member functions of IOSChromeIOThread. | 387 // which gets posted by calling certain member functions of IOSChromeIOThread. |
| 386 scoped_ptr<net::ProxyConfigService> system_proxy_config_service_; | 388 std::unique_ptr<net::ProxyConfigService> system_proxy_config_service_; |
| 387 | 389 |
| 388 scoped_ptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; | 390 std::unique_ptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; |
| 389 | 391 |
| 390 scoped_refptr<net::URLRequestContextGetter> | 392 scoped_refptr<net::URLRequestContextGetter> |
| 391 system_url_request_context_getter_; | 393 system_url_request_context_getter_; |
| 392 | 394 |
| 393 const base::TimeTicks creation_time_; | 395 const base::TimeTicks creation_time_; |
| 394 | 396 |
| 395 base::WeakPtrFactory<IOSChromeIOThread> weak_factory_; | 397 base::WeakPtrFactory<IOSChromeIOThread> weak_factory_; |
| 396 | 398 |
| 397 DISALLOW_COPY_AND_ASSIGN(IOSChromeIOThread); | 399 DISALLOW_COPY_AND_ASSIGN(IOSChromeIOThread); |
| 398 }; | 400 }; |
| 399 | 401 |
| 400 #endif // IOS_CHROME_BROWSER_IOS_CHROME_IO_THREAD_H_ | 402 #endif // IOS_CHROME_BROWSER_IOS_CHROME_IO_THREAD_H_ |
| OLD | NEW |