Chromium Code Reviews| Index: content/browser/storage_partition_impl.cc |
| diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc |
| index 7ba19db086d3e608d288eec93a9530ff70a6b603..1962acc8b18bb4a762304dc3ea20da8887593d8e 100644 |
| --- a/content/browser/storage_partition_impl.cc |
| +++ b/content/browser/storage_partition_impl.cc |
| @@ -95,6 +95,11 @@ StoragePartitionImpl* StoragePartitionImpl::Create( |
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) || |
| !BrowserThread::IsMessageLoopValid(BrowserThread::UI)); |
| + // The storage partition should be only in memory for guest processes |
| + // and OTR profiles. |
| + bool in_memory = (partition_id.find("guest-") != std::string::npos) || |
|
Charlie Reis
2012/10/27 00:48:27
Albert noted this shouldn't use find.
|
| + context->IsOffTheRecord(); |
|
Charlie Reis
2012/10/27 00:48:27
nit: Wrong indent.
|
| + |
| FilePath partition_path = |
| profile_path.Append(GetPartitionPath(partition_id)); |
| @@ -104,7 +109,7 @@ StoragePartitionImpl* StoragePartitionImpl::Create( |
| // that utilizes the QuotaManager. |
| scoped_refptr<quota::QuotaManager> quota_manager = |
| new quota::QuotaManager( |
| - context->IsOffTheRecord(), partition_path, |
| + in_memory, partition_path, |
| BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), |
| BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB), |
| context->GetSpecialStoragePolicy()); |
| @@ -112,17 +117,17 @@ StoragePartitionImpl* StoragePartitionImpl::Create( |
| // Each consumer is responsible for registering its QuotaClient during |
| // its construction. |
| scoped_refptr<fileapi::FileSystemContext> filesystem_context = |
| - CreateFileSystemContext(partition_path, context->IsOffTheRecord(), |
| + CreateFileSystemContext(partition_path, in_memory, |
| context->GetSpecialStoragePolicy(), |
| quota_manager->proxy()); |
| scoped_refptr<webkit_database::DatabaseTracker> database_tracker = |
| new webkit_database::DatabaseTracker( |
| - partition_path, context->IsOffTheRecord(), |
| + partition_path, in_memory, |
| context->GetSpecialStoragePolicy(), quota_manager->proxy(), |
| BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)); |
| - FilePath path = context->IsOffTheRecord() ? FilePath() : partition_path; |
| + FilePath path = in_memory ? FilePath() : partition_path; |
| scoped_refptr<DOMStorageContextImpl> dom_storage_context = |
| new DOMStorageContextImpl(path, context->GetSpecialStoragePolicy()); |