OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "net/http/http_pipelined_connection_impl.h" | 5 #include "net/http/http_pipelined_connection_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 int HttpPipelinedConnectionImpl::ReadResponseBody( | 608 int HttpPipelinedConnectionImpl::ReadResponseBody( |
609 int pipeline_id, IOBuffer* buf, int buf_len, | 609 int pipeline_id, IOBuffer* buf, int buf_len, |
610 const CompletionCallback& callback) { | 610 const CompletionCallback& callback) { |
611 CHECK(ContainsKey(stream_info_map_, pipeline_id)); | 611 CHECK(ContainsKey(stream_info_map_, pipeline_id)); |
612 CHECK_EQ(active_read_id_, pipeline_id); | 612 CHECK_EQ(active_read_id_, pipeline_id); |
613 CHECK(stream_info_map_[pipeline_id].parser.get()); | 613 CHECK(stream_info_map_[pipeline_id].parser.get()); |
614 return stream_info_map_[pipeline_id].parser->ReadResponseBody( | 614 return stream_info_map_[pipeline_id].parser->ReadResponseBody( |
615 buf, buf_len, callback); | 615 buf, buf_len, callback); |
616 } | 616 } |
617 | 617 |
618 uint64 HttpPipelinedConnectionImpl::GetUploadProgress(int pipeline_id) const { | 618 UploadProgress HttpPipelinedConnectionImpl::GetUploadProgress( |
| 619 int pipeline_id) const { |
619 CHECK(ContainsKey(stream_info_map_, pipeline_id)); | 620 CHECK(ContainsKey(stream_info_map_, pipeline_id)); |
620 CHECK(stream_info_map_.find(pipeline_id)->second.parser.get()); | 621 CHECK(stream_info_map_.find(pipeline_id)->second.parser.get()); |
621 return stream_info_map_.find(pipeline_id)->second.parser->GetUploadProgress(); | 622 return stream_info_map_.find(pipeline_id)->second.parser->GetUploadProgress(); |
622 } | 623 } |
623 | 624 |
624 HttpResponseInfo* HttpPipelinedConnectionImpl::GetResponseInfo( | 625 HttpResponseInfo* HttpPipelinedConnectionImpl::GetResponseInfo( |
625 int pipeline_id) { | 626 int pipeline_id) { |
626 CHECK(ContainsKey(stream_info_map_, pipeline_id)); | 627 CHECK(ContainsKey(stream_info_map_, pipeline_id)); |
627 CHECK(stream_info_map_.find(pipeline_id)->second.parser.get()); | 628 CHECK(stream_info_map_.find(pipeline_id)->second.parser.get()); |
628 return stream_info_map_.find(pipeline_id)->second.parser->GetResponseInfo(); | 629 return stream_info_map_.find(pipeline_id)->second.parser->GetResponseInfo(); |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
833 } | 834 } |
834 | 835 |
835 HttpPipelinedConnectionImpl::StreamInfo::StreamInfo() | 836 HttpPipelinedConnectionImpl::StreamInfo::StreamInfo() |
836 : state(STREAM_CREATED) { | 837 : state(STREAM_CREATED) { |
837 } | 838 } |
838 | 839 |
839 HttpPipelinedConnectionImpl::StreamInfo::~StreamInfo() { | 840 HttpPipelinedConnectionImpl::StreamInfo::~StreamInfo() { |
840 } | 841 } |
841 | 842 |
842 } // namespace net | 843 } // namespace net |
OLD | NEW |