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 <errno.h> | 5 #include <errno.h> |
6 #include <fcntl.h> | 6 #include <fcntl.h> |
7 #include <poll.h> | 7 #include <poll.h> |
8 #include <sys/socket.h> | 8 #include <sys/socket.h> |
9 #include <sys/stat.h> | 9 #include <sys/stat.h> |
10 #include <sys/time.h> | 10 #include <sys/time.h> |
11 #include <sys/types.h> | 11 #include <sys/types.h> |
12 #include <sys/un.h> | 12 #include <sys/un.h> |
13 #include <unistd.h> | 13 #include <unistd.h> |
14 | 14 |
15 #include <cstring> | 15 #include <cstring> |
16 #include <queue> | 16 #include <queue> |
17 #include <string> | 17 #include <string> |
18 | 18 |
19 #include "base/bind.h" | 19 #include "base/bind.h" |
20 #include "base/callback.h" | 20 #include "base/callback.h" |
21 #include "base/compiler_specific.h" | 21 #include "base/compiler_specific.h" |
22 #include "base/eintr_wrapper.h" | |
23 #include "base/file_path.h" | 22 #include "base/file_path.h" |
24 #include "base/file_util.h" | 23 #include "base/file_util.h" |
25 #include "base/memory/ref_counted.h" | 24 #include "base/memory/ref_counted.h" |
26 #include "base/memory/scoped_ptr.h" | 25 #include "base/memory/scoped_ptr.h" |
27 #include "base/message_loop.h" | 26 #include "base/message_loop.h" |
| 27 #include "base/posix/eintr_wrapper.h" |
28 #include "base/synchronization/condition_variable.h" | 28 #include "base/synchronization/condition_variable.h" |
29 #include "base/synchronization/lock.h" | 29 #include "base/synchronization/lock.h" |
30 #include "base/threading/platform_thread.h" | 30 #include "base/threading/platform_thread.h" |
31 #include "base/threading/thread.h" | 31 #include "base/threading/thread.h" |
32 #include "net/base/unix_domain_socket_posix.h" | 32 #include "net/base/unix_domain_socket_posix.h" |
33 #include "testing/gtest/include/gtest/gtest.h" | 33 #include "testing/gtest/include/gtest/gtest.h" |
34 | 34 |
35 using std::queue; | 35 using std::queue; |
36 using std::string; | 36 using std::string; |
37 | 37 |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 | 304 |
305 // Send() must fail. | 305 // Send() must fail. |
306 ssize_t ret = HANDLE_EINTR(send(sock, kMsg, sizeof(kMsg), 0)); | 306 ssize_t ret = HANDLE_EINTR(send(sock, kMsg, sizeof(kMsg), 0)); |
307 ASSERT_EQ(-1, ret); | 307 ASSERT_EQ(-1, ret); |
308 ASSERT_EQ(EPIPE, errno); | 308 ASSERT_EQ(EPIPE, errno); |
309 ASSERT_FALSE(event_manager_->HasPendingEvent()); | 309 ASSERT_FALSE(event_manager_->HasPendingEvent()); |
310 } | 310 } |
311 | 311 |
312 } // namespace | 312 } // namespace |
313 } // namespace net | 313 } // namespace net |
OLD | NEW |