summaryrefslogtreecommitdiffstats
path: root/content/browser/loader
diff options
context:
space:
mode:
authorkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-13 10:29:46 +0000
committerkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-13 10:29:46 +0000
commit766c6504cc1c3e4e94fef292652e19fd2bae2daa (patch)
treed5cd8172337adc2c5e7915ada2987e03c1e27691 /content/browser/loader
parent7824cf82df8244b5f66a56e663ce6e121c25de88 (diff)
downloadchromium_src-766c6504cc1c3e4e94fef292652e19fd2bae2daa.zip
chromium_src-766c6504cc1c3e4e94fef292652e19fd2bae2daa.tar.gz
chromium_src-766c6504cc1c3e4e94fef292652e19fd2bae2daa.tar.bz2
Wire ServiceWorker protocol interceptor
Also adds implementation for FALLBACK_TO_NETWORK case in ServiceWorkerURLRequest, so that launching chrome with --enable-service-worker doesn't block every resource request. BUG=349319 Review URL: https://codereview.chromium.org/196793003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256790 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/loader')
-rw-r--r--content/browser/loader/resource_dispatcher_host_impl.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
index 0058a24..4d91e01 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -47,6 +47,7 @@
#include "content/browser/renderer_host/render_view_host_delegate.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
#include "content/browser/resource_context_impl.h"
+#include "content/browser/service_worker/service_worker_request_handler.h"
#include "content/browser/streams/stream.h"
#include "content/browser/streams/stream_context.h"
#include "content/browser/streams/stream_registry.h"
@@ -1128,6 +1129,14 @@ void ResourceDispatcherHostImpl::BeginRequest(
GetBlobDataFromPublicURL(new_request->url()));
}
+ // Initialize the service worker handler for the request.
+ ServiceWorkerRequestHandler::InitializeHandler(
+ new_request.get(),
+ filter_->service_worker_context(),
+ child_id,
+ request_data.service_worker_provider_id,
+ request_data.resource_type);
+
// Have the appcache associate its extra info with the request.
appcache::AppCacheInterceptor::SetExtraRequestInfo(
new_request.get(), filter_->appcache_service(), child_id,