OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |