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

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

Issue 11308362: Add StoragePartition's ProtocolHandlers at URLRequestContext construction time. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Eliminate OffTheRecordProfileIOData::Handle::GetMainRequestContextGetter Created 7 years, 11 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_impl.cc
diff --git a/chrome/browser/profiles/off_the_record_profile_impl.cc b/chrome/browser/profiles/off_the_record_profile_impl.cc
index 489c2aec63836e5c08735aabc07ae084d1f52ff8..a7367e9f5693fe35649eeb1b51b07abedfdc0ace 100644
--- a/chrome/browser/profiles/off_the_record_profile_impl.cc
+++ b/chrome/browser/profiles/off_the_record_profile_impl.cc
@@ -252,7 +252,20 @@ DownloadManagerDelegate* OffTheRecordProfileImpl::GetDownloadManagerDelegate() {
}
net::URLRequestContextGetter* OffTheRecordProfileImpl::GetRequestContext() {
- return io_data_.GetMainRequestContextGetter();
+ content::StoragePartition* storage_partition =
+ BrowserContext::GetStoragePartition(this, NULL);
+ return storage_partition->GetURLRequestContext();
+}
+
+net::URLRequestContextGetter* OffTheRecordProfileImpl::CreateRequestContext(
+ scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
+ blob_protocol_handler,
+ scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
+ file_system_protocol_handler,
+ scoped_ptr<net::URLRequestJobFactory::Interceptor>
+ developer_protocol_handler) {
+ return io_data_.CreateMainRequestContextGetter(blob_protocol_handler.Pass(),
+ file_system_protocol_handler.Pass(), developer_protocol_handler.Pass());
}
net::URLRequestContextGetter*
@@ -280,7 +293,7 @@ net::URLRequestContextGetter*
OffTheRecordProfileImpl::GetMediaRequestContextForStoragePartition(
const FilePath& partition_path,
bool in_memory) {
- return GetRequestContextForStoragePartition(partition_path, in_memory);
+ return io_data_.GetIsolatedAppRequestContextGetter(partition_path, in_memory);
}
net::URLRequestContextGetter*
@@ -289,10 +302,18 @@ net::URLRequestContextGetter*
}
net::URLRequestContextGetter*
- OffTheRecordProfileImpl::GetRequestContextForStoragePartition(
+ OffTheRecordProfileImpl::CreateRequestContextForStoragePartition(
const FilePath& partition_path,
- bool in_memory) {
- return io_data_.GetIsolatedAppRequestContextGetter(partition_path, in_memory);
+ bool in_memory,
+ scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
+ blob_protocol_handler,
+ scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
+ file_system_protocol_handler,
+ scoped_ptr<net::URLRequestJobFactory::Interceptor>
+ developer_protocol_handler) {
+ return io_data_.CreateIsolatedAppRequestContextGetter(
+ partition_path, in_memory, blob_protocol_handler.Pass(),
+ file_system_protocol_handler.Pass(), developer_protocol_handler.Pass());
}
content::ResourceContext* OffTheRecordProfileImpl::GetResourceContext() {

Powered by Google App Engine
This is Rietveld 408576698