Index: content/browser/browser_context.cc |
diff --git a/content/browser/browser_context.cc b/content/browser/browser_context.cc |
index 729df89e82c5aea8770db483dfdfbb6bdf806e55..59b0047b06762270ccd31eb0b1abae02ed25d0d7 100644 |
--- a/content/browser/browser_context.cc |
+++ b/content/browser/browser_context.cc |
@@ -486,10 +486,18 @@ BrowserContext::~BrowserContext() { |
<< "Attempting to destroy a BrowserContext that never called " |
<< "Initialize()"; |
+ DCHECK(!GetUserData(kStoragePartitionMapKeyName)) |
+ << "StoragePartitionMap is not shut down properly"; |
+ |
RemoveBrowserContextFromUserIdMap(this); |
if (GetUserData(kDownloadManagerKeyName)) |
GetDownloadManager(this)->Shutdown(); |
} |
+void BrowserContext::ShutdownStoragePartitions() { |
+ if (GetUserData(kStoragePartitionMapKeyName)) |
+ RemoveUserData(kStoragePartitionMapKeyName); |
+} |
+ |
} // namespace content |