summaryrefslogtreecommitdiffstats
path: root/remoting/protocol
diff options
context:
space:
mode:
authorjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-05 03:52:22 +0000
committerjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-05 03:52:22 +0000
commit27f82f41d1f44a33a87e50622c7012a81a343b40 (patch)
treebef9d33568018f9679482488628b88ad3ea523cc /remoting/protocol
parent41b64e8a42afd40536aa9c06be8dff1196079c48 (diff)
downloadchromium_src-27f82f41d1f44a33a87e50622c7012a81a343b40.zip
chromium_src-27f82f41d1f44a33a87e50622c7012a81a343b40.tar.gz
chromium_src-27f82f41d1f44a33a87e50622c7012a81a343b40.tar.bz2
make SetReceiveBufferSize and SetSendBufferSize return net error codes (instead of bools)
TBR=sergeyu,yzshen R=wtc BUG=355222 Review URL: https://codereview.chromium.org/217573002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261966 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/protocol')
-rw-r--r--remoting/protocol/channel_multiplexer.cc16
-rw-r--r--remoting/protocol/fake_session.cc20
-rw-r--r--remoting/protocol/fake_session.h8
3 files changed, 23 insertions, 21 deletions
diff --git a/remoting/protocol/channel_multiplexer.cc b/remoting/protocol/channel_multiplexer.cc
index 2988f22..3f7466c 100644
--- a/remoting/protocol/channel_multiplexer.cc
+++ b/remoting/protocol/channel_multiplexer.cc
@@ -116,25 +116,25 @@ class ChannelMultiplexer::MuxSocket : public net::StreamSocket,
virtual int Write(net::IOBuffer* buffer, int buffer_len,
const net::CompletionCallback& callback) OVERRIDE;
- virtual bool SetReceiveBufferSize(int32 size) OVERRIDE {
+ virtual int SetReceiveBufferSize(int32 size) OVERRIDE {
NOTIMPLEMENTED();
- return false;
+ return net::ERR_NOT_IMPLEMENTED;
}
- virtual bool SetSendBufferSize(int32 size) OVERRIDE {
+ virtual int SetSendBufferSize(int32 size) OVERRIDE {
NOTIMPLEMENTED();
- return false;
+ return net::ERR_NOT_IMPLEMENTED;
}
virtual int Connect(const net::CompletionCallback& callback) OVERRIDE {
NOTIMPLEMENTED();
- return net::ERR_FAILED;
+ return net::ERR_NOT_IMPLEMENTED;
}
virtual void Disconnect() OVERRIDE {
NOTIMPLEMENTED();
}
virtual bool IsConnected() const OVERRIDE {
NOTIMPLEMENTED();
- return true;
+ return false;
}
virtual bool IsConnectedAndIdle() const OVERRIDE {
NOTIMPLEMENTED();
@@ -142,11 +142,11 @@ class ChannelMultiplexer::MuxSocket : public net::StreamSocket,
}
virtual int GetPeerAddress(net::IPEndPoint* address) const OVERRIDE {
NOTIMPLEMENTED();
- return net::ERR_FAILED;
+ return net::ERR_NOT_IMPLEMENTED;
}
virtual int GetLocalAddress(net::IPEndPoint* address) const OVERRIDE {
NOTIMPLEMENTED();
- return net::ERR_FAILED;
+ return net::ERR_NOT_IMPLEMENTED;
}
virtual const net::BoundNetLog& NetLog() const OVERRIDE {
NOTIMPLEMENTED();
diff --git a/remoting/protocol/fake_session.cc b/remoting/protocol/fake_session.cc
index 1ce0675..213ae0b 100644
--- a/remoting/protocol/fake_session.cc
+++ b/remoting/protocol/fake_session.cc
@@ -136,13 +136,14 @@ void FakeSocket::DoWrite(net::IOBuffer* buf, int buf_len) {
}
}
-bool FakeSocket::SetReceiveBufferSize(int32 size) {
+int FakeSocket::SetReceiveBufferSize(int32 size) {
NOTIMPLEMENTED();
- return false;
+ return net::ERR_NOT_IMPLEMENTED;
}
-bool FakeSocket::SetSendBufferSize(int32 size) {
+
+int FakeSocket::SetSendBufferSize(int32 size) {
NOTIMPLEMENTED();
- return false;
+ return net::ERR_NOT_IMPLEMENTED;
}
int FakeSocket::Connect(const net::CompletionCallback& callback) {
@@ -172,7 +173,7 @@ int FakeSocket::GetPeerAddress(net::IPEndPoint* address) const {
int FakeSocket::GetLocalAddress(net::IPEndPoint* address) const {
NOTIMPLEMENTED();
- return net::ERR_FAILED;
+ return net::ERR_NOT_IMPLEMENTED;
}
const net::BoundNetLog& FakeSocket::NetLog() const {
@@ -263,13 +264,14 @@ int FakeUdpSocket::Write(net::IOBuffer* buf, int buf_len,
return buf_len;
}
-bool FakeUdpSocket::SetReceiveBufferSize(int32 size) {
+int FakeUdpSocket::SetReceiveBufferSize(int32 size) {
NOTIMPLEMENTED();
- return false;
+ return net::ERR_NOT_IMPLEMENTED;
}
-bool FakeUdpSocket::SetSendBufferSize(int32 size) {
+
+int FakeUdpSocket::SetSendBufferSize(int32 size) {
NOTIMPLEMENTED();
- return false;
+ return net::ERR_NOT_IMPLEMENTED;
}
FakeSession::FakeSession()
diff --git a/remoting/protocol/fake_session.h b/remoting/protocol/fake_session.h
index 471b336..01f79c7 100644
--- a/remoting/protocol/fake_session.h
+++ b/remoting/protocol/fake_session.h
@@ -58,8 +58,8 @@ class FakeSocket : public net::StreamSocket {
virtual int Write(net::IOBuffer* buf, int buf_len,
const net::CompletionCallback& callback) OVERRIDE;
- virtual bool SetReceiveBufferSize(int32 size) OVERRIDE;
- virtual bool SetSendBufferSize(int32 size) OVERRIDE;
+ virtual int SetReceiveBufferSize(int32 size) OVERRIDE;
+ virtual int SetSendBufferSize(int32 size) OVERRIDE;
// net::StreamSocket interface.
virtual int Connect(const net::CompletionCallback& callback) OVERRIDE;
@@ -127,8 +127,8 @@ class FakeUdpSocket : public net::Socket {
virtual int Write(net::IOBuffer* buf, int buf_len,
const net::CompletionCallback& callback) OVERRIDE;
- virtual bool SetReceiveBufferSize(int32 size) OVERRIDE;
- virtual bool SetSendBufferSize(int32 size) OVERRIDE;
+ virtual int SetReceiveBufferSize(int32 size) OVERRIDE;
+ virtual int SetSendBufferSize(int32 size) OVERRIDE;
private:
bool read_pending_;