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

Unified Diff: base/sync_socket_nacl.cc

Issue 23875019: Add SyncSocket::ReceiveWithTimeout() and SyncSocket unit tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Explicitly check microseconds. Created 7 years, 2 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
« no previous file with comments | « base/sync_socket.h ('k') | base/sync_socket_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/sync_socket_nacl.cc
diff --git a/base/sync_socket_nacl.cc b/base/sync_socket_nacl.cc
index 7bab8840c0170a1247cf6bc1d383047b3447639e..4269eeb8a28e1db08ea763756c32da76b1898ccb 100644
--- a/base/sync_socket_nacl.cc
+++ b/base/sync_socket_nacl.cc
@@ -38,15 +38,22 @@ bool SyncSocket::Close() {
size_t SyncSocket::Send(const void* buffer, size_t length) {
// Not implemented since it's not needed by any client code yet.
- return -1;
+ NOTIMPLEMENTED();
+ return 0;
}
size_t SyncSocket::Receive(void* buffer, size_t length) {
return read(handle_, buffer, length);
}
+size_t SyncSocket::ReceiveWithTimeout(void* buffer, size_t length, TimeDelta) {
+ NOTIMPLEMENTED();
+ return 0;
jar (doing other things) 2013/10/14 22:49:18 When I argued for returning 0 (not -1), I was more
DaleCurtis 2013/10/14 23:12:33 Only Receive(), Shutdown() are currently called by
+}
+
size_t SyncSocket::Peek() {
- return -1;
+ NOTIMPLEMENTED();
+ return 0;
}
CancelableSyncSocket::CancelableSyncSocket() {
@@ -57,7 +64,8 @@ CancelableSyncSocket::CancelableSyncSocket(Handle handle)
}
size_t CancelableSyncSocket::Send(const void* buffer, size_t length) {
- return -1;
+ NOTIMPLEMENTED();
+ return 0;
}
bool CancelableSyncSocket::Shutdown() {
« no previous file with comments | « base/sync_socket.h ('k') | base/sync_socket_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698