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

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

Issue 2099243002: PlzNavigate: properly set the initiator of the navigation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed issue in SW preload 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
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_unittest.cc ('k') | content/common/frame_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/service_worker/service_worker_fetch_dispatcher.cc
diff --git a/content/browser/service_worker/service_worker_fetch_dispatcher.cc b/content/browser/service_worker/service_worker_fetch_dispatcher.cc
index c074651cb42c469b58061bf9905ee12c50504dfb..2e2ee7d286a8c54f5905cbcb81cbffd1c24c0155 100644
--- a/content/browser/service_worker/service_worker_fetch_dispatcher.cc
+++ b/content/browser/service_worker/service_worker_fetch_dispatcher.cc
@@ -418,7 +418,9 @@ void ServiceWorkerFetchDispatcher::MaybeStartNavigationPreload(
ResourceRequest request;
request.method = original_request->method();
request.url = original_request->url();
- request.request_initiator = original_request->initiator();
+ request.request_initiator = original_request->initiator().has_value()
horo 2016/12/12 07:07:57 Please add this TODO comment: // TODO(horo): Set f
clamy 2016/12/12 16:52:33 Done.
+ ? original_request->initiator()
+ : url::Origin(original_request->url());
request.referrer = GURL(original_request->referrer());
request.referrer_policy = original_info->GetReferrerPolicy();
request.visibility_state = original_info->GetVisibilityState();
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_unittest.cc ('k') | content/common/frame_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698