| 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_pool.h" | 5 #include "net/http/http_pipelined_host_pool.h" |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/rand_util.h" | 8 #include "base/rand_util.h" |
| 9 #include "net/base/ssl_config_service.h" | 9 #include "net/base/ssl_config_service.h" |
| 10 #include "net/http/http_pipelined_host.h" | 10 #include "net/http/http_pipelined_host.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 MOCK_METHOD5(CreateNewHost, HttpPipelinedHost*( | 39 MOCK_METHOD5(CreateNewHost, HttpPipelinedHost*( |
| 40 HttpPipelinedHost::Delegate* delegate, | 40 HttpPipelinedHost::Delegate* delegate, |
| 41 const HttpPipelinedHost::Key& key, | 41 const HttpPipelinedHost::Key& key, |
| 42 HttpPipelinedConnection::Factory* factory, | 42 HttpPipelinedConnection::Factory* factory, |
| 43 HttpPipelinedHostCapability capability, | 43 HttpPipelinedHostCapability capability, |
| 44 bool force_pipelining)); | 44 bool force_pipelining)); |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 class MockHost : public HttpPipelinedHost { | 47 class MockHost : public HttpPipelinedHost { |
| 48 public: | 48 public: |
| 49 MockHost(const Key& key) | 49 explicit MockHost(const Key& key) |
| 50 : key_(key) { | 50 : key_(key) { |
| 51 } | 51 } |
| 52 | 52 |
| 53 MOCK_METHOD6(CreateStreamOnNewPipeline, HttpPipelinedStream*( | 53 MOCK_METHOD6(CreateStreamOnNewPipeline, HttpPipelinedStream*( |
| 54 ClientSocketHandle* connection, | 54 ClientSocketHandle* connection, |
| 55 const SSLConfig& used_ssl_config, | 55 const SSLConfig& used_ssl_config, |
| 56 const ProxyInfo& used_proxy_info, | 56 const ProxyInfo& used_proxy_info, |
| 57 const BoundNetLog& net_log, | 57 const BoundNetLog& net_log, |
| 58 bool was_npn_negotiated, | 58 bool was_npn_negotiated, |
| 59 NextProto protocol_negotiated)); | 59 NextProto protocol_negotiated)); |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 pool_->OnHostIdle(host1); | 252 pool_->OnHostIdle(host1); |
| 253 pool_->OnHostIdle(host2); | 253 pool_->OnHostIdle(host2); |
| 254 pool_->OnHostIdle(host3); | 254 pool_->OnHostIdle(host3); |
| 255 | 255 |
| 256 delete host_; // Must manually delete, because it's never added to |pool_|. | 256 delete host_; // Must manually delete, because it's never added to |pool_|. |
| 257 } | 257 } |
| 258 | 258 |
| 259 } // anonymous namespace | 259 } // anonymous namespace |
| 260 | 260 |
| 261 } // namespace net | 261 } // namespace net |
| OLD | NEW |