Index: content/browser/browser_context.cc |
diff --git a/content/browser/browser_context.cc b/content/browser/browser_context.cc |
index d8bc87e317698c9ec9f9b898e224bff9ccafc207..94cf92b4748ad0a736f4a56986fd79aeea24d2b4 100644 |
--- a/content/browser/browser_context.cc |
+++ b/content/browser/browser_context.cc |
@@ -37,11 +37,8 @@ namespace { |
const char* kDownloadManagerKeyName = "download_manager"; |
const char* kStorageParitionMapKeyName = "content_storage_partition_map"; |
-StoragePartition* GetStoragePartitionFromConfig( |
- BrowserContext* browser_context, |
- const std::string& partition_domain, |
- const std::string& partition_name, |
- bool in_memory) { |
+StoragePartitionImplMap* GetStoragePartitionMap( |
+ BrowserContext* browser_context) { |
StoragePartitionImplMap* partition_map = |
static_cast<StoragePartitionImplMap*>( |
browser_context->GetUserData(kStorageParitionMapKeyName)); |
@@ -49,6 +46,16 @@ StoragePartition* GetStoragePartitionFromConfig( |
partition_map = new StoragePartitionImplMap(browser_context); |
browser_context->SetUserData(kStorageParitionMapKeyName, partition_map); |
} |
+ return partition_map; |
+} |
+ |
+StoragePartition* GetStoragePartitionFromConfig( |
+ BrowserContext* browser_context, |
+ const std::string& partition_domain, |
+ const std::string& partition_name, |
+ bool in_memory) { |
+ StoragePartitionImplMap* partition_map = |
+ GetStoragePartitionMap(browser_context); |
if (browser_context->IsOffTheRecord()) |
in_memory = true; |
@@ -84,6 +91,13 @@ void PurgeMemoryOnIOThread(appcache::AppCacheService* appcache_service) { |
} // namespace |
+// static |
+void BrowserContext::AsyncObliterateStoragePartition( |
+ BrowserContext* browser_context, |
+ const GURL& site) { |
+ GetStoragePartitionMap(browser_context)->AsyncObliterate(site); |
+} |
+ |
DownloadManager* BrowserContext::GetDownloadManager( |
BrowserContext* context) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |