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

Side by Side Diff: remoting/protocol/channel_multiplexer.cc

Issue 217573002: make SetReceiveBufferSize and SetSendBufferSize return net error codes (instead of bools) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: process error code in quic_stream_factory 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 "remoting/protocol/channel_multiplexer.h" 5 #include "remoting/protocol/channel_multiplexer.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 void OnWriteComplete(); 109 void OnWriteComplete();
110 void OnWriteFailed(); 110 void OnWriteFailed();
111 void OnPacketReceived(); 111 void OnPacketReceived();
112 112
113 // net::StreamSocket interface. 113 // net::StreamSocket interface.
114 virtual int Read(net::IOBuffer* buffer, int buffer_len, 114 virtual int Read(net::IOBuffer* buffer, int buffer_len,
115 const net::CompletionCallback& callback) OVERRIDE; 115 const net::CompletionCallback& callback) OVERRIDE;
116 virtual int Write(net::IOBuffer* buffer, int buffer_len, 116 virtual int Write(net::IOBuffer* buffer, int buffer_len,
117 const net::CompletionCallback& callback) OVERRIDE; 117 const net::CompletionCallback& callback) OVERRIDE;
118 118
119 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE { 119 virtual int SetReceiveBufferSize(int32 size) OVERRIDE {
120 NOTIMPLEMENTED(); 120 NOTIMPLEMENTED();
121 return false; 121 return net::ERR_NOT_IMPLEMENTED;
wtc 2014/03/29 13:30:12 I also like net::ERR_NOT_IMPLEMENTED, but for cons
jar (doing other things) 2014/04/01 23:50:39 I switched the others to ERR_NOT_IMPLEMENTED, whic
122 } 122 }
123 virtual bool SetSendBufferSize(int32 size) OVERRIDE { 123 virtual int SetSendBufferSize(int32 size) OVERRIDE {
124 NOTIMPLEMENTED(); 124 NOTIMPLEMENTED();
125 return false; 125 return net::ERR_NOT_IMPLEMENTED;
126 } 126 }
127 127
128 virtual int Connect(const net::CompletionCallback& callback) OVERRIDE { 128 virtual int Connect(const net::CompletionCallback& callback) OVERRIDE {
129 NOTIMPLEMENTED(); 129 NOTIMPLEMENTED();
130 return net::ERR_FAILED; 130 return net::ERR_FAILED;
131 } 131 }
132 virtual void Disconnect() OVERRIDE { 132 virtual void Disconnect() OVERRIDE {
133 NOTIMPLEMENTED(); 133 NOTIMPLEMENTED();
134 } 134 }
135 virtual bool IsConnected() const OVERRIDE { 135 virtual bool IsConnected() const OVERRIDE {
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 channel->OnIncomingPacket(packet.Pass(), done_task); 510 channel->OnIncomingPacket(packet.Pass(), done_task);
511 } 511 }
512 512
513 bool ChannelMultiplexer::DoWrite(scoped_ptr<MultiplexPacket> packet, 513 bool ChannelMultiplexer::DoWrite(scoped_ptr<MultiplexPacket> packet,
514 const base::Closure& done_task) { 514 const base::Closure& done_task) {
515 return writer_.Write(SerializeAndFrameMessage(*packet), done_task); 515 return writer_.Write(SerializeAndFrameMessage(*packet), done_task);
516 } 516 }
517 517
518 } // namespace protocol 518 } // namespace protocol
519 } // namespace remoting 519 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698