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

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

Issue 605103003: Pass request context and frame type down to Blink for redirect responses. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 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/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 WebURLResponse response; 479 WebURLResponse response;
480 response.initialize(); 480 response.initialize();
481 PopulateURLResponse(request_.url(), info, &response); 481 PopulateURLResponse(request_.url(), info, &response);
482 482
483 // TODO(darin): We lack sufficient information to construct the actual 483 // TODO(darin): We lack sufficient information to construct the actual
484 // request that resulted from the redirect. 484 // request that resulted from the redirect.
485 WebURLRequest new_request(redirect_info.new_url); 485 WebURLRequest new_request(redirect_info.new_url);
486 new_request.setFirstPartyForCookies( 486 new_request.setFirstPartyForCookies(
487 redirect_info.new_first_party_for_cookies); 487 redirect_info.new_first_party_for_cookies);
488 new_request.setDownloadToFile(request_.downloadToFile()); 488 new_request.setDownloadToFile(request_.downloadToFile());
489 new_request.setRequestContext(request_.requestContext());
490 new_request.setFrameType(request_.frameType());
489 491
490 new_request.setHTTPReferrer(WebString::fromUTF8(redirect_info.new_referrer), 492 new_request.setHTTPReferrer(WebString::fromUTF8(redirect_info.new_referrer),
491 referrer_policy_); 493 referrer_policy_);
492 494
493 std::string old_method = request_.httpMethod().utf8(); 495 std::string old_method = request_.httpMethod().utf8();
494 new_request.setHTTPMethod(WebString::fromUTF8(redirect_info.new_method)); 496 new_request.setHTTPMethod(WebString::fromUTF8(redirect_info.new_method));
495 if (redirect_info.new_method == old_method) 497 if (redirect_info.new_method == old_method)
496 new_request.setHTTPBody(request_.httpBody()); 498 new_request.setHTTPBody(request_.httpBody());
497 499
498 // Protect from deletion during call to willSendRequest. 500 // Protect from deletion during call to willSendRequest.
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 int intra_priority_value) { 905 int intra_priority_value) {
904 context_->DidChangePriority(new_priority, intra_priority_value); 906 context_->DidChangePriority(new_priority, intra_priority_value);
905 } 907 }
906 908
907 bool WebURLLoaderImpl::attachThreadedDataReceiver( 909 bool WebURLLoaderImpl::attachThreadedDataReceiver(
908 blink::WebThreadedDataReceiver* threaded_data_receiver) { 910 blink::WebThreadedDataReceiver* threaded_data_receiver) {
909 return context_->AttachThreadedDataReceiver(threaded_data_receiver); 911 return context_->AttachThreadedDataReceiver(threaded_data_receiver);
910 } 912 }
911 913
912 } // namespace content 914 } // 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