| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
| 9 #include "net/base/io_buffer.h" | 9 #include "net/base/io_buffer.h" |
| 10 #include "net/http/http_pipelined_stream.h" | 10 #include "net/http/http_pipelined_stream.h" |
| (...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 563 SSLCertRequestInfo* cert_request_info) { | 563 SSLCertRequestInfo* cert_request_info) { |
| 564 CHECK(ContainsKey(stream_info_map_, pipeline_id)); | 564 CHECK(ContainsKey(stream_info_map_, pipeline_id)); |
| 565 CHECK(stream_info_map_[pipeline_id].parser.get()); | 565 CHECK(stream_info_map_[pipeline_id].parser.get()); |
| 566 return stream_info_map_[pipeline_id].parser->GetSSLCertRequestInfo( | 566 return stream_info_map_[pipeline_id].parser->GetSSLCertRequestInfo( |
| 567 cert_request_info); | 567 cert_request_info); |
| 568 } | 568 } |
| 569 | 569 |
| 570 void HttpPipelinedConnectionImpl::FireUserCallback(int pipeline_id, | 570 void HttpPipelinedConnectionImpl::FireUserCallback(int pipeline_id, |
| 571 int result) { | 571 int result) { |
| 572 if (ContainsKey(stream_info_map_, pipeline_id)) { | 572 if (ContainsKey(stream_info_map_, pipeline_id)) { |
| 573 CHECK(stream_info_map_[pipeline_id].pending_user_callback); | |
| 574 stream_info_map_[pipeline_id].pending_user_callback->Run(result); | 573 stream_info_map_[pipeline_id].pending_user_callback->Run(result); |
| 575 } | 574 } |
| 576 } | 575 } |
| 577 | 576 |
| 578 int HttpPipelinedConnectionImpl::depth() const { | 577 int HttpPipelinedConnectionImpl::depth() const { |
| 579 return stream_info_map_.size(); | 578 return stream_info_map_.size(); |
| 580 } | 579 } |
| 581 | 580 |
| 582 bool HttpPipelinedConnectionImpl::usable() const { | 581 bool HttpPipelinedConnectionImpl::usable() const { |
| 583 return usable_; | 582 return usable_; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 611 | 610 |
| 612 HttpPipelinedConnectionImpl::StreamInfo::StreamInfo() | 611 HttpPipelinedConnectionImpl::StreamInfo::StreamInfo() |
| 613 : read_headers_callback(NULL), | 612 : read_headers_callback(NULL), |
| 614 state(STREAM_CREATED) { | 613 state(STREAM_CREATED) { |
| 615 } | 614 } |
| 616 | 615 |
| 617 HttpPipelinedConnectionImpl::StreamInfo::~StreamInfo() { | 616 HttpPipelinedConnectionImpl::StreamInfo::~StreamInfo() { |
| 618 } | 617 } |
| 619 | 618 |
| 620 } // namespace net | 619 } // namespace net |
| OLD | NEW |