Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Side by Side Diff: net/socket/client_socket_pool_base_unittest.cc

Issue 10491007: fixed issue 128383 - replace GetPeerAddress(AddressList* address) with GetPeerAddress(IPEndPoint* a… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix according to review Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/socket/buffered_write_stream_socket.cc ('k') | net/socket/socket_test_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 // StreamSocket implementation. 86 // StreamSocket implementation.
87 virtual int Connect(const CompletionCallback& callback) OVERRIDE { 87 virtual int Connect(const CompletionCallback& callback) OVERRIDE {
88 connected_ = true; 88 connected_ = true;
89 return OK; 89 return OK;
90 } 90 }
91 91
92 virtual void Disconnect() { connected_ = false; } 92 virtual void Disconnect() { connected_ = false; }
93 virtual bool IsConnected() const { return connected_; } 93 virtual bool IsConnected() const { return connected_; }
94 virtual bool IsConnectedAndIdle() const { return connected_; } 94 virtual bool IsConnectedAndIdle() const { return connected_; }
95 95
96 virtual int GetPeerAddress(AddressList* /* address */) const { 96 virtual int GetPeerAddress(IPEndPoint* /* address */) const {
97 return ERR_UNEXPECTED; 97 return ERR_UNEXPECTED;
98 } 98 }
99 99
100 virtual int GetLocalAddress(IPEndPoint* /* address */) const { 100 virtual int GetLocalAddress(IPEndPoint* /* address */) const {
101 return ERR_UNEXPECTED; 101 return ERR_UNEXPECTED;
102 } 102 }
103 103
104 virtual const BoundNetLog& NetLog() const { 104 virtual const BoundNetLog& NetLog() const {
105 return net_log_; 105 return net_log_;
106 } 106 }
(...skipping 3372 matching lines...) Expand 10 before | Expand all | Expand 10 after
3479 // The hung connect job should still be there, but everything else should be 3479 // The hung connect job should still be there, but everything else should be
3480 // complete. 3480 // complete.
3481 EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a")); 3481 EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
3482 EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a")); 3482 EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
3483 EXPECT_EQ(1, pool_->NumActiveSocketsInGroup("a")); 3483 EXPECT_EQ(1, pool_->NumActiveSocketsInGroup("a"));
3484 } 3484 }
3485 3485
3486 } // namespace 3486 } // namespace
3487 3487
3488 } // namespace net 3488 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/buffered_write_stream_socket.cc ('k') | net/socket/socket_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698