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/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |