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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 static BrowserContext* GetBrowserContextForShellUserId( | 162 static BrowserContext* GetBrowserContextForShellUserId( |
163 const std::string& user_id); | 163 const std::string& user_id); |
164 | 164 |
165 // Returns a Connector associated with this BrowserContext, which can be used | 165 // Returns a Connector associated with this BrowserContext, which can be used |
166 // to connect to service instances bound as this user. | 166 // to connect to service instances bound as this user. |
167 static shell::Connector* GetShellConnectorFor( | 167 static shell::Connector* GetShellConnectorFor( |
168 BrowserContext* browser_context); | 168 BrowserContext* browser_context); |
169 | 169 |
170 ~BrowserContext() override; | 170 ~BrowserContext() override; |
171 | 171 |
| 172 // Shuts down the storage partitions associated to this browser context. |
| 173 // This must be called before the browser context is actually destroyed |
| 174 // and before a clean-up task for its corresponding IO thread residents (e.g. |
| 175 // ResourceContext) is posted, so that the classes that hung on |
| 176 // StoragePartition can have time to do necessary cleanups on IO thread. |
| 177 void ShutdownStoragePartitions(); |
| 178 |
172 // Creates a delegate to initialize a HostZoomMap and persist its information. | 179 // Creates a delegate to initialize a HostZoomMap and persist its information. |
173 // This is called during creation of each StoragePartition. | 180 // This is called during creation of each StoragePartition. |
174 virtual std::unique_ptr<ZoomLevelDelegate> CreateZoomLevelDelegate( | 181 virtual std::unique_ptr<ZoomLevelDelegate> CreateZoomLevelDelegate( |
175 const base::FilePath& partition_path) = 0; | 182 const base::FilePath& partition_path) = 0; |
176 | 183 |
177 // Returns the path of the directory where this context's data is stored. | 184 // Returns the path of the directory where this context's data is stored. |
178 virtual base::FilePath GetPath() const = 0; | 185 virtual base::FilePath GetPath() const = 0; |
179 | 186 |
180 // Return whether this context is incognito. Default is false. | 187 // Return whether this context is incognito. Default is false. |
181 virtual bool IsOffTheRecord() const = 0; | 188 virtual bool IsOffTheRecord() const = 0; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 // called only once per partition_path. | 239 // called only once per partition_path. |
233 virtual net::URLRequestContextGetter* | 240 virtual net::URLRequestContextGetter* |
234 CreateMediaRequestContextForStoragePartition( | 241 CreateMediaRequestContextForStoragePartition( |
235 const base::FilePath& partition_path, | 242 const base::FilePath& partition_path, |
236 bool in_memory) = 0; | 243 bool in_memory) = 0; |
237 }; | 244 }; |
238 | 245 |
239 } // namespace content | 246 } // namespace content |
240 | 247 |
241 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 248 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
OLD | NEW |