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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "chrome/browser/devtools/devtools_network_controller_handle.h" | 23 #include "chrome/browser/devtools/devtools_network_controller_handle.h" |
24 #include "chrome/browser/io_thread.h" | 24 #include "chrome/browser/io_thread.h" |
25 #include "chrome/browser/profiles/profile.h" | 25 #include "chrome/browser/profiles/profile.h" |
26 #include "chrome/browser/profiles/storage_partition_descriptor.h" | 26 #include "chrome/browser/profiles/storage_partition_descriptor.h" |
27 #include "chrome/common/features.h" | 27 #include "chrome/common/features.h" |
28 #include "components/content_settings/core/common/content_settings_types.h" | 28 #include "components/content_settings/core/common/content_settings_types.h" |
29 #include "components/policy/core/browser/url_blacklist_manager.h" | 29 #include "components/policy/core/browser/url_blacklist_manager.h" |
30 #include "components/prefs/pref_member.h" | 30 #include "components/prefs/pref_member.h" |
31 #include "content/public/browser/content_browser_client.h" | 31 #include "content/public/browser/content_browser_client.h" |
32 #include "content/public/browser/resource_context.h" | 32 #include "content/public/browser/resource_context.h" |
| 33 #include "content/public/common/network_service.mojom.h" |
33 #include "extensions/features/features.h" | 34 #include "extensions/features/features.h" |
34 #include "net/cookies/cookie_monster.h" | 35 #include "net/cookies/cookie_monster.h" |
35 #include "net/http/http_cache.h" | 36 #include "net/http/http_cache.h" |
36 #include "net/http/http_network_session.h" | 37 #include "net/http/http_network_session.h" |
37 #include "net/url_request/url_request_context.h" | 38 #include "net/url_request/url_request_context.h" |
38 #include "net/url_request/url_request_interceptor.h" | 39 #include "net/url_request/url_request_interceptor.h" |
39 #include "net/url_request/url_request_job_factory.h" | 40 #include "net/url_request/url_request_job_factory.h" |
40 | 41 |
41 class ChromeHttpUserAgentSettings; | 42 class ChromeHttpUserAgentSettings; |
42 class ChromeNetworkDelegate; | 43 class ChromeNetworkDelegate; |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 }; | 302 }; |
302 | 303 |
303 // Created on the UI thread, read on the IO thread during ProfileIOData lazy | 304 // Created on the UI thread, read on the IO thread during ProfileIOData lazy |
304 // initialization. | 305 // initialization. |
305 struct ProfileParams { | 306 struct ProfileParams { |
306 ProfileParams(); | 307 ProfileParams(); |
307 ~ProfileParams(); | 308 ~ProfileParams(); |
308 | 309 |
309 base::FilePath path; | 310 base::FilePath path; |
310 IOThread* io_thread; | 311 IOThread* io_thread; |
| 312 |
| 313 // Used to configure the main URLRequestContext through the IOThread's |
| 314 // in-process network service. |
| 315 content::mojom::NetworkContextRequest main_network_context_request; |
| 316 content::mojom::NetworkContextParamsPtr main_network_context_params; |
| 317 |
311 scoped_refptr<content_settings::CookieSettings> cookie_settings; | 318 scoped_refptr<content_settings::CookieSettings> cookie_settings; |
312 scoped_refptr<HostContentSettingsMap> host_content_settings_map; | 319 scoped_refptr<HostContentSettingsMap> host_content_settings_map; |
313 scoped_refptr<net::SSLConfigService> ssl_config_service; | 320 scoped_refptr<net::SSLConfigService> ssl_config_service; |
314 scoped_refptr<net::CookieMonsterDelegate> cookie_monster_delegate; | 321 scoped_refptr<net::CookieMonsterDelegate> cookie_monster_delegate; |
315 #if BUILDFLAG(ENABLE_EXTENSIONS) | 322 #if BUILDFLAG(ENABLE_EXTENSIONS) |
316 scoped_refptr<extensions::InfoMap> extension_info_map; | 323 scoped_refptr<extensions::InfoMap> extension_info_map; |
317 #endif | 324 #endif |
318 std::unique_ptr<chrome_browser_net::LoadingPredictorObserver> | 325 std::unique_ptr<chrome_browser_net::LoadingPredictorObserver> |
319 loading_predictor_observer_; | 326 loading_predictor_observer_; |
320 | 327 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 std::unique_ptr<ChromeURLRequestContextGetterVector> context_getters); | 399 std::unique_ptr<ChromeURLRequestContextGetterVector> context_getters); |
393 | 400 |
394 void set_data_reduction_proxy_io_data( | 401 void set_data_reduction_proxy_io_data( |
395 std::unique_ptr<data_reduction_proxy::DataReductionProxyIOData> | 402 std::unique_ptr<data_reduction_proxy::DataReductionProxyIOData> |
396 data_reduction_proxy_io_data) const; | 403 data_reduction_proxy_io_data) const; |
397 | 404 |
398 void set_previews_io_data( | 405 void set_previews_io_data( |
399 std::unique_ptr<previews::PreviewsIOData> previews_io_data) const; | 406 std::unique_ptr<previews::PreviewsIOData> previews_io_data) const; |
400 | 407 |
401 net::URLRequestContext* main_request_context() const { | 408 net::URLRequestContext* main_request_context() const { |
402 return main_request_context_.get(); | 409 return main_request_context_; |
403 } | 410 } |
404 | 411 |
405 bool initialized() const { | 412 bool initialized() const { |
406 return initialized_; | 413 return initialized_; |
407 } | 414 } |
408 | 415 |
409 // Destroys the ResourceContext first, to cancel any URLRequests that are | 416 // Destroys the ResourceContext first, to cancel any URLRequests that are |
410 // using it still, before we destroy the member variables that those | 417 // using it still, before we destroy the member variables that those |
411 // URLRequests may be accessing. | 418 // URLRequests may be accessing. |
412 void DestroyResourceContext(); | 419 void DestroyResourceContext(); |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
576 #if defined(OS_CHROMEOS) | 583 #if defined(OS_CHROMEOS) |
577 // Set to |cert_verifier_| if it references a PolicyCertVerifier. In that | 584 // Set to |cert_verifier_| if it references a PolicyCertVerifier. In that |
578 // case, the verifier is owned by |cert_verifier_|. Otherwise, set to NULL. | 585 // case, the verifier is owned by |cert_verifier_|. Otherwise, set to NULL. |
579 mutable std::unique_ptr<net::CertVerifier> cert_verifier_; | 586 mutable std::unique_ptr<net::CertVerifier> cert_verifier_; |
580 mutable policy::PolicyCertVerifier* policy_cert_verifier_; | 587 mutable policy::PolicyCertVerifier* policy_cert_verifier_; |
581 mutable std::string username_hash_; | 588 mutable std::string username_hash_; |
582 mutable bool use_system_key_slot_; | 589 mutable bool use_system_key_slot_; |
583 mutable std::unique_ptr<chromeos::CertificateProvider> certificate_provider_; | 590 mutable std::unique_ptr<chromeos::CertificateProvider> certificate_provider_; |
584 #endif | 591 #endif |
585 | 592 |
586 mutable std::unique_ptr<net::URLRequestContext> main_request_context_; | 593 // The NetworkContext that owns and configures |main_request_context_|. It's |
| 594 // set up through IOThread's NetworkService. |
| 595 mutable std::unique_ptr<content::mojom::NetworkContext> main_network_context_; |
| 596 mutable net::URLRequestContext* main_request_context_; |
587 | 597 |
588 // Pointed to by the TransportSecurityState (owned by | 598 // Pointed to by the TransportSecurityState (owned by |
589 // URLRequestContextStorage), and must be disconnected from it before it's | 599 // URLRequestContextStorage), and must be disconnected from it before it's |
590 // destroyed. | 600 // destroyed. |
591 mutable std::unique_ptr<net::ReportSender> certificate_report_sender_; | 601 mutable std::unique_ptr<net::ReportSender> certificate_report_sender_; |
592 mutable std::unique_ptr<certificate_transparency::CTPolicyManager> | 602 mutable std::unique_ptr<certificate_transparency::CTPolicyManager> |
593 ct_policy_manager_; | 603 ct_policy_manager_; |
594 | 604 |
595 mutable std::unique_ptr<net::URLRequestContext> extensions_request_context_; | 605 mutable std::unique_ptr<net::URLRequestContext> extensions_request_context_; |
596 // One URLRequestContext per isolated app for main and media requests. | 606 // One URLRequestContext per isolated app for main and media requests. |
(...skipping 23 matching lines...) Expand all Loading... |
620 mutable std::unique_ptr<certificate_transparency::TreeStateTracker> | 630 mutable std::unique_ptr<certificate_transparency::TreeStateTracker> |
621 ct_tree_tracker_; | 631 ct_tree_tracker_; |
622 mutable base::Closure ct_tree_tracker_unregistration_; | 632 mutable base::Closure ct_tree_tracker_unregistration_; |
623 | 633 |
624 const Profile::ProfileType profile_type_; | 634 const Profile::ProfileType profile_type_; |
625 | 635 |
626 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); | 636 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); |
627 }; | 637 }; |
628 | 638 |
629 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 639 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
OLD | NEW |