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

Side by Side Diff: jingle/glue/pseudotcp_adapter_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: fix linux typo 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 "jingle/glue/pseudotcp_adapter.h" 5 #include "jingle/glue/pseudotcp_adapter.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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 FROM_HERE, 135 FROM_HERE,
136 base::Bind(&FakeSocket::AppendInputPacket, 136 base::Bind(&FakeSocket::AppendInputPacket,
137 base::Unretained(peer_socket_), 137 base::Unretained(peer_socket_),
138 std::vector<char>(buf->data(), buf->data() + buf_len)), 138 std::vector<char>(buf->data(), buf->data() + buf_len)),
139 base::TimeDelta::FromMilliseconds(latency_ms_)); 139 base::TimeDelta::FromMilliseconds(latency_ms_));
140 } 140 }
141 141
142 return buf_len; 142 return buf_len;
143 } 143 }
144 144
145 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE { 145 virtual int SetReceiveBufferSize(int32 size) OVERRIDE {
146 NOTIMPLEMENTED(); 146 NOTIMPLEMENTED();
147 return false; 147 return net::ERR_NOT_IMPLEMENTED;
148 } 148 }
149 virtual bool SetSendBufferSize(int32 size) OVERRIDE { 149 virtual int SetSendBufferSize(int32 size) OVERRIDE {
150 NOTIMPLEMENTED(); 150 NOTIMPLEMENTED();
151 return false; 151 return net::ERR_NOT_IMPLEMENTED;
152 } 152 }
153 153
154 private: 154 private:
155 scoped_refptr<net::IOBuffer> read_buffer_; 155 scoped_refptr<net::IOBuffer> read_buffer_;
156 int read_buffer_size_; 156 int read_buffer_size_;
157 net::CompletionCallback read_callback_; 157 net::CompletionCallback read_callback_;
158 158
159 std::deque<std::vector<char> > incoming_packets_; 159 std::deque<std::vector<char> > incoming_packets_;
160 160
161 FakeSocket* peer_socket_; 161 FakeSocket* peer_socket_;
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 client_pseudotcp_.get()); 433 client_pseudotcp_.get());
434 434
435 tester->Start(); 435 tester->Start();
436 message_loop_.Run(); 436 message_loop_.Run();
437 tester->CheckResults(); 437 tester->CheckResults();
438 } 438 }
439 439
440 } // namespace 440 } // namespace
441 441
442 } // namespace jingle_glue 442 } // namespace jingle_glue
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698