OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef BASE_SYNC_SOCKET_H_ | 5 #ifndef BASE_SYNC_SOCKET_H_ |
6 #define BASE_SYNC_SOCKET_H_ | 6 #define BASE_SYNC_SOCKET_H_ |
7 | 7 |
8 // A socket abstraction used for sending and receiving plain | 8 // A socket abstraction used for sending and receiving plain |
9 // data. Because the receiving is blocking, they can be used to perform | 9 // data. Because the receiving is blocking, they can be used to perform |
10 // rudimentary cross-process synchronization with low latency. | 10 // rudimentary cross-process synchronization with low latency. |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 virtual size_t Send(const void* buffer, size_t length) OVERRIDE; | 112 virtual size_t Send(const void* buffer, size_t length) OVERRIDE; |
113 | 113 |
114 private: | 114 private: |
115 #if defined(OS_WIN) | 115 #if defined(OS_WIN) |
116 WaitableEvent shutdown_event_; | 116 WaitableEvent shutdown_event_; |
117 WaitableEvent file_operation_; | 117 WaitableEvent file_operation_; |
118 #endif | 118 #endif |
119 DISALLOW_COPY_AND_ASSIGN(CancelableSyncSocket); | 119 DISALLOW_COPY_AND_ASSIGN(CancelableSyncSocket); |
120 }; | 120 }; |
121 | 121 |
| 122 #if defined(OS_WIN) && !defined(COMPONENT_BUILD) |
| 123 // TODO(cpu): remove this once chrome is split in two dlls. |
| 124 __declspec(selectany) |
| 125 const SyncSocket::Handle SyncSocket::kInvalidHandle = INVALID_HANDLE_VALUE; |
| 126 #endif |
| 127 |
122 } // namespace base | 128 } // namespace base |
123 | 129 |
124 #endif // BASE_SYNC_SOCKET_H_ | 130 #endif // BASE_SYNC_SOCKET_H_ |
OLD | NEW |