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

Side by Side Diff: content/child/web_url_loader_impl.cc

Issue 705273004: [ServiceWorker] Pass FetchEvent related properties of WebURLRequest to Blink for redirect responses. (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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // An implementation of WebURLLoader in terms of ResourceLoaderBridge. 5 // An implementation of WebURLLoader in terms of ResourceLoaderBridge.
6 6
7 #include "content/child/web_url_loader_impl.h" 7 #include "content/child/web_url_loader_impl.h"
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 PopulateURLResponse(request_.url(), info, &response); 544 PopulateURLResponse(request_.url(), info, &response);
545 545
546 // TODO(darin): We lack sufficient information to construct the actual 546 // TODO(darin): We lack sufficient information to construct the actual
547 // request that resulted from the redirect. 547 // request that resulted from the redirect.
548 WebURLRequest new_request(redirect_info.new_url); 548 WebURLRequest new_request(redirect_info.new_url);
549 new_request.setFirstPartyForCookies( 549 new_request.setFirstPartyForCookies(
550 redirect_info.new_first_party_for_cookies); 550 redirect_info.new_first_party_for_cookies);
551 new_request.setDownloadToFile(request_.downloadToFile()); 551 new_request.setDownloadToFile(request_.downloadToFile());
552 new_request.setRequestContext(request_.requestContext()); 552 new_request.setRequestContext(request_.requestContext());
553 new_request.setFrameType(request_.frameType()); 553 new_request.setFrameType(request_.frameType());
554 new_request.setSkipServiceWorker(request_.skipServiceWorker());
555 new_request.setFetchRequestMode(request_.fetchRequestMode());
556 new_request.setFetchCredentialsMode(request_.fetchCredentialsMode());
554 557
555 new_request.setHTTPReferrer(WebString::fromUTF8(redirect_info.new_referrer), 558 new_request.setHTTPReferrer(WebString::fromUTF8(redirect_info.new_referrer),
556 referrer_policy_); 559 referrer_policy_);
557 560
558 std::string old_method = request_.httpMethod().utf8(); 561 std::string old_method = request_.httpMethod().utf8();
559 new_request.setHTTPMethod(WebString::fromUTF8(redirect_info.new_method)); 562 new_request.setHTTPMethod(WebString::fromUTF8(redirect_info.new_method));
560 if (redirect_info.new_method == old_method) 563 if (redirect_info.new_method == old_method)
561 new_request.setHTTPBody(request_.httpBody()); 564 new_request.setHTTPBody(request_.httpBody());
562 565
563 // Protect from deletion during call to willSendRequest. 566 // Protect from deletion during call to willSendRequest.
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 int intra_priority_value) { 985 int intra_priority_value) {
983 context_->DidChangePriority(new_priority, intra_priority_value); 986 context_->DidChangePriority(new_priority, intra_priority_value);
984 } 987 }
985 988
986 bool WebURLLoaderImpl::attachThreadedDataReceiver( 989 bool WebURLLoaderImpl::attachThreadedDataReceiver(
987 blink::WebThreadedDataReceiver* threaded_data_receiver) { 990 blink::WebThreadedDataReceiver* threaded_data_receiver) {
988 return context_->AttachThreadedDataReceiver(threaded_data_receiver); 991 return context_->AttachThreadedDataReceiver(threaded_data_receiver);
989 } 992 }
990 993
991 } // namespace content 994 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698