Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Side by Side Diff: ios/web/public/browser_state.h

Issue 1547393002: [iOS] Add a HasActiveStateManager method to BrowserState. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comment Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ios/web/browser_state.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « ios/web/browser_state.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698