OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/platform_thread.h" | 10 #include "base/platform_thread.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 | 52 |
53 virtual int Connect(CompletionCallback* callback, LoadLog* load_log) { | 53 virtual int Connect(CompletionCallback* callback, LoadLog* load_log) { |
54 connected_ = true; | 54 connected_ = true; |
55 return OK; | 55 return OK; |
56 } | 56 } |
57 | 57 |
58 virtual void Disconnect() { connected_ = false; } | 58 virtual void Disconnect() { connected_ = false; } |
59 virtual bool IsConnected() const { return connected_; } | 59 virtual bool IsConnected() const { return connected_; } |
60 virtual bool IsConnectedAndIdle() const { return connected_; } | 60 virtual bool IsConnectedAndIdle() const { return connected_; } |
61 | 61 |
62 virtual int GetPeerName(struct sockaddr* /* name */, | 62 virtual int GetPeerAddress(AddressList* /* address */) const { |
63 socklen_t* /* namelen */) { | |
64 return ERR_UNEXPECTED; | 63 return ERR_UNEXPECTED; |
65 } | 64 } |
66 | 65 |
67 private: | 66 private: |
68 bool connected_; | 67 bool connected_; |
69 | 68 |
70 DISALLOW_COPY_AND_ASSIGN(MockClientSocket); | 69 DISALLOW_COPY_AND_ASSIGN(MockClientSocket); |
71 }; | 70 }; |
72 | 71 |
73 class TestConnectJob; | 72 class TestConnectJob; |
(...skipping 1372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1446 EXPECT_EQ(3, GetOrderOfRequest(3)); | 1445 EXPECT_EQ(3, GetOrderOfRequest(3)); |
1447 EXPECT_EQ(4, GetOrderOfRequest(4)); | 1446 EXPECT_EQ(4, GetOrderOfRequest(4)); |
1448 | 1447 |
1449 // Make sure we test order of all requests made. | 1448 // Make sure we test order of all requests made. |
1450 EXPECT_EQ(kIndexOutOfBounds, GetOrderOfRequest(5)); | 1449 EXPECT_EQ(kIndexOutOfBounds, GetOrderOfRequest(5)); |
1451 } | 1450 } |
1452 | 1451 |
1453 } // namespace | 1452 } // namespace |
1454 | 1453 |
1455 } // namespace net | 1454 } // namespace net |
OLD | NEW |