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

Unified Diff: Source/core/fetch/ResourceFetcher.cpp

Issue 732003002: Use the request URL as the URL of the resources which are fetched ServiceWorker [3/3 blink] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.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 | « LayoutTests/http/tests/serviceworker/resources/fetch-request-css-base-url-worker.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/ResourceFetcher.cpp
diff --git a/Source/core/fetch/ResourceFetcher.cpp b/Source/core/fetch/ResourceFetcher.cpp
index 67b9d6f6f1a797358ab34b1838a63d92386056da..3f4817a2e7c9b1d248b2a5010f83f5139c411abc 100644
--- a/Source/core/fetch/ResourceFetcher.cpp
+++ b/Source/core/fetch/ResourceFetcher.cpp
@@ -1349,10 +1349,7 @@ void ResourceFetcher::didReceiveResponse(const Resource* resource, const Resourc
// If the response is fetched via ServiceWorker, the original URL of the response could be different from the URL of the request.
yhirano 2014/11/19 04:06:21 Can you add a comment here that this check aims no
horo 2014/11/19 04:55:59 Done.
if (response.wasFetchedViaServiceWorker()) {
- KURL originalURL = response.url();
- // FIXME: Use response.originalURLViaServiceWorker() after the chromium side patch will land.
- if (!response.originalURLViaServiceWorker().isEmpty())
- originalURL = response.originalURLViaServiceWorker();
+ const KURL& originalURL = response.originalURLViaServiceWorker();
if (!canRequest(resource->type(), resource->resourceRequest(), originalURL, resource->options(), false, FetchRequest::UseDefaultOriginRestrictionForType)) {
resource->loader()->cancel();
bool isInternalRequest = resource->options().initiatorInfo.name == FetchInitiatorTypeNames::internal;
« no previous file with comments | « LayoutTests/http/tests/serviceworker/resources/fetch-request-css-base-url-worker.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698