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

Unified Diff: content/browser/storage_partition_impl_map.cc

Issue 10913265: Redo the Storage Partition directory layout to support guest tags and origin based partitions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo Created 8 years, 3 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
« no previous file with comments | « content/browser/storage_partition_impl_map.h ('k') | content/public/browser/storage_partition.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b1ba82c3bc2fea5c60ba5d49637704f18f14147f..f943a5f4d1a0ad8b8e5ffe9620962c06338d6879 100644
--- a/content/browser/storage_partition_impl_map.cc
+++ b/content/browser/storage_partition_impl_map.cc
@@ -38,23 +38,17 @@ StoragePartitionImpl* StoragePartitionImplMap::Get(
return it->second;
// There was no previous partition, so let's make a new one.
- FilePath partition_path = browser_context_->GetPath();
- if (!partition_id.empty()) {
- // TODO(ajwong): This should check the path is valid?
- CHECK(IsStringASCII(partition_id));
- partition_path = partition_path.Append(kStoragePartitionDirname)
- .AppendASCII(partition_id);
- }
-
StoragePartitionImpl* storage_partition =
- StoragePartitionImpl::Create(browser_context_, partition_path);
+ StoragePartitionImpl::Create(browser_context_,
+ partition_id,
+ browser_context_->GetPath());
partitions_[partition_id] = storage_partition;
net::URLRequestContextGetter* request_context = partition_id.empty() ?
browser_context_->GetRequestContext() :
browser_context_->GetRequestContextForStoragePartition(partition_id);
- PostCreateInitialization(storage_partition, partition_path, request_context);
+ PostCreateInitialization(storage_partition, request_context);
// TODO(ajwong): We need to remove this conditional by making
// InitializeResourceContext() understand having different partition data
@@ -78,7 +72,6 @@ void StoragePartitionImplMap::ForEach(
void StoragePartitionImplMap::PostCreateInitialization(
StoragePartitionImpl* partition,
- const FilePath& partition_path,
net::URLRequestContextGetter* request_context_getter) {
// Check first to avoid memory leak in unittests.
if (BrowserThread::IsMessageLoopValid(BrowserThread::IO)) {
@@ -87,7 +80,7 @@ void StoragePartitionImplMap::PostCreateInitialization(
base::Bind(&ChromeAppCacheService::InitializeOnIOThread,
partition->GetAppCacheService(),
browser_context_->IsOffTheRecord() ? FilePath() :
- partition_path.Append(kAppCacheDirname),
+ partition->GetPath().Append(kAppCacheDirname),
browser_context_->GetResourceContext(),
make_scoped_refptr(request_context_getter),
make_scoped_refptr(
« no previous file with comments | « content/browser/storage_partition_impl_map.h ('k') | content/public/browser/storage_partition.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698