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

Unified Diff: content/child/web_url_loader_impl.cc

Issue 2105503002: Skip foreign fetch when the skipServiceWorker flag is set on a request. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix resource loading Created 4 years, 6 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/web_url_loader_impl.cc
diff --git a/content/child/web_url_loader_impl.cc b/content/child/web_url_loader_impl.cc
index 80741405a603c8aa25d3e9c085b4b2d7bac65033..e31a16a2bc506a9b2f470bf7b6bd707ecc0a66bc 100644
--- a/content/child/web_url_loader_impl.cc
+++ b/content/child/web_url_loader_impl.cc
@@ -506,7 +506,8 @@ void WebURLLoaderImpl::Context::Start(const WebURLRequest& request,
request_info.routing_id = request.requestorID();
request_info.download_to_file = request.downloadToFile();
request_info.has_user_gesture = request.hasUserGesture();
- request_info.skip_service_worker = request.skipServiceWorker();
+ request_info.skip_service_worker =
+ GetSkipServiceWorkerForWebURLRequest(request);
request_info.should_reset_appcache = request.shouldResetAppCache();
request_info.fetch_request_mode =
GetFetchRequestModeForWebURLRequest(request);
@@ -580,9 +581,12 @@ bool WebURLLoaderImpl::Context::OnReceivedRedirect(
WebURLRequest new_request;
new_request.initialize();
- PopulateURLRequestForRedirect(request_, redirect_info, referrer_policy_,
- !info.was_fetched_via_service_worker,
- &new_request);
+ PopulateURLRequestForRedirect(
+ request_, redirect_info, referrer_policy_,
+ info.was_fetched_via_service_worker
+ ? blink::WebURLRequest::SkipServiceWorker::None
+ : blink::WebURLRequest::SkipServiceWorker::All,
horo 2016/06/28 12:10:02 What should happen in this case? 1. https://exampl
Marijn Kruisselbrink 2016/06/28 17:06:12 This reminds me that I still need to write the int
+ &new_request);
client_->willFollowRedirect(loader_, new_request, response);
request_ = new_request;
@@ -1072,7 +1076,7 @@ void WebURLLoaderImpl::PopulateURLRequestForRedirect(
const blink::WebURLRequest& request,
const net::RedirectInfo& redirect_info,
blink::WebReferrerPolicy referrer_policy,
- bool skip_service_worker,
+ blink::WebURLRequest::SkipServiceWorker skip_service_worker,
blink::WebURLRequest* new_request) {
// TODO(darin): We lack sufficient information to construct the actual
// request that resulted from the redirect.

Powered by Google App Engine
This is Rietveld 408576698