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 #include "content/child/web_url_loader_impl.h" | 5 #include "content/child/web_url_loader_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <deque> | 8 #include <deque> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
735 ftp_listing_delegate_.reset(NULL); | 735 ftp_listing_delegate_.reset(NULL); |
736 } else if (multipart_delegate_) { | 736 } else if (multipart_delegate_) { |
737 multipart_delegate_->OnCompletedRequest(); | 737 multipart_delegate_->OnCompletedRequest(); |
738 multipart_delegate_.reset(NULL); | 738 multipart_delegate_.reset(NULL); |
739 } | 739 } |
740 | 740 |
741 if (client_) { | 741 if (client_) { |
742 if (error_code != net::OK) { | 742 if (error_code != net::OK) { |
743 client_->didFail( | 743 client_->didFail( |
744 loader_, | 744 loader_, |
745 CreateWebURLError(request_.url(), stale_copy_in_cache, error_code)); | 745 CreateWebURLError(request_.url(), stale_copy_in_cache, error_code, |
| 746 was_ignored_by_handler)); |
746 } else { | 747 } else { |
747 if (request_.useStreamOnResponse()) { | 748 if (request_.useStreamOnResponse()) { |
748 got_all_stream_body_data_ = true; | 749 got_all_stream_body_data_ = true; |
749 if (body_stream_buffer_.empty()) { | 750 if (body_stream_buffer_.empty()) { |
750 // Close the handle to notify the end of data. | 751 // Close the handle to notify the end of data. |
751 body_stream_writer_.reset(); | 752 body_stream_writer_.reset(); |
752 client_->didFinishLoading( | 753 client_->didFinishLoading( |
753 loader_, (completion_time - TimeTicks()).InSecondsF(), | 754 loader_, (completion_time - TimeTicks()).InSecondsF(), |
754 total_transfer_size); | 755 total_transfer_size); |
755 } | 756 } |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1117 int intra_priority_value) { | 1118 int intra_priority_value) { |
1118 context_->DidChangePriority(new_priority, intra_priority_value); | 1119 context_->DidChangePriority(new_priority, intra_priority_value); |
1119 } | 1120 } |
1120 | 1121 |
1121 bool WebURLLoaderImpl::attachThreadedDataReceiver( | 1122 bool WebURLLoaderImpl::attachThreadedDataReceiver( |
1122 blink::WebThreadedDataReceiver* threaded_data_receiver) { | 1123 blink::WebThreadedDataReceiver* threaded_data_receiver) { |
1123 return context_->AttachThreadedDataReceiver(threaded_data_receiver); | 1124 return context_->AttachThreadedDataReceiver(threaded_data_receiver); |
1124 } | 1125 } |
1125 | 1126 |
1126 } // namespace content | 1127 } // namespace content |
OLD | NEW |