| 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_host_impl.h" | 5 #include "net/http/http_pipelined_host_impl.h" |
| 6 | 6 |
| 7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "net/http/http_pipelined_connection_impl.h" | 9 #include "net/http/http_pipelined_connection_impl.h" |
| 10 #include "net/http/http_pipelined_stream.h" | 10 #include "net/http/http_pipelined_stream.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 HttpPipelinedHostImpl::~HttpPipelinedHostImpl() { | 36 HttpPipelinedHostImpl::~HttpPipelinedHostImpl() { |
| 37 CHECK(pipelines_.empty()); | 37 CHECK(pipelines_.empty()); |
| 38 } | 38 } |
| 39 | 39 |
| 40 HttpPipelinedStream* HttpPipelinedHostImpl::CreateStreamOnNewPipeline( | 40 HttpPipelinedStream* HttpPipelinedHostImpl::CreateStreamOnNewPipeline( |
| 41 ClientSocketHandle* connection, | 41 ClientSocketHandle* connection, |
| 42 const SSLConfig& used_ssl_config, | 42 const SSLConfig& used_ssl_config, |
| 43 const ProxyInfo& used_proxy_info, | 43 const ProxyInfo& used_proxy_info, |
| 44 const BoundNetLog& net_log, | 44 const BoundNetLog& net_log, |
| 45 bool was_npn_negotiated, | 45 bool was_npn_negotiated, |
| 46 SSLClientSocket::NextProto protocol_negotiated) { | 46 NextProto protocol_negotiated) { |
| 47 if (capability_ == PIPELINE_INCAPABLE) { | 47 if (capability_ == PIPELINE_INCAPABLE) { |
| 48 return NULL; | 48 return NULL; |
| 49 } | 49 } |
| 50 HttpPipelinedConnection* pipeline = factory_->CreateNewPipeline( | 50 HttpPipelinedConnection* pipeline = factory_->CreateNewPipeline( |
| 51 connection, this, key_.origin(), used_ssl_config, used_proxy_info, | 51 connection, this, key_.origin(), used_ssl_config, used_proxy_info, |
| 52 net_log, was_npn_negotiated, protocol_negotiated); | 52 net_log, was_npn_negotiated, protocol_negotiated); |
| 53 PipelineInfo info; | 53 PipelineInfo info; |
| 54 pipelines_.insert(std::make_pair(pipeline, info)); | 54 pipelines_.insert(std::make_pair(pipeline, info)); |
| 55 return pipeline->CreateNewStream(); | 55 return pipeline->CreateNewStream(); |
| 56 } | 56 } |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 list_value->Append(pipeline_dict); | 205 list_value->Append(pipeline_dict); |
| 206 } | 206 } |
| 207 return list_value; | 207 return list_value; |
| 208 } | 208 } |
| 209 | 209 |
| 210 HttpPipelinedHostImpl::PipelineInfo::PipelineInfo() | 210 HttpPipelinedHostImpl::PipelineInfo::PipelineInfo() |
| 211 : num_successes(0) { | 211 : num_successes(0) { |
| 212 } | 212 } |
| 213 | 213 |
| 214 } // namespace net | 214 } // namespace net |
| OLD | NEW |