summaryrefslogtreecommitdiffstats
path: root/remoting/protocol
diff options
context:
space:
mode:
authorjschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-05 13:11:54 +0000
committerjschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-05 13:11:54 +0000
commit5f49336067c0871355aaa72af45771fa8d8e4cca (patch)
treede61361884c2bb96f2bbedd42d98ecfff5bc94cc /remoting/protocol
parent228f013f8ac0eaac0f6522be8b8b5ea1f7ca522a (diff)
downloadchromium_src-5f49336067c0871355aaa72af45771fa8d8e4cca.zip
chromium_src-5f49336067c0871355aaa72af45771fa8d8e4cca.tar.gz
chromium_src-5f49336067c0871355aaa72af45771fa8d8e4cca.tar.bz2
Revert 261966 "make SetReceiveBufferSize and SetSendBufferSize r..."
Appears to have broken the following gcm_unit_tests on Mac: DeviceCredentials AckOnLogin AckWhenLimitReachedWithHeartbeat ExpiredTTLOnRestart InitializeExisting SendMessageRMQAckOnReconnect SendMessageRMQOnRestart SendMessageRMQPartialAckOnReconnect SendMessageRMQWithStreamAck http://build.chromium.org/p/chromium.mac/builders/Mac%2010.6%20Tests%20%28dbg%29%284%29/builds/39860 > 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 TBR=jar@chromium.org Review URL: https://codereview.chromium.org/227083002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262002 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, 21 insertions, 23 deletions
diff --git a/remoting/protocol/channel_multiplexer.cc b/remoting/protocol/channel_multiplexer.cc
index 3f7466c..2988f22 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 int SetReceiveBufferSize(int32 size) OVERRIDE {
+ virtual bool SetReceiveBufferSize(int32 size) OVERRIDE {
NOTIMPLEMENTED();
- return net::ERR_NOT_IMPLEMENTED;
+ return false;
}
- virtual int SetSendBufferSize(int32 size) OVERRIDE {
+ virtual bool SetSendBufferSize(int32 size) OVERRIDE {
NOTIMPLEMENTED();
- return net::ERR_NOT_IMPLEMENTED;
+ return false;
}
virtual int Connect(const net::CompletionCallback& callback) OVERRIDE {
NOTIMPLEMENTED();
- return net::ERR_NOT_IMPLEMENTED;
+ return net::ERR_FAILED;
}
virtual void Disconnect() OVERRIDE {
NOTIMPLEMENTED();
}
virtual bool IsConnected() const OVERRIDE {
NOTIMPLEMENTED();
- return false;
+ return true;
}
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_NOT_IMPLEMENTED;
+ return net::ERR_FAILED;
}
virtual int GetLocalAddress(net::IPEndPoint* address) const OVERRIDE {
NOTIMPLEMENTED();
- return net::ERR_NOT_IMPLEMENTED;
+ return net::ERR_FAILED;
}
virtual const net::BoundNetLog& NetLog() const OVERRIDE {
NOTIMPLEMENTED();
diff --git a/remoting/protocol/fake_session.cc b/remoting/protocol/fake_session.cc
index 213ae0b..1ce0675 100644
--- a/remoting/protocol/fake_session.cc
+++ b/remoting/protocol/fake_session.cc
@@ -136,14 +136,13 @@ void FakeSocket::DoWrite(net::IOBuffer* buf, int buf_len) {
}
}
-int FakeSocket::SetReceiveBufferSize(int32 size) {
+bool FakeSocket::SetReceiveBufferSize(int32 size) {
NOTIMPLEMENTED();
- return net::ERR_NOT_IMPLEMENTED;
+ return false;
}
-
-int FakeSocket::SetSendBufferSize(int32 size) {
+bool FakeSocket::SetSendBufferSize(int32 size) {
NOTIMPLEMENTED();
- return net::ERR_NOT_IMPLEMENTED;
+ return false;
}
int FakeSocket::Connect(const net::CompletionCallback& callback) {
@@ -173,7 +172,7 @@ int FakeSocket::GetPeerAddress(net::IPEndPoint* address) const {
int FakeSocket::GetLocalAddress(net::IPEndPoint* address) const {
NOTIMPLEMENTED();
- return net::ERR_NOT_IMPLEMENTED;
+ return net::ERR_FAILED;
}
const net::BoundNetLog& FakeSocket::NetLog() const {
@@ -264,14 +263,13 @@ int FakeUdpSocket::Write(net::IOBuffer* buf, int buf_len,
return buf_len;
}
-int FakeUdpSocket::SetReceiveBufferSize(int32 size) {
+bool FakeUdpSocket::SetReceiveBufferSize(int32 size) {
NOTIMPLEMENTED();
- return net::ERR_NOT_IMPLEMENTED;
+ return false;
}
-
-int FakeUdpSocket::SetSendBufferSize(int32 size) {
+bool FakeUdpSocket::SetSendBufferSize(int32 size) {
NOTIMPLEMENTED();
- return net::ERR_NOT_IMPLEMENTED;
+ return false;
}
FakeSession::FakeSession()
diff --git a/remoting/protocol/fake_session.h b/remoting/protocol/fake_session.h
index 01f79c7..471b336 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 int SetReceiveBufferSize(int32 size) OVERRIDE;
- virtual int SetSendBufferSize(int32 size) OVERRIDE;
+ virtual bool SetReceiveBufferSize(int32 size) OVERRIDE;
+ virtual bool 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 int SetReceiveBufferSize(int32 size) OVERRIDE;
- virtual int SetSendBufferSize(int32 size) OVERRIDE;
+ virtual bool SetReceiveBufferSize(int32 size) OVERRIDE;
+ virtual bool SetSendBufferSize(int32 size) OVERRIDE;
private:
bool read_pending_;