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

Unified Diff: content/public/browser/browser_context.h

Issue 10837230: Move StoragePartition into content/public and remove BrowserContext::GetDOMStorageContext(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: style fixes. Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698