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

Unified Diff: base/sync_socket.h

Issue 1446363003: Deleted OS_WIN and all Windows specific files from base. (Closed) Base URL: https://github.com/domokit/mojo.git@base_tests
Patch Set: Created 5 years, 1 month 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/strings/sys_string_conversions_win.cc ('k') | base/sync_socket_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/sync_socket.h
diff --git a/base/sync_socket.h b/base/sync_socket.h
index 36d6bc1f59b06f5c41af91eed69884270e466c92..be60b18f7b476c38d0e2beb839518ae4754a41f5 100644
--- a/base/sync_socket.h
+++ b/base/sync_socket.h
@@ -10,9 +10,6 @@
// rudimentary cross-process synchronization with low latency.
#include "base/basictypes.h"
-#if defined(OS_WIN)
-#include <windows.h>
-#endif
#include <sys/types.h>
#include "base/base_export.h"
@@ -29,13 +26,8 @@ namespace base {
class BASE_EXPORT SyncSocket {
public:
-#if defined(OS_WIN)
- typedef HANDLE Handle;
- typedef Handle TransitDescriptor;
-#else
typedef int Handle;
typedef FileDescriptor TransitDescriptor;
-#endif
static const Handle kInvalidHandle;
SyncSocket();
@@ -117,20 +109,6 @@ class BASE_EXPORT CancelableSyncSocket : public SyncSocket {
// a blocking Receive or Send.
bool Shutdown();
-#if defined(OS_WIN)
- // Since the Linux and Mac implementations actually use a socket, shutting
- // them down from another thread is pretty simple - we can just call
- // shutdown(). However, the Windows implementation relies on named pipes
- // and there isn't a way to cancel a blocking synchronous Read that is
- // supported on <Vista. So, for Windows only, we override these
- // SyncSocket methods in order to support shutting down the 'socket'.
- bool Close() override;
- size_t Receive(void* buffer, size_t length) override;
- size_t ReceiveWithTimeout(void* buffer,
- size_t length,
- TimeDelta timeout) override;
-#endif
-
// Send() is overridden to catch cases where the remote end is not responding
// and we fill the local socket buffer. When the buffer is full, this
// implementation of Send() will not block indefinitely as
@@ -139,19 +117,9 @@ class BASE_EXPORT CancelableSyncSocket : public SyncSocket {
size_t Send(const void* buffer, size_t length) override;
private:
-#if defined(OS_WIN)
- WaitableEvent shutdown_event_;
- WaitableEvent file_operation_;
-#endif
DISALLOW_COPY_AND_ASSIGN(CancelableSyncSocket);
};
-#if defined(OS_WIN) && !defined(COMPONENT_BUILD)
-// TODO(cpu): remove this once chrome is split in two dlls.
-__declspec(selectany)
- const SyncSocket::Handle SyncSocket::kInvalidHandle = INVALID_HANDLE_VALUE;
-#endif
-
} // namespace base
#endif // BASE_SYNC_SOCKET_H_
« no previous file with comments | « base/strings/sys_string_conversions_win.cc ('k') | base/sync_socket_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698