| 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/socket/client_socket_pool_base.h" | 5 #include "net/socket/client_socket_pool_base.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 } | 81 } |
| 82 | 82 |
| 83 virtual const BoundNetLog& NetLog() const { | 83 virtual const BoundNetLog& NetLog() const { |
| 84 return net_log_; | 84 return net_log_; |
| 85 } | 85 } |
| 86 | 86 |
| 87 virtual void SetSubresourceSpeculation() {} | 87 virtual void SetSubresourceSpeculation() {} |
| 88 virtual void SetOmniboxSpeculation() {} | 88 virtual void SetOmniboxSpeculation() {} |
| 89 virtual bool WasEverUsed() const { return was_used_to_convey_data_; } | 89 virtual bool WasEverUsed() const { return was_used_to_convey_data_; } |
| 90 virtual bool UsingTCPFastOpen() const { return false; } | 90 virtual bool UsingTCPFastOpen() const { return false; } |
| 91 virtual int64 NumBytesRead() const { return -1; } |
| 92 virtual int GetConnectTimeMicros() const { return -1; } |
| 91 | 93 |
| 92 private: | 94 private: |
| 93 bool connected_; | 95 bool connected_; |
| 94 BoundNetLog net_log_; | 96 BoundNetLog net_log_; |
| 95 bool was_used_to_convey_data_; | 97 bool was_used_to_convey_data_; |
| 96 | 98 |
| 97 DISALLOW_COPY_AND_ASSIGN(MockClientSocket); | 99 DISALLOW_COPY_AND_ASSIGN(MockClientSocket); |
| 98 }; | 100 }; |
| 99 | 101 |
| 100 class TestConnectJob; | 102 class TestConnectJob; |
| (...skipping 3080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3181 // The hung connect job should still be there, but everything else should be | 3183 // The hung connect job should still be there, but everything else should be |
| 3182 // complete. | 3184 // complete. |
| 3183 EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a")); | 3185 EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a")); |
| 3184 EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a")); | 3186 EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a")); |
| 3185 EXPECT_EQ(1, pool_->NumActiveSocketsInGroup("a")); | 3187 EXPECT_EQ(1, pool_->NumActiveSocketsInGroup("a")); |
| 3186 } | 3188 } |
| 3187 | 3189 |
| 3188 } // namespace | 3190 } // namespace |
| 3189 | 3191 |
| 3190 } // namespace net | 3192 } // namespace net |
| OLD | NEW |