Chromium Code Reviews| 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 |