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 CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
6 #define CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 static void SaveSessionState(BrowserContext* browser_context); | 126 static void SaveSessionState(BrowserContext* browser_context); |
127 | 127 |
128 static void SetDownloadManagerForTesting(BrowserContext* browser_context, | 128 static void SetDownloadManagerForTesting(BrowserContext* browser_context, |
129 DownloadManager* download_manager); | 129 DownloadManager* download_manager); |
130 | 130 |
131 // Makes mojo aware of this BrowserContext, and assigns a user ID number to | 131 // Makes mojo aware of this BrowserContext, and assigns a user ID number to |
132 // it. Should be called for each BrowserContext created. | 132 // it. Should be called for each BrowserContext created. |
133 static void Initialize(BrowserContext* browser_context, | 133 static void Initialize(BrowserContext* browser_context, |
134 const base::FilePath& path); | 134 const base::FilePath& path); |
135 | 135 |
136 // Returns a randomized user ID number associated with this | 136 // Returns a Mojo User ID associated with this BrowserContext. This ID is not |
137 // BrowserContext. This ID is not persistent across runs. | 137 // persistent across runs. See mojo/shell/public/interfaces/connector.mojom. |
138 static uint32_t GetMojoUserIdFor(BrowserContext* browser_context); | 138 static const std::string& GetMojoUserIdFor(BrowserContext* browser_context); |
139 | 139 |
140 ~BrowserContext() override; | 140 ~BrowserContext() override; |
141 | 141 |
142 // Creates a delegate to initialize a HostZoomMap and persist its information. | 142 // Creates a delegate to initialize a HostZoomMap and persist its information. |
143 // This is called during creation of each StoragePartition. | 143 // This is called during creation of each StoragePartition. |
144 virtual scoped_ptr<ZoomLevelDelegate> CreateZoomLevelDelegate( | 144 virtual scoped_ptr<ZoomLevelDelegate> CreateZoomLevelDelegate( |
145 const base::FilePath& partition_path) = 0; | 145 const base::FilePath& partition_path) = 0; |
146 | 146 |
147 // Returns the path of the directory where this context's data is stored. | 147 // Returns the path of the directory where this context's data is stored. |
148 virtual base::FilePath GetPath() const = 0; | 148 virtual base::FilePath GetPath() const = 0; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 virtual PermissionManager* GetPermissionManager() = 0; | 205 virtual PermissionManager* GetPermissionManager() = 0; |
206 | 206 |
207 // Returns the BackgroundSyncController associated with that context if any, | 207 // Returns the BackgroundSyncController associated with that context if any, |
208 // nullptr otherwise. | 208 // nullptr otherwise. |
209 virtual BackgroundSyncController* GetBackgroundSyncController() = 0; | 209 virtual BackgroundSyncController* GetBackgroundSyncController() = 0; |
210 }; | 210 }; |
211 | 211 |
212 } // namespace content | 212 } // namespace content |
213 | 213 |
214 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 214 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
OLD | NEW |