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

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: rephrase SkipServiceWorker comments. 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
« no previous file with comments | « content/child/web_url_loader_impl.h ('k') | content/child/web_url_request_util.h » ('j') | 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 7865f1dc48fb29870282fc9f1c24e389cb4420ad..7f2fcf35b44aae2e80712f97f8bfbafa5b24359e 100644
--- a/content/child/web_url_loader_impl.cc
+++ b/content/child/web_url_loader_impl.cc
@@ -534,7 +534,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);
@@ -608,9 +609,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,
+ &new_request);
client_->willFollowRedirect(loader_, new_request, response);
request_ = new_request;
@@ -1099,7 +1103,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.
« no previous file with comments | « content/child/web_url_loader_impl.h ('k') | content/child/web_url_request_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698