| 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 393176a35780b33cb9c489d718a0bd915f255e22..f473d1f2b90c6d4922c8f58ab51be2df0df7fafc 100644
|
| --- a/content/browser/storage_partition_impl_map.cc
|
| +++ b/content/browser/storage_partition_impl_map.cc
|
| @@ -37,19 +37,13 @@ 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;
|
|
|
| - PostCreateInitialization(storage_partition, partition_path);
|
| + PostCreateInitialization(storage_partition);
|
|
|
| // TODO(ajwong): We need to remove this conditional by making
|
| // InitializeResourceContext() understand having different partition data
|
| @@ -72,8 +66,7 @@ void StoragePartitionImplMap::ForEach(
|
| }
|
|
|
| void StoragePartitionImplMap::PostCreateInitialization(
|
| - StoragePartitionImpl* partition,
|
| - const FilePath& partition_path) {
|
| + StoragePartitionImpl* partition) {
|
| // Check first to avoid memory leak in unittests.
|
| if (BrowserThread::IsMessageLoopValid(BrowserThread::IO)) {
|
| BrowserThread::PostTask(
|
| @@ -81,7 +74,7 @@ void StoragePartitionImplMap::PostCreateInitialization(
|
| base::Bind(&ChromeAppCacheService::InitializeOnIOThread,
|
| partition->GetAppCacheService(),
|
| browser_context_->IsOffTheRecord() ? FilePath() :
|
| - partition_path.Append(kAppCacheDirname),
|
| + partition->GetPath().Append(kAppCacheDirname),
|
| // TODO(michaeln): This is not right, appcache will be
|
| // using the cookies and cache of a the default
|
| // partition when populating the cache.
|
|
|