| 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> |
| 11 #include <memory> | 11 #include <memory> |
| 12 #include <string> | 12 #include <string> |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "base/callback_forward.h" | 15 #include "base/callback_forward.h" |
| 16 #include "base/files/file_path.h" | 16 #include "base/files/file_path.h" |
| 17 #include "base/macros.h" | 17 #include "base/macros.h" |
| 18 #include "base/memory/ref_counted.h" | 18 #include "base/memory/ref_counted.h" |
| 19 #include "base/memory/weak_ptr.h" | 19 #include "base/memory/weak_ptr.h" |
| 20 #include "base/synchronization/lock.h" | 20 #include "base/synchronization/lock.h" |
| 21 #include "build/build_config.h" | 21 #include "build/build_config.h" |
| 22 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" | 22 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
| 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/net_http_session_params_observer.h" |
| 25 #include "chrome/browser/profiles/profile.h" | 26 #include "chrome/browser/profiles/profile.h" |
| 26 #include "chrome/browser/profiles/storage_partition_descriptor.h" | 27 #include "chrome/browser/profiles/storage_partition_descriptor.h" |
| 27 #include "chrome/common/features.h" | 28 #include "chrome/common/features.h" |
| 28 #include "components/content_settings/core/common/content_settings_types.h" | 29 #include "components/content_settings/core/common/content_settings_types.h" |
| 29 #include "components/policy/core/browser/url_blacklist_manager.h" | 30 #include "components/policy/core/browser/url_blacklist_manager.h" |
| 30 #include "components/prefs/pref_member.h" | 31 #include "components/prefs/pref_member.h" |
| 31 #include "content/public/browser/content_browser_client.h" | 32 #include "content/public/browser/content_browser_client.h" |
| 32 #include "content/public/browser/resource_context.h" | 33 #include "content/public/browser/resource_context.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" |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 virtual policy::URLBlacklist::URLBlacklistState GetURLBlacklistState( | 258 virtual policy::URLBlacklist::URLBlacklistState GetURLBlacklistState( |
| 258 const GURL& url) const; | 259 const GURL& url) const; |
| 259 | 260 |
| 260 // 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 |
| 261 // no Predictor, as is the case with OffTheRecord profiles. | 262 // no Predictor, as is the case with OffTheRecord profiles. |
| 262 virtual chrome_browser_net::Predictor* GetPredictor(); | 263 virtual chrome_browser_net::Predictor* GetPredictor(); |
| 263 | 264 |
| 264 // Get platform ClientCertStore. May return nullptr. | 265 // Get platform ClientCertStore. May return nullptr. |
| 265 std::unique_ptr<net::ClientCertStore> CreateClientCertStore(); | 266 std::unique_ptr<net::ClientCertStore> CreateClientCertStore(); |
| 266 | 267 |
| 268 // Called on IO thread thread when net parameters change (e.g. due to policy). |
| 269 void UpdateNetParamsOnIOThread( |
| 270 net::HttpNetworkSession::ParamsUpdate params_update); |
| 271 |
| 267 protected: | 272 protected: |
| 268 // A URLRequestContext for media that owns its HTTP factory, to ensure | 273 // A URLRequestContext for media that owns its HTTP factory, to ensure |
| 269 // it is deleted. | 274 // it is deleted. |
| 270 class MediaRequestContext : public net::URLRequestContext { | 275 class MediaRequestContext : public net::URLRequestContext { |
| 271 public: | 276 public: |
| 272 // |name| is used to describe this context. Currently there are two kinds of | 277 // |name| is used to describe this context. Currently there are two kinds of |
| 273 // media request context -- main media request context ("main_meda") and | 278 // media request context -- main media request context ("main_meda") and |
| 274 // isolated app media request context ("isolated_media"). | 279 // isolated app media request context ("isolated_media"). |
| 275 explicit MediaRequestContext(const std::string& name); | 280 explicit MediaRequestContext(const std::string& name); |
| 276 | 281 |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 545 mutable BooleanPrefMember sync_disabled_; | 550 mutable BooleanPrefMember sync_disabled_; |
| 546 mutable BooleanPrefMember signin_allowed_; | 551 mutable BooleanPrefMember signin_allowed_; |
| 547 mutable IntegerPrefMember network_prediction_options_; | 552 mutable IntegerPrefMember network_prediction_options_; |
| 548 // TODO(marja): Remove session_startup_pref_ if no longer needed. | 553 // TODO(marja): Remove session_startup_pref_ if no longer needed. |
| 549 mutable IntegerPrefMember session_startup_pref_; | 554 mutable IntegerPrefMember session_startup_pref_; |
| 550 mutable BooleanPrefMember quick_check_enabled_; | 555 mutable BooleanPrefMember quick_check_enabled_; |
| 551 mutable IntegerPrefMember incognito_availibility_pref_; | 556 mutable IntegerPrefMember incognito_availibility_pref_; |
| 552 | 557 |
| 553 BooleanPrefMember enable_metrics_; | 558 BooleanPrefMember enable_metrics_; |
| 554 | 559 |
| 560 // Observes profile's preference for changes to prefs which affect |
| 561 // HttpNetworkSession params. |
| 562 std::unique_ptr<NetHttpSessionParamsObserver> |
| 563 net_http_session_params_observer_; |
| 564 |
| 555 // Pointed to by NetworkDelegate. | 565 // Pointed to by NetworkDelegate. |
| 556 mutable std::unique_ptr<policy::URLBlacklistManager> url_blacklist_manager_; | 566 mutable std::unique_ptr<policy::URLBlacklistManager> url_blacklist_manager_; |
| 557 mutable std::unique_ptr<policy::PolicyHeaderIOHelper> policy_header_helper_; | 567 mutable std::unique_ptr<policy::PolicyHeaderIOHelper> policy_header_helper_; |
| 558 | 568 |
| 559 // Pointed to by URLRequestContext. | 569 // Pointed to by URLRequestContext. |
| 560 #if BUILDFLAG(ENABLE_EXTENSIONS) | 570 #if BUILDFLAG(ENABLE_EXTENSIONS) |
| 561 mutable scoped_refptr<extensions::InfoMap> extension_info_map_; | 571 mutable scoped_refptr<extensions::InfoMap> extension_info_map_; |
| 562 #endif | 572 #endif |
| 563 | 573 |
| 564 mutable std::unique_ptr<data_reduction_proxy::DataReductionProxyIOData> | 574 mutable std::unique_ptr<data_reduction_proxy::DataReductionProxyIOData> |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 627 mutable std::unique_ptr<certificate_transparency::TreeStateTracker> | 637 mutable std::unique_ptr<certificate_transparency::TreeStateTracker> |
| 628 ct_tree_tracker_; | 638 ct_tree_tracker_; |
| 629 mutable base::Closure ct_tree_tracker_unregistration_; | 639 mutable base::Closure ct_tree_tracker_unregistration_; |
| 630 | 640 |
| 631 const Profile::ProfileType profile_type_; | 641 const Profile::ProfileType profile_type_; |
| 632 | 642 |
| 633 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); | 643 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); |
| 634 }; | 644 }; |
| 635 | 645 |
| 636 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 646 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
| OLD | NEW |