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

Unified Diff: net/socket/socket_test_util.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: Original CL, as was submitted, and previously reverted 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 side-by-side diff with in-line comments
Download patch
Index: net/socket/socket_test_util.cc
diff --git a/net/socket/socket_test_util.cc b/net/socket/socket_test_util.cc
index f1456f8c78c1e6c4845b54235f9e8f8b55a82c89..3e7554edb5fef898cffa414527c5cce5f8163675 100644
--- a/net/socket/socket_test_util.cc
+++ b/net/socket/socket_test_util.cc
@@ -713,12 +713,12 @@ MockClientSocket::MockClientSocket(const BoundNetLog& net_log)
peer_addr_ = IPEndPoint(ip, 0);
}
-bool MockClientSocket::SetReceiveBufferSize(int32 size) {
- return true;
+int MockClientSocket::SetReceiveBufferSize(int32 size) {
+ return OK;
}
-bool MockClientSocket::SetSendBufferSize(int32 size) {
- return true;
+int MockClientSocket::SetSendBufferSize(int32 size) {
+ return OK;
}
void MockClientSocket::Disconnect() {
@@ -1162,12 +1162,12 @@ int DeterministicMockUDPClientSocket::Read(
return helper_.Read(buf, buf_len, callback);
}
-bool DeterministicMockUDPClientSocket::SetReceiveBufferSize(int32 size) {
- return true;
+int DeterministicMockUDPClientSocket::SetReceiveBufferSize(int32 size) {
+ return OK;
}
-bool DeterministicMockUDPClientSocket::SetSendBufferSize(int32 size) {
- return true;
+int DeterministicMockUDPClientSocket::SetSendBufferSize(int32 size) {
+ return OK;
}
void DeterministicMockUDPClientSocket::Close() {
@@ -1508,12 +1508,12 @@ int MockUDPClientSocket::Write(IOBuffer* buf, int buf_len,
return write_result.result;
}
-bool MockUDPClientSocket::SetReceiveBufferSize(int32 size) {
- return true;
+int MockUDPClientSocket::SetReceiveBufferSize(int32 size) {
+ return OK;
}
-bool MockUDPClientSocket::SetSendBufferSize(int32 size) {
- return true;
+int MockUDPClientSocket::SetSendBufferSize(int32 size) {
+ return OK;
}
void MockUDPClientSocket::Close() {

Powered by Google App Engine
This is Rietveld 408576698