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

Unified Diff: chrome/browser/profiles/profile_impl_io_data.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: Make world consistent. 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
Index: chrome/browser/profiles/profile_impl_io_data.cc
diff --git a/chrome/browser/profiles/profile_impl_io_data.cc b/chrome/browser/profiles/profile_impl_io_data.cc
index ed274946a3c4bf3c42edc26a8c904aa02783de54..837c1806c01e0a7d8fbc0ca981b344fe27e2ddb9 100644
--- a/chrome/browser/profiles/profile_impl_io_data.cc
+++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -32,6 +32,7 @@
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/resource_context.h"
+#include "content/public/browser/storage_partition.h"
#include "net/base/server_bound_cert_service.h"
#include "net/ftp/ftp_network_layer.h"
#include "net/http/http_cache.h"
@@ -95,7 +96,7 @@ void ProfileImplIOData::Handle::Init(
const FilePath& media_cache_path,
int media_cache_max_size,
const FilePath& extensions_cookie_path,
- const FilePath& app_path,
+ const FilePath& profile_path,
const FilePath& infinite_cache_path,
chrome_browser_net::Predictor* predictor,
PrefService* local_state,
@@ -123,7 +124,7 @@ void ProfileImplIOData::Handle::Init(
// Keep track of isolated app path and cache sizes separately so we can use
Charlie Reis 2012/09/14 21:03:13 Maybe update this comment as well?
awong 2012/09/14 22:26:06 Done.
// them on demand.
- io_data_->app_path_ = app_path;
+ io_data_->profile_path_ = profile_path;
io_data_->app_cache_max_size_ = cache_max_size;
io_data_->app_media_cache_max_size_ = media_cache_max_size;
@@ -513,7 +514,9 @@ ProfileImplIOData::InitializeAppRequestContext(
AppRequestContext* context = new AppRequestContext(load_time_stats());
context->CopyFrom(main_context);
- FilePath app_path = app_path_.AppendASCII(app_id);
+ FilePath app_path =
+ content::StoragePartition::GetPartitionPath(profile_path_, app_id);
+
FilePath cookie_path = app_path.Append(chrome::kCookieFilename);
FilePath cache_path = app_path.Append(chrome::kCacheDirname);
@@ -586,7 +589,8 @@ ProfileImplIOData::InitializeMediaRequestContext(
MediaRequestContext* context = new MediaRequestContext(load_time_stats());
context->CopyFrom(original_context);
- FilePath app_path = app_path_.AppendASCII(app_id);
+ FilePath app_path =
+ content::StoragePartition::GetPartitionPath(profile_path_, app_id);
FilePath cache_path;
int cache_max_size = app_media_cache_max_size_;
if (app_id.empty()) {

Powered by Google App Engine
This is Rietveld 408576698