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

Unified Diff: content/child/web_url_loader_impl.cc

Issue 731983003: Use the request URL as the URL of the resources which are fetched ServiceWorker [2/3 chromium] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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/child/resource_dispatcher.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/web_url_loader_impl.cc
diff --git a/content/child/web_url_loader_impl.cc b/content/child/web_url_loader_impl.cc
index b51d799047c42bf269e3b992659867e450ddf125..14769b86d456ddec61d77c94aed460a33f222074 100644
--- a/content/child/web_url_loader_impl.cc
+++ b/content/child/web_url_loader_impl.cc
@@ -602,12 +602,6 @@ void WebURLLoaderImpl::Context::OnReceivedResponse(
WebURLResponse response;
response.initialize();
- // Updates the request url if the response was fetched by a ServiceWorker,
- // and it was not generated inside the ServiceWorker.
- if (info.was_fetched_via_service_worker &&
- !info.original_url_via_service_worker.is_empty()) {
- request_.setURL(info.original_url_via_service_worker);
- }
PopulateURLResponse(request_.url(), info, &response);
bool show_raw_listing = (GURL(request_.url()).query() == "raw");
@@ -842,6 +836,9 @@ void WebURLLoaderImpl::PopulateURLResponse(const GURL& url,
response->setWasFallbackRequiredByServiceWorker(
info.was_fallback_required_by_service_worker);
response->setServiceWorkerResponseType(info.response_type_via_service_worker);
+ response->setOriginalURLViaServiceWorker(
+ info.original_url_via_service_worker);
+
WebURLResponseExtraDataImpl* extra_data =
new WebURLResponseExtraDataImpl(info.npn_negotiated_protocol);
response->setExtraData(extra_data);
« no previous file with comments | « content/child/resource_dispatcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698