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

Unified Diff: content/browser/storage_partition_impl_map.cc

Issue 647853002: Create a proprietary scheme for loading web-accessible resources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update include guards too Created 6 years, 1 month 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
« no previous file with comments | « content/browser/resource_protocol_handler_unittest.cc ('k') | content/common/url_schemes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d36968b9e280ca09ff60a73eb6bde125a9bd8b2c..5c38dcb6b975b42efab502d8c08aecf9510928e7 100644
--- a/content/browser/storage_partition_impl_map.cc
+++ b/content/browser/storage_partition_impl_map.cc
@@ -20,6 +20,7 @@
#include "content/browser/fileapi/chrome_blob_storage_context.h"
#include "content/browser/loader/resource_request_info_impl.h"
#include "content/browser/resource_context_impl.h"
+#include "content/browser/resource_protocol_handler.h"
#include "content/browser/service_worker/service_worker_request_handler.h"
#include "content/browser/storage_partition_impl.h"
#include "content/browser/streams/stream.h"
@@ -433,6 +434,13 @@ StoragePartitionImpl* StoragePartitionImplMap::Get(
CreateDevToolsProtocolHandler(browser_context_->GetResourceContext(),
browser_context_->IsOffTheRecord()));
+ scoped_ptr<ResourceProtocolHandler> resource_protocol(
+ new ResourceProtocolHandler);
+ RegisterDefaultWebAccessibleResources(resource_protocol.get());
+ protocol_handlers[kResourceScheme] =
+ linked_ptr<net::URLRequestJobFactory::ProtocolHandler>(
+ resource_protocol.release());
+
URLRequestInterceptorScopedVector request_interceptors;
request_interceptors.push_back(
ServiceWorkerRequestHandler::CreateInterceptor(
« no previous file with comments | « content/browser/resource_protocol_handler_unittest.cc ('k') | content/common/url_schemes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698