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

Unified Diff: content/browser/service_worker/service_worker_provider_host.cc

Issue 2410333006: Implement ServiceWorkerFetchDispatcher::MaybeStartNavigationPreload(). (Closed)
Patch Set: add comment in service_worker_url_request_job.h Created 4 years, 2 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/service_worker/service_worker_provider_host.cc
diff --git a/content/browser/service_worker/service_worker_provider_host.cc b/content/browser/service_worker/service_worker_provider_host.cc
index d1e82aac54e748d217663ddfb4987b3b756821ad..c36829aa959e0490b0c4f40d31f5a873e09697af 100644
--- a/content/browser/service_worker/service_worker_provider_host.cc
+++ b/content/browser/service_worker/service_worker_provider_host.cc
@@ -341,11 +341,14 @@ ServiceWorkerProviderHost::CreateRequestHandler(
}
if (ServiceWorkerUtils::IsMainResourceType(resource_type) ||
controlling_version()) {
+ // |dispatcher_host_| may be null in some unittests.
return std::unique_ptr<ServiceWorkerRequestHandler>(
new ServiceWorkerControlleeRequestHandler(
context_, AsWeakPtr(), blob_storage_context, request_mode,
credentials_mode, redirect_mode, resource_type,
- request_context_type, frame_type, body));
+ request_context_type, frame_type, body,
+ dispatcher_host_ ? dispatcher_host_->url_loader_factory_getter()
+ : MojoURLLoaderFactoryGetter()));
}
return std::unique_ptr<ServiceWorkerRequestHandler>();
}

Powered by Google App Engine
This is Rietveld 408576698