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

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

Issue 2575523002: Prerender: Confirm ServiceWorkers are invoked for NoState Prefetch (Closed)
Patch Set: drop prefetch url request Created 4 years 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_context_request_handler.cc
diff --git a/content/browser/service_worker/service_worker_context_request_handler.cc b/content/browser/service_worker/service_worker_context_request_handler.cc
index 36d2875f96a41aa976bbdedc181211b96bcdcead..869e58e790c86fdc85db2d8d12d5a8e5cab94596 100644
--- a/content/browser/service_worker/service_worker_context_request_handler.cc
+++ b/content/browser/service_worker/service_worker_context_request_handler.cc
@@ -55,6 +55,12 @@ net::URLRequestJob* ServiceWorkerContextRequestHandler::MaybeCreateJob(
return NULL;
}
+ // TODO(mattcary): still not clear if this is correct or not.
+ // Skip creation if job is prefetch.
+ if (request->load_flags() & net::LOAD_PREFETCH) {
+ return NULL;
falken 2016/12/27 01:27:00 Returning null here just means that SW machinery w
+ }
+
if (ShouldAddToScriptCache(request->url())) {
ServiceWorkerRegistration* registration =
context_->GetLiveRegistration(version_->registration_id());

Powered by Google App Engine
This is Rietveld 408576698