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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 } | 138 } |
139 return ERR_UNEXPECTED; | 139 return ERR_UNEXPECTED; |
140 } | 140 } |
141 | 141 |
142 virtual int Write( | 142 virtual int Write( |
143 IOBuffer* /* buf */, int len, | 143 IOBuffer* /* buf */, int len, |
144 const CompletionCallback& /* callback */) OVERRIDE { | 144 const CompletionCallback& /* callback */) OVERRIDE { |
145 was_used_to_convey_data_ = true; | 145 was_used_to_convey_data_ = true; |
146 return len; | 146 return len; |
147 } | 147 } |
148 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE { return true; } | 148 virtual int SetReceiveBufferSize(int32 size) OVERRIDE { return OK; } |
149 virtual bool SetSendBufferSize(int32 size) OVERRIDE { return true; } | 149 virtual int SetSendBufferSize(int32 size) OVERRIDE { return OK; } |
150 | 150 |
151 // StreamSocket implementation. | 151 // StreamSocket implementation. |
152 virtual int Connect(const CompletionCallback& callback) OVERRIDE { | 152 virtual int Connect(const CompletionCallback& callback) OVERRIDE { |
153 connected_ = true; | 153 connected_ = true; |
154 return OK; | 154 return OK; |
155 } | 155 } |
156 | 156 |
157 virtual void Disconnect() OVERRIDE { connected_ = false; } | 157 virtual void Disconnect() OVERRIDE { connected_ = false; } |
158 virtual bool IsConnected() const OVERRIDE { return connected_; } | 158 virtual bool IsConnected() const OVERRIDE { return connected_; } |
159 virtual bool IsConnectedAndIdle() const OVERRIDE { | 159 virtual bool IsConnectedAndIdle() const OVERRIDE { |
(...skipping 3960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4120 request(1)->handle()->Reset(); | 4120 request(1)->handle()->Reset(); |
4121 ASSERT_EQ(1, pool_->NumConnectJobsInGroup("a")); | 4121 ASSERT_EQ(1, pool_->NumConnectJobsInGroup("a")); |
4122 | 4122 |
4123 EXPECT_EQ(OK, request(2)->WaitForResult()); | 4123 EXPECT_EQ(OK, request(2)->WaitForResult()); |
4124 EXPECT_FALSE(request(1)->have_result()); | 4124 EXPECT_FALSE(request(1)->have_result()); |
4125 } | 4125 } |
4126 | 4126 |
4127 } // namespace | 4127 } // namespace |
4128 | 4128 |
4129 } // namespace net | 4129 } // namespace net |
OLD | NEW |