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

Unified Diff: content/child/resource_dispatcher.cc

Issue 375513002: [ServiceWorker] Propagates ServiceWorker fetched response's URL and wasFetchedViaServiceWorker flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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/child/resource_dispatcher.cc
diff --git a/content/child/resource_dispatcher.cc b/content/child/resource_dispatcher.cc
index 922681bbbf841dab5c70e8745ddfd8da37885813..93b85a799d4e9dbc770aee4a07fd71d3f2edee63 100644
--- a/content/child/resource_dispatcher.cc
+++ b/content/child/resource_dispatcher.cc
@@ -358,6 +358,13 @@ void ResourceDispatcher::OnReceivedResponse(
request_info->peer = new_peer;
}
+ // Updates the response_url if the response was feched via a ServiceWorker,
tyoshino (SeeGerritForStatus) 2014/07/08 14:27:49 feched -> fetched
horo 2014/07/09 03:15:01 Done.
+ // and it was not generated inside the SherviceWorker.
tyoshino (SeeGerritForStatus) 2014/07/08 14:27:49 Shervice -> Service
tyoshino (SeeGerritForStatus) 2014/07/08 14:27:49 // and -> // and
horo 2014/07/09 03:15:01 Done.
horo 2014/07/09 03:15:01 Done.
+ if (response_head.was_fetched_via_service_worker &&
+ !response_head.original_url_via_service_worker.is_empty()) {
+ request_info->response_url = response_head.original_url_via_service_worker;
+ }
+
ResourceResponseInfo renderer_response_info;
ToResourceResponseInfo(*request_info, response_head, &renderer_response_info);
request_info->site_isolation_metadata =

Powered by Google App Engine
This is Rietveld 408576698