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

Unified Diff: chrome/browser/profiles/off_the_record_profile_io_data.cc

Issue 11147026: Initial refactor to get profiles to propagate storage partition details. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changing bool param to pass by reference. 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: chrome/browser/profiles/off_the_record_profile_io_data.cc
diff --git a/chrome/browser/profiles/off_the_record_profile_io_data.cc b/chrome/browser/profiles/off_the_record_profile_io_data.cc
index 6cadb70c6d84945e0ff4211ef3a5cbd1d7be8bd1..98de90c490e84cd07b5590ebf5bbb2f48a122cf5 100644
--- a/chrome/browser/profiles/off_the_record_profile_io_data.cc
+++ b/chrome/browser/profiles/off_the_record_profile_io_data.cc
@@ -117,14 +117,14 @@ OffTheRecordProfileIOData::Handle::GetExtensionsRequestContextGetter() const {
scoped_refptr<ChromeURLRequestContextGetter>
OffTheRecordProfileIOData::Handle::GetIsolatedAppRequestContextGetter(
- const std::string& app_id) const {
+ const StoragePartitionDetails& partition_details) const {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- DCHECK(!app_id.empty());
+ DCHECK(!partition_details.path.empty());
LazyInitialize();
// Keep a map of request context getters, one per requested app ID.
ChromeURLRequestContextGetterMap::iterator iter =
- app_request_context_getter_map_.find(app_id);
+ app_request_context_getter_map_.find(partition_details);
if (iter != app_request_context_getter_map_.end())
return iter->second;
@@ -134,8 +134,9 @@ OffTheRecordProfileIOData::Handle::GetIsolatedAppRequestContextGetter(
CreateURLInterceptor());
ChromeURLRequestContextGetter* context =
ChromeURLRequestContextGetter::CreateOffTheRecordForIsolatedApp(
- profile_, io_data_, app_id, protocol_handler_interceptor.Pass());
- app_request_context_getter_map_[app_id] = context;
+ profile_, io_data_, partition_details,
+ protocol_handler_interceptor.Pass());
+ app_request_context_getter_map_[partition_details] = context;
return context;
}
@@ -268,7 +269,7 @@ void OffTheRecordProfileIOData::LazyInitializeInternal(
ChromeURLRequestContext*
OffTheRecordProfileIOData::InitializeAppRequestContext(
ChromeURLRequestContext* main_context,
- const std::string& app_id,
+ const StoragePartitionDetails& partition_details,
scoped_ptr<net::URLRequestJobFactory::Interceptor>
protocol_handler_interceptor) const {
AppRequestContext* context = new AppRequestContext(load_time_stats());
@@ -305,7 +306,7 @@ OffTheRecordProfileIOData::InitializeAppRequestContext(
ChromeURLRequestContext*
OffTheRecordProfileIOData::InitializeMediaRequestContext(
ChromeURLRequestContext* original_context,
- const std::string& app_id) const {
+ const StoragePartitionDetails& partition_details) const {
NOTREACHED();
return NULL;
}
@@ -319,12 +320,12 @@ OffTheRecordProfileIOData::AcquireMediaRequestContext() const {
ChromeURLRequestContext*
OffTheRecordProfileIOData::AcquireIsolatedAppRequestContext(
ChromeURLRequestContext* main_context,
- const std::string& app_id,
+ const StoragePartitionDetails& partition_details,
scoped_ptr<net::URLRequestJobFactory::Interceptor>
protocol_handler_interceptor) const {
// We create per-app contexts on demand, unlike the others above.
ChromeURLRequestContext* app_request_context =
- InitializeAppRequestContext(main_context, app_id,
+ InitializeAppRequestContext(main_context, partition_details,
protocol_handler_interceptor.Pass());
DCHECK(app_request_context);
return app_request_context;
@@ -333,7 +334,7 @@ OffTheRecordProfileIOData::AcquireIsolatedAppRequestContext(
ChromeURLRequestContext*
OffTheRecordProfileIOData::AcquireIsolatedMediaRequestContext(
ChromeURLRequestContext* app_context,
- const std::string& app_id) const {
+ const StoragePartitionDetails& partition_details) const {
NOTREACHED();
return NULL;
}

Powered by Google App Engine
This is Rietveld 408576698