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 #include "base/sync_socket.h" | 5 #include "base/sync_socket.h" |
6 | 6 |
| 7 #include <limits.h> |
| 8 #include <stddef.h> |
| 9 |
7 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/macros.h" |
8 #include "base/rand_util.h" | 12 #include "base/rand_util.h" |
9 #include "base/threading/thread_restrictions.h" | 13 #include "base/threading/thread_restrictions.h" |
10 #include "base/win/scoped_handle.h" | 14 #include "base/win/scoped_handle.h" |
11 | 15 |
12 namespace base { | 16 namespace base { |
13 | 17 |
14 using win::ScopedHandle; | 18 using win::ScopedHandle; |
15 | 19 |
16 namespace { | 20 namespace { |
17 // IMPORTANT: do not change how this name is generated because it will break | 21 // IMPORTANT: do not change how this name is generated because it will break |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 static_cast<DWORD>(timeout.InMilliseconds())); | 337 static_cast<DWORD>(timeout.InMilliseconds())); |
334 } | 338 } |
335 | 339 |
336 // static | 340 // static |
337 bool CancelableSyncSocket::CreatePair(CancelableSyncSocket* socket_a, | 341 bool CancelableSyncSocket::CreatePair(CancelableSyncSocket* socket_a, |
338 CancelableSyncSocket* socket_b) { | 342 CancelableSyncSocket* socket_b) { |
339 return CreatePairImpl(&socket_a->handle_, &socket_b->handle_, true); | 343 return CreatePairImpl(&socket_a->handle_, &socket_b->handle_, true); |
340 } | 344 } |
341 | 345 |
342 } // namespace base | 346 } // namespace base |
OLD | NEW |