OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PROFILES_PROFILE_IO_DATA_H_ | 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
6 #define CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 6 #define CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 // A URLRequestContext for apps that owns its cookie store and HTTP factory, | 253 // A URLRequestContext for apps that owns its cookie store and HTTP factory, |
254 // to ensure they are deleted. | 254 // to ensure they are deleted. |
255 class AppRequestContext : public net::URLRequestContext { | 255 class AppRequestContext : public net::URLRequestContext { |
256 public: | 256 public: |
257 AppRequestContext(); | 257 AppRequestContext(); |
258 | 258 |
259 void SetCookieStore(net::CookieStore* cookie_store); | 259 void SetCookieStore(net::CookieStore* cookie_store); |
260 void SetHttpTransactionFactory( | 260 void SetHttpTransactionFactory( |
261 scoped_ptr<net::HttpTransactionFactory> http_factory); | 261 scoped_ptr<net::HttpTransactionFactory> http_factory); |
262 void SetJobFactory(scoped_ptr<net::URLRequestJobFactory> job_factory); | 262 void SetJobFactory(scoped_ptr<net::URLRequestJobFactory> job_factory); |
| 263 void SetHostResolver(scoped_ptr<net::HostResolver> host_resolver); |
| 264 void SetCertVerifier(scoped_ptr<net::CertVerifier> vert_verifier); |
| 265 void SetChannelIDService( |
| 266 scoped_ptr<net::ChannelIDService> channel_id_service); |
| 267 void SetTransportSecurityState( |
| 268 scoped_ptr<net::TransportSecurityState> transport_security_state); |
| 269 void SetCertTransparencyVerifier( |
| 270 scoped_ptr<net::CTVerifier> cert_transparency_verifier); |
| 271 void SetCertPolicyEnforcer( |
| 272 scoped_ptr<net::CertPolicyEnforcer> cert_policy_enforcer); |
| 273 net::CertPolicyEnforcer* cert_policy_enforcer() { |
| 274 return owned_cert_policy_enforcer_.get(); |
| 275 } |
| 276 void SetSSLConfigService(net::SSLConfigService* ssl_config_service); |
263 | 277 |
264 private: | 278 private: |
265 ~AppRequestContext() override; | 279 ~AppRequestContext() override; |
266 | 280 |
267 scoped_refptr<net::CookieStore> cookie_store_; | 281 scoped_refptr<net::CookieStore> cookie_store_; |
268 scoped_ptr<net::HttpTransactionFactory> http_factory_; | 282 scoped_ptr<net::HttpTransactionFactory> http_factory_; |
269 scoped_ptr<net::URLRequestJobFactory> job_factory_; | 283 scoped_ptr<net::URLRequestJobFactory> job_factory_; |
| 284 // The AppRequestContext needs to own certain state required by its |
| 285 // isolated HttpNetworkSession. |
| 286 scoped_ptr<net::HostResolver> owned_host_resolver_; |
| 287 scoped_ptr<net::CertVerifier> owned_cert_verifier_; |
| 288 scoped_ptr<net::ChannelIDService> owned_channel_id_service_; |
| 289 scoped_ptr<net::TransportSecurityState> owned_transport_security_state_; |
| 290 scoped_ptr<net::CTVerifier> owned_cert_transparency_verifier_; |
| 291 scoped_ptr<net::CertPolicyEnforcer> owned_cert_policy_enforcer_; |
| 292 // SSLConfigService is ref-counted. |
| 293 net::SSLConfigService* owned_ssl_config_service_; |
270 }; | 294 }; |
271 | 295 |
272 // Created on the UI thread, read on the IO thread during ProfileIOData lazy | 296 // Created on the UI thread, read on the IO thread during ProfileIOData lazy |
273 // initialization. | 297 // initialization. |
274 struct ProfileParams { | 298 struct ProfileParams { |
275 ProfileParams(); | 299 ProfileParams(); |
276 ~ProfileParams(); | 300 ~ProfileParams(); |
277 | 301 |
278 base::FilePath path; | 302 base::FilePath path; |
279 IOThread* io_thread; | 303 IOThread* io_thread; |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 | 617 |
594 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. | 618 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. |
595 bool initialized_on_UI_thread_; | 619 bool initialized_on_UI_thread_; |
596 | 620 |
597 const Profile::ProfileType profile_type_; | 621 const Profile::ProfileType profile_type_; |
598 | 622 |
599 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); | 623 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); |
600 }; | 624 }; |
601 | 625 |
602 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 626 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
OLD | NEW |