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

Unified Diff: content/browser/storage_partition_impl_map.cc

Issue 11308024: Fixing guest processes to use the proper storage partition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add comment to test. Created 8 years, 2 months 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.cc
diff --git a/content/browser/storage_partition_impl_map.cc b/content/browser/storage_partition_impl_map.cc
index 77fb9239c9063bd32de0e793a5d87b9b5bf1c5aa..43aec42a60d18ec581ae4b58d7df331b463ca90a 100644
--- a/content/browser/storage_partition_impl_map.cc
+++ b/content/browser/storage_partition_impl_map.cc
@@ -204,10 +204,15 @@ StoragePartitionImpl* StoragePartitionImplMap::Get(
if (it != partitions_.end())
return it->second;
- // There was no previous partition, so let's make a new one.
+ // There was no previous partition, so let's make a new one. The storage
+ // partition should be in memory for guest processes and OTR profiles.
+ bool in_memory = browser_context_->IsOffTheRecord() ||
+ StartsWithASCII(partition_id, "guest-", true);
+
StoragePartitionImpl* partition =
StoragePartitionImpl::Create(browser_context_, partition_id,
- browser_context_->GetPath());
+ browser_context_->GetPath(),
+ in_memory);
partitions_[partition_id] = partition;
// These calls must happen after StoragePartitionImpl::Create().

Powered by Google App Engine
This is Rietveld 408576698