| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 } | 732 } |
| 733 | 733 |
| 734 if (body_stream_writer_ && error_code != net::OK) | 734 if (body_stream_writer_ && error_code != net::OK) |
| 735 body_stream_writer_->Fail(); | 735 body_stream_writer_->Fail(); |
| 736 body_stream_writer_.reset(); | 736 body_stream_writer_.reset(); |
| 737 | 737 |
| 738 if (client_) { | 738 if (client_) { |
| 739 if (error_code != net::OK) { | 739 if (error_code != net::OK) { |
| 740 client_->didFail( | 740 client_->didFail( |
| 741 loader_, | 741 loader_, |
| 742 CreateWebURLError(request_.url(), stale_copy_in_cache, error_code)); | 742 CreateWebURLError(request_.url(), stale_copy_in_cache, error_code, |
| 743 was_ignored_by_handler)); |
| 743 } else { | 744 } else { |
| 744 client_->didFinishLoading(loader_, | 745 client_->didFinishLoading(loader_, |
| 745 (completion_time - TimeTicks()).InSecondsF(), | 746 (completion_time - TimeTicks()).InSecondsF(), |
| 746 total_transfer_size); | 747 total_transfer_size); |
| 747 } | 748 } |
| 748 } | 749 } |
| 749 } | 750 } |
| 750 | 751 |
| 751 WebURLLoaderImpl::Context::~Context() { | 752 WebURLLoaderImpl::Context::~Context() { |
| 752 if (request_id_ >= 0) { | 753 if (request_id_ >= 0) { |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1000 int intra_priority_value) { | 1001 int intra_priority_value) { |
| 1001 context_->DidChangePriority(new_priority, intra_priority_value); | 1002 context_->DidChangePriority(new_priority, intra_priority_value); |
| 1002 } | 1003 } |
| 1003 | 1004 |
| 1004 bool WebURLLoaderImpl::attachThreadedDataReceiver( | 1005 bool WebURLLoaderImpl::attachThreadedDataReceiver( |
| 1005 blink::WebThreadedDataReceiver* threaded_data_receiver) { | 1006 blink::WebThreadedDataReceiver* threaded_data_receiver) { |
| 1006 return context_->AttachThreadedDataReceiver(threaded_data_receiver); | 1007 return context_->AttachThreadedDataReceiver(threaded_data_receiver); |
| 1007 } | 1008 } |
| 1008 | 1009 |
| 1009 } // namespace content | 1010 } // namespace content |
| OLD | NEW |