| 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_
|
|
|