Index: content/public/browser/browser_context.h |
diff --git a/content/public/browser/browser_context.h b/content/public/browser/browser_context.h |
index cfe4d53f5e396675460b1fb31f34bdbb0f0b9c68..36d2a01ae771123e81db5ca36b40143e4e38481a 100644 |
--- a/content/public/browser/browser_context.h |
+++ b/content/public/browser/browser_context.h |
@@ -5,6 +5,7 @@ |
#ifndef CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
#define CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
+#include "base/callback_forward.h" |
#include "base/hash_tables.h" |
#include "base/supports_user_data.h" |
#include "content/common/content_export.h" |
@@ -40,21 +41,19 @@ class DownloadManagerDelegate; |
class GeolocationPermissionContext; |
class IndexedDBContext; |
class ResourceContext; |
+class SiteInstance; |
class SpeechRecognitionPreferences; |
+class StoragePartition; |
// This class holds the context needed for a browsing session. |
// It lives on the UI thread. All these methods must only be called on the UI |
// thread. |
class CONTENT_EXPORT BrowserContext : public base::SupportsUserData { |
public: |
+ typedef base::Callback<void(const std::string&, StoragePartition*)> |
+ StoragePartitionCallback; |
static DownloadManager* GetDownloadManager(BrowserContext* browser_context); |
static quota::QuotaManager* GetQuotaManager(BrowserContext* browser_context); |
- static DOMStorageContext* GetDefaultDOMStorageContext( |
- BrowserContext* browser_context); |
- static DOMStorageContext* GetDOMStorageContext( |
- BrowserContext* browser_context, int renderer_child_id); |
- static content::DOMStorageContext* GetDOMStorageContextByPartitionId( |
- BrowserContext* browser_context, const std::string& partition_id); |
static IndexedDBContext* GetIndexedDBContext(BrowserContext* browser_context); |
static webkit_database::DatabaseTracker* GetDatabaseTracker( |
BrowserContext* browser_context); |
@@ -63,6 +62,17 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData { |
static fileapi::FileSystemContext* GetFileSystemContext( |
BrowserContext* browser_context); |
+ static content::StoragePartition* GetStoragePartition( |
+ BrowserContext* browser_context, SiteInstance* site_instance); |
+ static void ForEachStoragePartition( |
Charlie Reis
2012/08/14 18:50:12
Maybe add a comment here or on the callback typede
awong
2012/08/14 19:12:47
Right. Good idea.
|
+ BrowserContext* browser_context, |
+ const StoragePartitionCallback& callback); |
+ |
+ // DON'T USE THIS. GetDefaultStoragePartition() is going away. |
+ // Use GetStoragePartition() instead. Ask ajwong@ if you have problems. |
+ static content::StoragePartition* GetDefaultStoragePartition( |
+ BrowserContext* browser_context); |
+ |
// Ensures that the corresponding ResourceContext is initialized. Normally the |
// BrowserContext initializs the corresponding getters when its objects are |
// created, but if the embedder wants to pass the ResourceContext to another |