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

Unified Diff: content/browser/service_worker/service_worker_url_request_job.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_url_request_job.cc
diff --git a/content/browser/service_worker/service_worker_url_request_job.cc b/content/browser/service_worker/service_worker_url_request_job.cc
index 2f852939088c0ae4f6fc15753280a7599f56b06b..3aec57db6b4fb94e91cd93fe4a4cff9fe65ac6f0 100644
--- a/content/browser/service_worker/service_worker_url_request_job.cc
+++ b/content/browser/service_worker/service_worker_url_request_job.cc
@@ -209,6 +209,7 @@ ServiceWorkerURLRequestJob::ServiceWorkerURLRequestJob(
RequestContextFrameType frame_type,
scoped_refptr<ResourceRequestBodyImpl> body,
ServiceWorkerFetchType fetch_type,
+ const MojoURLLoaderFactoryGetter& url_loader_factory_getter,
Delegate* delegate)
: net::URLRequestJob(request, network_delegate),
delegate_(delegate),
@@ -227,6 +228,7 @@ ServiceWorkerURLRequestJob::ServiceWorkerURLRequestJob(
fall_back_required_(false),
body_(body),
fetch_type_(fetch_type),
+ url_loader_factory_getter_(url_loader_factory_getter),
weak_factory_(this) {
DCHECK(delegate_) << "ServiceWorkerURLRequestJob requires a delegate";
}
@@ -893,7 +895,8 @@ void ServiceWorkerURLRequestJob::RequestBodyBlobsCompleted(bool success) {
base::Bind(&ServiceWorkerURLRequestJob::DidDispatchFetchEvent,
weak_factory_.GetWeakPtr())));
worker_start_time_ = base::TimeTicks::Now();
- fetch_dispatcher_->MaybeStartNavigationPreload(request());
+ fetch_dispatcher_->MaybeStartNavigationPreload(request(),
+ url_loader_factory_getter_);
fetch_dispatcher_->Run();
}

Powered by Google App Engine
This is Rietveld 408576698