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

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: More fixes on Albert's comments. 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
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..28e5b1c2b1c09ff940c0377f8632cc337ff1db5c 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::StoragePartitionDescriptor,
+ StoragePartitionImpl*,
+ StoragePartitionImpl::StoragePartitionDescriptorLess>
+ PartitionsMap;
Charlie Reis 2012/11/06 00:17:18 nit: 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_;
+ PartitionsMap partitions_;
+
+ // Boolean indicating whether we have initialized the ResourceContext for
+ // the |browser_context_| this map is associated with.
awong 2012/11/05 23:48:37 I would prefer something that states the valid sta
nasko 2012/11/06 01:21:52 Done.
+ bool resource_context_initialized_;
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698