| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_WEB_PUBLIC_BROWSER_STATE_H_ | 5 #ifndef IOS_WEB_PUBLIC_BROWSER_STATE_H_ |
| 6 #define IOS_WEB_PUBLIC_BROWSER_STATE_H_ | 6 #define IOS_WEB_PUBLIC_BROWSER_STATE_H_ |
| 7 | 7 |
| 8 #include "base/supports_user_data.h" | 8 #include "base/supports_user_data.h" |
| 9 | 9 |
| 10 namespace base { | 10 namespace base { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 // It lives on the UI thread. All these methods must only be called on the UI | 27 // It lives on the UI thread. All these methods must only be called on the UI |
| 28 // thread. | 28 // thread. |
| 29 class BrowserState : public base::SupportsUserData { | 29 class BrowserState : public base::SupportsUserData { |
| 30 public: | 30 public: |
| 31 ~BrowserState() override; | 31 ~BrowserState() override; |
| 32 | 32 |
| 33 // static | 33 // static |
| 34 static scoped_refptr<CertificatePolicyCache> GetCertificatePolicyCache( | 34 static scoped_refptr<CertificatePolicyCache> GetCertificatePolicyCache( |
| 35 BrowserState* browser_state); | 35 BrowserState* browser_state); |
| 36 | 36 |
| 37 // Returns whether |browser_state_| has an associated ActiveStateManager. |
| 38 // Must only be accessed from main thread. |
| 39 static bool HasActiveStateManager(BrowserState* browser_state); |
| 40 |
| 37 // Returns the ActiveStateManager associated with |browser_state.| | 41 // Returns the ActiveStateManager associated with |browser_state.| |
| 38 // Lazily creates one if an ActiveStateManager is not already associated with | 42 // Lazily creates one if an ActiveStateManager is not already associated with |
| 39 // the |browser_state|. |browser_state| cannot be a nullptr. Must be accessed | 43 // the |browser_state|. |browser_state| cannot be a nullptr. Must be accessed |
| 40 // only from the main thread. | 44 // only from the main thread. |
| 41 static ActiveStateManager* GetActiveStateManager(BrowserState* browser_state); | 45 static ActiveStateManager* GetActiveStateManager(BrowserState* browser_state); |
| 42 | 46 |
| 43 // Returns the BrowsingDataPartition associated with this browser_state. | 47 // Returns the BrowsingDataPartition associated with this browser_state. |
| 44 // Lazily creates one if a BrowsingDataPartition is not already associated | 48 // Lazily creates one if a BrowsingDataPartition is not already associated |
| 45 // with the |browser_state|. |browser_state| cannot be a nullptr. Must be | 49 // with the |browser_state|. |browser_state| cannot be a nullptr. Must be |
| 46 // accessed only from the main thread. | 50 // accessed only from the main thread. |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 | 83 |
| 80 // The URLDataManagerIOSBackend instance associated with this BrowserState. | 84 // The URLDataManagerIOSBackend instance associated with this BrowserState. |
| 81 // Created and destroyed on the IO thread, and should be accessed only from | 85 // Created and destroyed on the IO thread, and should be accessed only from |
| 82 // the IO thread. | 86 // the IO thread. |
| 83 URLDataManagerIOSBackend* url_data_manager_ios_backend_; | 87 URLDataManagerIOSBackend* url_data_manager_ios_backend_; |
| 84 }; | 88 }; |
| 85 | 89 |
| 86 } // namespace web | 90 } // namespace web |
| 87 | 91 |
| 88 #endif // IOS_WEB_PUBLIC_BROWSER_STATE_H_ | 92 #endif // IOS_WEB_PUBLIC_BROWSER_STATE_H_ |
| OLD | NEW |