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

Unified Diff: content/browser/storage_partition_impl_map.h

Issue 11234032: Webview tag creation should be using storage partitions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disabling session storage test for isolated apps. Created 8 years, 1 month 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
« no previous file with comments | « content/browser/storage_partition_impl.cc ('k') | content/browser/storage_partition_impl_map.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/storage_partition_impl_map.h
diff --git a/content/browser/storage_partition_impl_map.h b/content/browser/storage_partition_impl_map.h
index 9e5c6d624cd954903f31f7913f3f8298a75035ad..14b78ceebb78938298a3d7032088ff6683fa0a0b 100644
--- a/content/browser/storage_partition_impl_map.h
+++ b/content/browser/storage_partition_impl_map.h
@@ -10,6 +10,7 @@
#include "base/callback_forward.h"
#include "base/supports_user_data.h"
+#include "content/browser/storage_partition_impl.h"
#include "content/public/browser/browser_context.h"
class FilePath;
@@ -17,7 +18,6 @@ class FilePath;
namespace content {
class BrowserContext;
-class StoragePartitionImpl;
// A std::string to StoragePartition map for use with SupportsUserData APIs.
class StoragePartitionImplMap : public base::SupportsUserData::Data {
@@ -27,11 +27,18 @@ class StoragePartitionImplMap : public base::SupportsUserData::Data {
virtual ~StoragePartitionImplMap();
// This map retains ownership of the returned StoragePartition objects.
- StoragePartitionImpl* Get(const std::string& partition_id);
+ StoragePartitionImpl* Get(const std::string& partition_domain,
+ const std::string& partition_name,
+ bool in_memory);
void ForEach(const BrowserContext::StoragePartitionCallback& callback);
private:
+ typedef std::map<StoragePartitionImpl::StoragePartitionConfig,
+ StoragePartitionImpl*,
+ StoragePartitionImpl::StoragePartitionConfigLess>
+ PartitionMap;
+
// This must always be called *after* |partition| has been added to the
// partitions_.
//
@@ -41,7 +48,11 @@ class StoragePartitionImplMap : public base::SupportsUserData::Data {
void PostCreateInitialization(StoragePartitionImpl* partition);
BrowserContext* browser_context_; // Not Owned.
- std::map<std::string, StoragePartitionImpl*> partitions_;
+ PartitionMap partitions_;
+
+ // Set to true when the ResourceContext for the associated |browser_context_|
+ // is initialized. Can never return to false.
+ bool resource_context_initialized_;
};
} // namespace content
« no previous file with comments | « content/browser/storage_partition_impl.cc ('k') | content/browser/storage_partition_impl_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698