| 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 "tools/android/forwarder2/pipe_notifier.h" | 5 #include "tools/android/forwarder2/pipe_notifier.h" |
| 6 | 6 |
| 7 #include <errno.h> |
| 7 #include <fcntl.h> | 8 #include <fcntl.h> |
| 8 #include <unistd.h> | 9 #include <unistd.h> |
| 9 #include <sys/socket.h> | 10 #include <sys/socket.h> |
| 10 #include <sys/types.h> | 11 #include <sys/types.h> |
| 11 | 12 |
| 12 #include "base/logging.h" | 13 #include "base/logging.h" |
| 13 #include "base/posix/eintr_wrapper.h" | 14 #include "base/posix/eintr_wrapper.h" |
| 14 | 15 |
| 15 namespace forwarder2 { | 16 namespace forwarder2 { |
| 16 | 17 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 44 int ret = HANDLE_EINTR(read(receiver_fd_, &c, 1)); | 45 int ret = HANDLE_EINTR(read(receiver_fd_, &c, 1)); |
| 45 if (ret < 0) { | 46 if (ret < 0) { |
| 46 PLOG(ERROR) << "read"; | 47 PLOG(ERROR) << "read"; |
| 47 return; | 48 return; |
| 48 } | 49 } |
| 49 DCHECK_EQ(1, ret); | 50 DCHECK_EQ(1, ret); |
| 50 DCHECK_EQ('1', c); | 51 DCHECK_EQ('1', c); |
| 51 } | 52 } |
| 52 | 53 |
| 53 } // namespace forwarder | 54 } // namespace forwarder |
| OLD | NEW |