Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(416)

Unified Diff: content/browser/udev_linux.cc

Issue 674703002: Linux: Dynamically load libudev. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scoped_udev
Patch Set: rebase to head, which includes third_party/libudev already Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/gamepad/gamepad_platform_data_fetcher_linux.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/udev_linux.cc
diff --git a/content/browser/udev_linux.cc b/content/browser/udev_linux.cc
index 80c929bf0ec0013a0a5aec3115e805860768aada..dfcb52b9f2e4b37d646649f2a1df50db4beabb8c 100644
--- a/content/browser/udev_linux.cc
+++ b/content/browser/udev_linux.cc
@@ -4,30 +4,28 @@
#include "content/browser/udev_linux.h"
-#include <libudev.h>
-
#include "base/message_loop/message_loop.h"
namespace content {
UdevLinux::UdevLinux(const std::vector<UdevMonitorFilter>& filters,
const UdevNotificationCallback& callback)
- : udev_(udev_new()),
- monitor_(udev_monitor_new_from_netlink(udev_.get(), "udev")),
+ : udev_(device::udev_new()),
+ monitor_(device::udev_monitor_new_from_netlink(udev_.get(), "udev")),
monitor_fd_(-1),
callback_(callback) {
CHECK(udev_);
CHECK(monitor_);
for (size_t i = 0; i < filters.size(); ++i) {
- int ret = udev_monitor_filter_add_match_subsystem_devtype(
+ int ret = device::udev_monitor_filter_add_match_subsystem_devtype(
monitor_.get(), filters[i].subsystem, filters[i].devtype);
CHECK_EQ(0, ret);
}
- int ret = udev_monitor_enable_receiving(monitor_.get());
+ int ret = device::udev_monitor_enable_receiving(monitor_.get());
CHECK_EQ(0, ret);
- monitor_fd_ = udev_monitor_get_fd(monitor_.get());
+ monitor_fd_ = device::udev_monitor_get_fd(monitor_.get());
CHECK_GE(monitor_fd_, 0);
bool success = base::MessageLoopForIO::current()->WatchFileDescriptor(
@@ -53,7 +51,7 @@ void UdevLinux::OnFileCanReadWithoutBlocking(int fd) {
// representing the device which changed and what type of change occured.
DCHECK_EQ(monitor_fd_, fd);
device::ScopedUdevDevicePtr dev(
- udev_monitor_receive_device(monitor_.get()));
+ device::udev_monitor_receive_device(monitor_.get()));
if (!dev)
return;
« no previous file with comments | « content/browser/gamepad/gamepad_platform_data_fetcher_linux.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698