| 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/socket/client_socket_pool_base.h" | 5 #include "net/socket/client_socket_pool_base.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 | 170 |
| 171 const BoundNetLog& NetLog() const override { return net_log_; } | 171 const BoundNetLog& NetLog() const override { return net_log_; } |
| 172 | 172 |
| 173 void SetSubresourceSpeculation() override {} | 173 void SetSubresourceSpeculation() override {} |
| 174 void SetOmniboxSpeculation() override {} | 174 void SetOmniboxSpeculation() override {} |
| 175 bool WasEverUsed() const override { return was_used_to_convey_data_; } | 175 bool WasEverUsed() const override { return was_used_to_convey_data_; } |
| 176 bool UsingTCPFastOpen() const override { return false; } | 176 bool UsingTCPFastOpen() const override { return false; } |
| 177 bool WasNpnNegotiated() const override { return false; } | 177 bool WasNpnNegotiated() const override { return false; } |
| 178 NextProto GetNegotiatedProtocol() const override { return kProtoUnknown; } | 178 NextProto GetNegotiatedProtocol() const override { return kProtoUnknown; } |
| 179 bool GetSSLInfo(SSLInfo* ssl_info) override { return false; } | 179 bool GetSSLInfo(SSLInfo* ssl_info) override { return false; } |
| 180 void GetConnectionAttempts(ConnectionAttempts* out) const override { |
| 181 out->clear(); |
| 182 } |
| 183 void ClearConnectionAttempts() override {} |
| 184 void AddConnectionAttempts(const ConnectionAttempts& attempts) override {} |
| 180 | 185 |
| 181 private: | 186 private: |
| 182 bool connected_; | 187 bool connected_; |
| 183 bool has_unread_data_; | 188 bool has_unread_data_; |
| 184 BoundNetLog net_log_; | 189 BoundNetLog net_log_; |
| 185 bool was_used_to_convey_data_; | 190 bool was_used_to_convey_data_; |
| 186 | 191 |
| 187 DISALLOW_COPY_AND_ASSIGN(MockClientSocket); | 192 DISALLOW_COPY_AND_ASSIGN(MockClientSocket); |
| 188 }; | 193 }; |
| 189 | 194 |
| (...skipping 3930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4120 request(1)->handle()->Reset(); | 4125 request(1)->handle()->Reset(); |
| 4121 ASSERT_EQ(1, pool_->NumConnectJobsInGroup("a")); | 4126 ASSERT_EQ(1, pool_->NumConnectJobsInGroup("a")); |
| 4122 | 4127 |
| 4123 EXPECT_EQ(OK, request(2)->WaitForResult()); | 4128 EXPECT_EQ(OK, request(2)->WaitForResult()); |
| 4124 EXPECT_FALSE(request(1)->have_result()); | 4129 EXPECT_FALSE(request(1)->have_result()); |
| 4125 } | 4130 } |
| 4126 | 4131 |
| 4127 } // namespace | 4132 } // namespace |
| 4128 | 4133 |
| 4129 } // namespace net | 4134 } // namespace net |
| OLD | NEW |