| 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 "content/browser/udev_linux.h" | 5 #include "content/browser/udev_linux.h" |
| 6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 7 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 8 | 10 |
| 9 namespace content { | 11 namespace content { |
| 10 | 12 |
| 11 UdevLinux::UdevLinux(const std::vector<UdevMonitorFilter>& filters, | 13 UdevLinux::UdevLinux(const std::vector<UdevMonitorFilter>& filters, |
| 12 const UdevNotificationCallback& callback) | 14 const UdevNotificationCallback& callback) |
| 13 : udev_(device::udev_new()), | 15 : udev_(device::udev_new()), |
| 14 monitor_(device::udev_monitor_new_from_netlink(udev_.get(), "udev")), | 16 monitor_(device::udev_monitor_new_from_netlink(udev_.get(), "udev")), |
| 15 monitor_fd_(-1), | 17 monitor_fd_(-1), |
| 16 callback_(callback) { | 18 callback_(callback) { |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 if (!dev) | 57 if (!dev) |
| 56 return; | 58 return; |
| 57 | 59 |
| 58 callback_.Run(dev.get()); | 60 callback_.Run(dev.get()); |
| 59 } | 61 } |
| 60 | 62 |
| 61 void UdevLinux::OnFileCanWriteWithoutBlocking(int fd) { | 63 void UdevLinux::OnFileCanWriteWithoutBlocking(int fd) { |
| 62 } | 64 } |
| 63 | 65 |
| 64 } // namespace content | 66 } // namespace content |
| OLD | NEW |