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

Side by Side Diff: net/base/client_socket_pool_unittest.cc

Issue 87073: Extend the use of IOBuffers to the code underneath... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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 | « no previous file | net/base/socket.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "base/message_loop.h" 5 #include "base/message_loop.h"
6 #include "net/base/client_socket.h" 6 #include "net/base/client_socket.h"
7 #include "net/base/client_socket_handle.h" 7 #include "net/base/client_socket_handle.h"
8 #include "net/base/client_socket_pool.h" 8 #include "net/base/client_socket_pool.h"
9 #include "net/base/net_errors.h" 9 #include "net/base/net_errors.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 25 matching lines...) Expand all
36 connected_ = false; 36 connected_ = false;
37 } 37 }
38 virtual bool IsConnected() const { 38 virtual bool IsConnected() const {
39 return connected_; 39 return connected_;
40 } 40 }
41 virtual bool IsConnectedAndIdle() const { 41 virtual bool IsConnectedAndIdle() const {
42 return connected_; 42 return connected_;
43 } 43 }
44 44
45 // Socket methods: 45 // Socket methods:
46 virtual int Read(char* buf, int buf_len, 46 virtual int Read(net::IOBuffer* buf, int buf_len,
47 net::CompletionCallback* callback) { 47 net::CompletionCallback* callback) {
48 return net::ERR_FAILED; 48 return net::ERR_FAILED;
49 } 49 }
50 virtual int Write(const char* buf, int buf_len, 50 virtual int Write(net::IOBuffer* buf, int buf_len,
51 net::CompletionCallback* callback) { 51 net::CompletionCallback* callback) {
52 return net::ERR_FAILED; 52 return net::ERR_FAILED;
53 } 53 }
54 54
55 static int allocation_count; 55 static int allocation_count;
56 56
57 private: 57 private:
58 bool connected_; 58 bool connected_;
59 }; 59 };
60 60
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 "Request " << kMaxSocketsPerGroup + i << " was not in order."; 283 "Request " << kMaxSocketsPerGroup + i << " was not in order.";
284 } 284 }
285 285
286 EXPECT_EQ(request_order_[arraysize(reqs) - 2], 286 EXPECT_EQ(request_order_[arraysize(reqs) - 2],
287 reqs[arraysize(reqs) - 1].get()) << 287 reqs[arraysize(reqs) - 1].get()) <<
288 "The last request with priority 1 should not have been inserted " 288 "The last request with priority 1 should not have been inserted "
289 "earlier into the queue."; 289 "earlier into the queue.";
290 } 290 }
291 291
292 } // namespace 292 } // namespace
OLDNEW
« no previous file with comments | « no previous file | net/base/socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698