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

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

Issue 227473008: make SetReceiveBufferSize and SetSendBufferSize return net error codes (instead of bools) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Original CL, as was submitted, and previously reverted Created 6 years, 8 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
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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698