| Index: content/browser/loader/resource_dispatcher_host_impl.cc
|
| diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
|
| index e9430b5553f2705c8bffeb2c27aa93ec1591d874..d2b3b9688c64711ab14443bd1847b57d0991ec01 100644
|
| --- a/content/browser/loader/resource_dispatcher_host_impl.cc
|
| +++ b/content/browser/loader/resource_dispatcher_host_impl.cc
|
| @@ -53,6 +53,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_provider_host.h"
|
| #include "content/browser/service_worker/service_worker_request_handler.h"
|
| #include "content/browser/streams/stream.h"
|
| #include "content/browser/streams/stream_context.h"
|
| @@ -1314,7 +1315,7 @@ void ResourceDispatcherHostImpl::BeginRequest(
|
| request_data.fetch_request_mode, request_data.fetch_credentials_mode,
|
| request_data.fetch_redirect_mode, request_data.resource_type,
|
| request_data.fetch_request_context_type, request_data.fetch_frame_type,
|
| - request_data.request_body);
|
| + request_data.request_body, nullptr);
|
|
|
| // Have the appcache associate its extra info with the request.
|
| AppCacheInterceptor::SetExtraRequestInfo(
|
| @@ -1887,7 +1888,8 @@ void ResourceDispatcherHostImpl::BeginNavigationRequest(
|
| ResourceContext* resource_context,
|
| int frame_tree_node_id,
|
| const NavigationRequestInfo& info,
|
| - NavigationURLLoaderImplCore* loader) {
|
| + NavigationURLLoaderImplCore* loader,
|
| + ServiceWorkerContextWrapper* service_worker_context) {
|
| // PlzNavigate: BeginNavigationRequest currently should only be used for the
|
| // browser-side navigations project.
|
| CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| @@ -1952,10 +1954,10 @@ void ResourceDispatcherHostImpl::BeginNavigationRequest(
|
|
|
| new_request->SetLoadFlags(load_flags);
|
|
|
| + storage::BlobStorageContext* blob_context = GetBlobStorageContext(
|
| + GetChromeBlobStorageContextForResourceContext(resource_context));
|
| // Resolve elements from request_body and prepare upload data.
|
| if (info.request_body.get()) {
|
| - storage::BlobStorageContext* blob_context = GetBlobStorageContext(
|
| - GetChromeBlobStorageContextForResourceContext(resource_context));
|
| AttachRequestBodyBlobDataHandles(
|
| info.request_body.get(),
|
| blob_context);
|
| @@ -2020,8 +2022,22 @@ void ResourceDispatcherHostImpl::BeginNavigationRequest(
|
| blob_context->context()->GetBlobDataFromPublicURL(new_request->url()));
|
| }
|
|
|
| - // TODO(davidben): Attach ServiceWorkerRequestHandler.
|
| - // TODO(michaeln): Help out with this and that.
|
| + ServiceWorkerRequestHandler::InitializeHandler(
|
| + new_request.get(),
|
| + service_worker_context,
|
| + blob_context,
|
| + (filter_ != nullptr) ? filter_->child_id() : -1,
|
| + info.common_params.service_worker_provider_id,
|
| + info.begin_params.skip_service_worker,
|
| + info.begin_params.fetch_request_mode,
|
| + info.begin_params.fetch_credentials_mode,
|
| + info.begin_params.fetch_redirect_mode,
|
| + info.is_main_frame ? RESOURCE_TYPE_MAIN_FRAME : RESOURCE_TYPE_SUB_FRAME,
|
| + info.begin_params.request_context_type,
|
| + info.begin_params.frame_type,
|
| + info.request_body,
|
| + loader);
|
| +
|
| // TODO(davidben): Attach AppCacheInterceptor.
|
|
|
| scoped_ptr<ResourceHandler> handler(new NavigationResourceHandler(
|
|
|