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

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: Addressed comments 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 1dd7ca6b4b1e3af143c21616b3fc479a983ffcb3..6e5bb228d921dcff58660819c9186c7c9f63a2c8 100644
--- a/content/browser/service_worker/service_worker_fetch_dispatcher.cc
+++ b/content/browser/service_worker/service_worker_fetch_dispatcher.cc
@@ -428,7 +428,10 @@ void ServiceWorkerFetchDispatcher::MaybeStartNavigationPreload(
ResourceRequest request;
request.method = original_request->method();
request.url = original_request->url();
- request.request_initiator = original_request->initiator();
+ // TODO(horo): Set first_party_for_cookies to support Same-site Cookies.
+ request.request_initiator = original_request->initiator().has_value()
+ ? 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