| 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 dedb5a0ca6ab95bb655776ac158ad86f89b3d007..683d77c0973893ba9ba89072c08cfce30ae4e6ef 100644
|
| --- a/content/browser/storage_partition_impl_map.cc
|
| +++ b/content/browser/storage_partition_impl_map.cc
|
| @@ -447,23 +447,38 @@ StoragePartitionImpl* StoragePartitionImplMap::Get(
|
|
|
| ChromeBlobStorageContext* blob_storage_context =
|
| ChromeBlobStorageContext::GetFor(browser_context_);
|
| - scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> blob_protocol_handler(
|
| - new BlobProtocolHandler(blob_storage_context,
|
| - partition->GetFileSystemContext()));
|
| - scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
|
| - file_system_protocol_handler(
|
| - CreateFileSystemProtocolHandler(partition->GetFileSystemContext()));
|
| scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
|
| developer_protocol_handler(
|
| new DeveloperProtocolHandler(partition->GetAppCacheService(),
|
| blob_storage_context));
|
| - scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
|
| - chrome_protocol_handler(
|
| +
|
| + ProtocolHandlerMap protocol_handlers;
|
| + protocol_handlers[chrome::kBlobScheme] =
|
| + linked_ptr<net::URLRequestJobFactory::ProtocolHandler>(
|
| + new BlobProtocolHandler(blob_storage_context,
|
| + partition->GetFileSystemContext()));
|
| + protocol_handlers[chrome::kFileSystemScheme] =
|
| + linked_ptr<net::URLRequestJobFactory::ProtocolHandler>(
|
| + CreateFileSystemProtocolHandler(partition->GetFileSystemContext()));
|
| + protocol_handlers[chrome::kChromeUIScheme] =
|
| + linked_ptr<net::URLRequestJobFactory::ProtocolHandler>(
|
| URLDataManagerBackend::CreateProtocolHandler(
|
| browser_context_->GetResourceContext(),
|
| browser_context_->IsOffTheRecord()));
|
| - scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
|
| - chrome_devtools_protocol_handler(
|
| + std::vector<std::string> additional_webui_schemes =
|
| + GetContentClient()->browser()->GetAdditionalWebUISchemes();
|
| + for (std::vector<std::string>::const_iterator it =
|
| + additional_webui_schemes.begin();
|
| + it != additional_webui_schemes.end();
|
| + ++it) {
|
| + protocol_handlers[*it] =
|
| + linked_ptr<net::URLRequestJobFactory::ProtocolHandler>(
|
| + URLDataManagerBackend::CreateProtocolHandler(
|
| + browser_context_->GetResourceContext(),
|
| + browser_context_->IsOffTheRecord()));
|
| + }
|
| + protocol_handlers[chrome::kChromeDevToolsScheme] =
|
| + linked_ptr<net::URLRequestJobFactory::ProtocolHandler>(
|
| CreateDevToolsProtocolHandler(browser_context_->GetResourceContext(),
|
| browser_context_->IsOffTheRecord()));
|
|
|
| @@ -471,16 +486,12 @@ StoragePartitionImpl* StoragePartitionImplMap::Get(
|
| if (partition_domain.empty()) {
|
| partition->SetURLRequestContext(
|
| GetContentClient()->browser()->CreateRequestContext(browser_context_,
|
| - blob_protocol_handler.Pass(), file_system_protocol_handler.Pass(),
|
| - developer_protocol_handler.Pass(), chrome_protocol_handler.Pass(),
|
| - chrome_devtools_protocol_handler.Pass()));
|
| + developer_protocol_handler.Pass(), &protocol_handlers));
|
| } else {
|
| partition->SetURLRequestContext(
|
| GetContentClient()->browser()->CreateRequestContextForStoragePartition(
|
| browser_context_, partition->GetPath(), in_memory,
|
| - blob_protocol_handler.Pass(), file_system_protocol_handler.Pass(),
|
| - developer_protocol_handler.Pass(), chrome_protocol_handler.Pass(),
|
| - chrome_devtools_protocol_handler.Pass()));
|
| + developer_protocol_handler.Pass(), &protocol_handlers));
|
| }
|
| partition->SetMediaURLRequestContext(
|
| partition_domain.empty() ?
|
|
|