summaryrefslogtreecommitdiffstats
path: root/remoting/protocol
diff options
context:
space:
mode:
authorjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-09 12:21:15 +0000
committerjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-09 12:21:15 +0000
commit28b96d1cb6f5c1f89abc91dd6b1542265ac9fa6a (patch)
tree69ccf3ef4b62050babbd07771701d8f75234beaf /remoting/protocol
parent2fcff173a0a0331d80bb4468726e90c4190c9786 (diff)
downloadchromium_src-28b96d1cb6f5c1f89abc91dd6b1542265ac9fa6a.zip
chromium_src-28b96d1cb6f5c1f89abc91dd6b1542265ac9fa6a.tar.gz
chromium_src-28b96d1cb6f5c1f89abc91dd6b1542265ac9fa6a.tar.bz2
make SetReceiveBufferSize and SetSendBufferSize return net error codes (instead of bools)
Previously committed as https://src.chromium.org/viewvc/chrome?view=rev&revision=261966 but then reverted when it broke the Mac 10.6 build. TBR=sergeyu,yzshen,yurys,zea R=wtc BUG=355222 Review URL: https://codereview.chromium.org/227473008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262652 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/protocol')
-rw-r--r--remoting/protocol/channel_multiplexer.cc14
-rw-r--r--remoting/protocol/fake_session.cc20
-rw-r--r--remoting/protocol/fake_session.h8
3 files changed, 22 insertions, 20 deletions
diff --git a/remoting/protocol/channel_multiplexer.cc b/remoting/protocol/channel_multiplexer.cc
index 2988f22..bf4def4 100644
--- a/remoting/protocol/channel_multiplexer.cc
+++ b/remoting/protocol/channel_multiplexer.cc
@@ -116,18 +116,18 @@ 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();
@@ -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_;