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

Unified Diff: content/browser/storage_partition_impl_map.cc

Issue 2867853002: Make the new WebUI's code handle all webui schemes, instead of just chrome://. (Closed)
Patch Set: Created 3 years, 7 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: 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 e71456af22f08ad6bcf586ee1a38599671db4afb..40004a9e3e6526b45ebcdd7344a039d025782cf1 100644
--- a/content/browser/storage_partition_impl_map.cc
+++ b/content/browser/storage_partition_impl_map.cc
@@ -415,23 +415,12 @@ StoragePartitionImpl* StoragePartitionImplMap::Get(
linked_ptr<net::URLRequestJobFactory::ProtocolHandler>(
CreateFileSystemProtocolHandler(partition_domain,
partition->GetFileSystemContext()));
- protocol_handlers[kChromeUIScheme] =
- linked_ptr<net::URLRequestJobFactory::ProtocolHandler>(
- URLDataManagerBackend::CreateProtocolHandler(
- browser_context_->GetResourceContext(),
- blob_storage_context).release());
- std::vector<std::string> additional_webui_schemes;
- GetContentClient()->browser()->GetAdditionalWebUISchemes(
- &additional_webui_schemes);
- for (std::vector<std::string>::const_iterator it =
- additional_webui_schemes.begin();
- it != additional_webui_schemes.end();
- ++it) {
- protocol_handlers[*it] =
+ for (const auto& scheme : URLDataManagerBackend::GetWebUISchemes()) {
+ protocol_handlers[scheme] =
linked_ptr<net::URLRequestJobFactory::ProtocolHandler>(
URLDataManagerBackend::CreateProtocolHandler(
- browser_context_->GetResourceContext(),
- blob_storage_context).release());
+ browser_context_->GetResourceContext(), blob_storage_context)
+ .release());
}
protocol_handlers[kChromeDevToolsScheme] =
« no previous file with comments | « content/browser/loader/navigation_url_loader_network_service.cc ('k') | content/browser/webui/url_data_manager_backend.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698