| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 class TransportSecurityState; | 88 class TransportSecurityState; |
| 89 class URLRequestJobFactoryImpl; | 89 class URLRequestJobFactoryImpl; |
| 90 } // namespace net | 90 } // namespace net |
| 91 | 91 |
| 92 namespace policy { | 92 namespace policy { |
| 93 class PolicyCertVerifier; | 93 class PolicyCertVerifier; |
| 94 class PolicyHeaderIOHelper; | 94 class PolicyHeaderIOHelper; |
| 95 class URLBlacklistManager; | 95 class URLBlacklistManager; |
| 96 } // namespace policy | 96 } // namespace policy |
| 97 | 97 |
| 98 namespace previews { | |
| 99 class PreviewsIOData; | |
| 100 } | |
| 101 | |
| 102 // Conceptually speaking, the ProfileIOData represents data that lives on the IO | 98 // Conceptually speaking, the ProfileIOData represents data that lives on the IO |
| 103 // thread that is owned by a Profile, such as, but not limited to, network | 99 // thread that is owned by a Profile, such as, but not limited to, network |
| 104 // objects like CookieMonster, HttpTransactionFactory, etc. Profile owns | 100 // objects like CookieMonster, HttpTransactionFactory, etc. Profile owns |
| 105 // ProfileIOData, but will make sure to delete it on the IO thread (except | 101 // ProfileIOData, but will make sure to delete it on the IO thread (except |
| 106 // possibly in unit tests where there is no IO thread). | 102 // possibly in unit tests where there is no IO thread). |
| 107 class ProfileIOData { | 103 class ProfileIOData { |
| 108 public: | 104 public: |
| 109 typedef std::vector<scoped_refptr<ChromeURLRequestContextGetter>> | 105 typedef std::vector<scoped_refptr<ChromeURLRequestContextGetter>> |
| 110 ChromeURLRequestContextGetterVector; | 106 ChromeURLRequestContextGetterVector; |
| 111 | 107 |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 client_cert_store_factory_ = factory; | 246 client_cert_store_factory_ = factory; |
| 251 } | 247 } |
| 252 | 248 |
| 253 bool IsDataReductionProxyEnabled() const; | 249 bool IsDataReductionProxyEnabled() const; |
| 254 | 250 |
| 255 data_reduction_proxy::DataReductionProxyIOData* | 251 data_reduction_proxy::DataReductionProxyIOData* |
| 256 data_reduction_proxy_io_data() const { | 252 data_reduction_proxy_io_data() const { |
| 257 return data_reduction_proxy_io_data_.get(); | 253 return data_reduction_proxy_io_data_.get(); |
| 258 } | 254 } |
| 259 | 255 |
| 260 previews::PreviewsIOData* previews_io_data() const { | |
| 261 return previews_io_data_.get(); | |
| 262 } | |
| 263 | |
| 264 // This function is to be used to check if the |url| is defined in | 256 // This function is to be used to check if the |url| is defined in |
| 265 // blacklist or whitelist policy. | 257 // blacklist or whitelist policy. |
| 266 virtual policy::URLBlacklist::URLBlacklistState GetURLBlacklistState( | 258 virtual policy::URLBlacklist::URLBlacklistState GetURLBlacklistState( |
| 267 const GURL& url) const; | 259 const GURL& url) const; |
| 268 | 260 |
| 269 // Returns the predictor service for this Profile. Returns nullptr if there is | 261 // Returns the predictor service for this Profile. Returns nullptr if there is |
| 270 // no Predictor, as is the case with OffTheRecord profiles. | 262 // no Predictor, as is the case with OffTheRecord profiles. |
| 271 virtual chrome_browser_net::Predictor* GetPredictor(); | 263 virtual chrome_browser_net::Predictor* GetPredictor(); |
| 272 | 264 |
| 273 // Get platform ClientCertStore. May return nullptr. | 265 // Get platform ClientCertStore. May return nullptr. |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 // ProfileIOData, and the derived class calls this method to set the | 382 // ProfileIOData, and the derived class calls this method to set the |
| 391 // channel_id_service_ member and transfers ownership to the base | 383 // channel_id_service_ member and transfers ownership to the base |
| 392 // class. | 384 // class. |
| 393 void set_channel_id_service( | 385 void set_channel_id_service( |
| 394 net::ChannelIDService* channel_id_service) const; | 386 net::ChannelIDService* channel_id_service) const; |
| 395 | 387 |
| 396 void set_data_reduction_proxy_io_data( | 388 void set_data_reduction_proxy_io_data( |
| 397 std::unique_ptr<data_reduction_proxy::DataReductionProxyIOData> | 389 std::unique_ptr<data_reduction_proxy::DataReductionProxyIOData> |
| 398 data_reduction_proxy_io_data) const; | 390 data_reduction_proxy_io_data) const; |
| 399 | 391 |
| 400 void set_previews_io_data( | |
| 401 std::unique_ptr<previews::PreviewsIOData> previews_io_data) const; | |
| 402 | |
| 403 net::ProxyService* proxy_service() const { | 392 net::ProxyService* proxy_service() const { |
| 404 return proxy_service_.get(); | 393 return proxy_service_.get(); |
| 405 } | 394 } |
| 406 | 395 |
| 407 net::HttpServerProperties* http_server_properties() const; | 396 net::HttpServerProperties* http_server_properties() const; |
| 408 | 397 |
| 409 void set_http_server_properties( | 398 void set_http_server_properties( |
| 410 std::unique_ptr<net::HttpServerProperties> http_server_properties) const; | 399 std::unique_ptr<net::HttpServerProperties> http_server_properties) const; |
| 411 | 400 |
| 412 net::URLRequestContext* main_request_context() const { | 401 net::URLRequestContext* main_request_context() const { |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 | 559 |
| 571 // Pointed to by URLRequestContext. | 560 // Pointed to by URLRequestContext. |
| 572 #if defined(ENABLE_EXTENSIONS) | 561 #if defined(ENABLE_EXTENSIONS) |
| 573 mutable scoped_refptr<extensions::InfoMap> extension_info_map_; | 562 mutable scoped_refptr<extensions::InfoMap> extension_info_map_; |
| 574 #endif | 563 #endif |
| 575 mutable std::unique_ptr<net::ChannelIDService> channel_id_service_; | 564 mutable std::unique_ptr<net::ChannelIDService> channel_id_service_; |
| 576 | 565 |
| 577 mutable std::unique_ptr<data_reduction_proxy::DataReductionProxyIOData> | 566 mutable std::unique_ptr<data_reduction_proxy::DataReductionProxyIOData> |
| 578 data_reduction_proxy_io_data_; | 567 data_reduction_proxy_io_data_; |
| 579 | 568 |
| 580 mutable std::unique_ptr<previews::PreviewsIOData> previews_io_data_; | |
| 581 | |
| 582 mutable std::unique_ptr<net::ProxyService> proxy_service_; | 569 mutable std::unique_ptr<net::ProxyService> proxy_service_; |
| 583 mutable std::unique_ptr<net::TransportSecurityState> | 570 mutable std::unique_ptr<net::TransportSecurityState> |
| 584 transport_security_state_; | 571 transport_security_state_; |
| 585 mutable std::unique_ptr<net::CTVerifier> cert_transparency_verifier_; | 572 mutable std::unique_ptr<net::CTVerifier> cert_transparency_verifier_; |
| 586 mutable std::unique_ptr<ChromeExpectCTReporter> expect_ct_reporter_; | 573 mutable std::unique_ptr<ChromeExpectCTReporter> expect_ct_reporter_; |
| 587 mutable std::unique_ptr<net::HttpServerProperties> http_server_properties_; | 574 mutable std::unique_ptr<net::HttpServerProperties> http_server_properties_; |
| 588 #if defined(OS_CHROMEOS) | 575 #if defined(OS_CHROMEOS) |
| 589 // Set to |cert_verifier_| if it references a PolicyCertVerifier. In that | 576 // Set to |cert_verifier_| if it references a PolicyCertVerifier. In that |
| 590 // case, the verifier is owned by |cert_verifier_|. Otherwise, set to NULL. | 577 // case, the verifier is owned by |cert_verifier_|. Otherwise, set to NULL. |
| 591 mutable std::unique_ptr<net::CertVerifier> cert_verifier_; | 578 mutable std::unique_ptr<net::CertVerifier> cert_verifier_; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 mutable std::unique_ptr<certificate_transparency::TreeStateTracker> | 625 mutable std::unique_ptr<certificate_transparency::TreeStateTracker> |
| 639 ct_tree_tracker_; | 626 ct_tree_tracker_; |
| 640 mutable base::Closure ct_tree_tracker_unregistration_; | 627 mutable base::Closure ct_tree_tracker_unregistration_; |
| 641 | 628 |
| 642 const Profile::ProfileType profile_type_; | 629 const Profile::ProfileType profile_type_; |
| 643 | 630 |
| 644 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); | 631 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); |
| 645 }; | 632 }; |
| 646 | 633 |
| 647 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 634 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
| OLD | NEW |