| 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_forced.h" | 5 #include "net/http/http_pipelined_host_forced.h" |
| 6 | 6 |
| 7 #include "base/values.h" | 7 #include "base/values.h" |
| 8 #include "net/http/http_pipelined_connection_impl.h" | 8 #include "net/http/http_pipelined_connection_impl.h" |
| 9 #include "net/http/http_pipelined_stream.h" | 9 #include "net/http/http_pipelined_stream.h" |
| 10 #include "net/socket/buffered_write_stream_socket.h" | 10 #include "net/socket/buffered_write_stream_socket.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 HttpPipelinedHostForced::~HttpPipelinedHostForced() { | 31 HttpPipelinedHostForced::~HttpPipelinedHostForced() { |
| 32 CHECK(!pipeline_.get()); | 32 CHECK(!pipeline_.get()); |
| 33 } | 33 } |
| 34 | 34 |
| 35 HttpPipelinedStream* HttpPipelinedHostForced::CreateStreamOnNewPipeline( | 35 HttpPipelinedStream* HttpPipelinedHostForced::CreateStreamOnNewPipeline( |
| 36 ClientSocketHandle* connection, | 36 ClientSocketHandle* connection, |
| 37 const SSLConfig& used_ssl_config, | 37 const SSLConfig& used_ssl_config, |
| 38 const ProxyInfo& used_proxy_info, | 38 const ProxyInfo& used_proxy_info, |
| 39 const BoundNetLog& net_log, | 39 const BoundNetLog& net_log, |
| 40 bool was_npn_negotiated, | 40 bool was_npn_negotiated, |
| 41 SSLClientSocket::NextProto protocol_negotiated) { | 41 NextProto protocol_negotiated) { |
| 42 CHECK(!pipeline_.get()); | 42 CHECK(!pipeline_.get()); |
| 43 StreamSocket* wrapped_socket = connection->release_socket(); | 43 StreamSocket* wrapped_socket = connection->release_socket(); |
| 44 BufferedWriteStreamSocket* buffered_socket = new BufferedWriteStreamSocket( | 44 BufferedWriteStreamSocket* buffered_socket = new BufferedWriteStreamSocket( |
| 45 wrapped_socket); | 45 wrapped_socket); |
| 46 connection->set_socket(buffered_socket); | 46 connection->set_socket(buffered_socket); |
| 47 pipeline_.reset(factory_->CreateNewPipeline( | 47 pipeline_.reset(factory_->CreateNewPipeline( |
| 48 connection, this, key_.origin(), used_ssl_config, used_proxy_info, | 48 connection, this, key_.origin(), used_ssl_config, used_proxy_info, |
| 49 net_log, was_npn_negotiated, protocol_negotiated)); | 49 net_log, was_npn_negotiated, protocol_negotiated)); |
| 50 return pipeline_->CreateNewStream(); | 50 return pipeline_->CreateNewStream(); |
| 51 } | 51 } |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 pipeline_dict->SetInteger("capacity", 1000); | 99 pipeline_dict->SetInteger("capacity", 1000); |
| 100 pipeline_dict->SetBoolean("usable", pipeline_->usable()); | 100 pipeline_dict->SetBoolean("usable", pipeline_->usable()); |
| 101 pipeline_dict->SetBoolean("active", pipeline_->active()); | 101 pipeline_dict->SetBoolean("active", pipeline_->active()); |
| 102 pipeline_dict->SetInteger("source_id", pipeline_->net_log().source().id); | 102 pipeline_dict->SetInteger("source_id", pipeline_->net_log().source().id); |
| 103 list_value->Append(pipeline_dict); | 103 list_value->Append(pipeline_dict); |
| 104 } | 104 } |
| 105 return list_value; | 105 return list_value; |
| 106 } | 106 } |
| 107 | 107 |
| 108 } // namespace net | 108 } // namespace net |
| OLD | NEW |