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

Unified Diff: device/usb/usb_device_impl.cc

Issue 604143002: Use USE_UDEV instead of OS_LINUX when trying to use Udev functionality (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months 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 | « device/usb/usb_device_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/usb/usb_device_impl.cc
diff --git a/device/usb/usb_device_impl.cc b/device/usb/usb_device_impl.cc
index cd29e1c845e6bb6b4baf37edc136199cbe386353..b1beeb24736955d0bff5d174500a091ab756c029 100644
--- a/device/usb/usb_device_impl.cc
+++ b/device/usb/usb_device_impl.cc
@@ -25,9 +25,9 @@
#include "chromeos/dbus/permission_broker_client.h"
#endif // defined(OS_CHROMEOS)
-#if defined(OS_LINUX)
+#if defined(USE_UDEV)
#include "device/udev_linux/udev.h"
-#endif // defined(OS_LINUX)
+#endif // defined(USE_UDEV)
namespace device {
@@ -130,7 +130,7 @@ UsbDeviceImpl::UsbDeviceImpl(
CHECK(platform_device) << "platform_device cannot be NULL";
libusb_ref_device(platform_device);
-#if defined(OS_LINUX)
+#if defined(USE_UDEV)
ScopedUdevPtr udev(udev_new());
ScopedUdevEnumeratePtr enumerate(udev_enumerate_new(udev.get()));
@@ -322,7 +322,7 @@ const UsbConfigDescriptor& UsbDeviceImpl::GetConfiguration() {
bool UsbDeviceImpl::GetManufacturer(base::string16* manufacturer) {
DCHECK(thread_checker_.CalledOnValidThread());
-#if defined(OS_LINUX)
+#if defined(USE_UDEV)
if (manufacturer_.empty()) {
return false;
}
@@ -353,7 +353,7 @@ bool UsbDeviceImpl::GetManufacturer(base::string16* manufacturer) {
bool UsbDeviceImpl::GetProduct(base::string16* product) {
DCHECK(thread_checker_.CalledOnValidThread());
-#if defined(OS_LINUX)
+#if defined(USE_UDEV)
if (product_.empty()) {
return false;
}
@@ -384,7 +384,7 @@ bool UsbDeviceImpl::GetProduct(base::string16* product) {
bool UsbDeviceImpl::GetSerialNumber(base::string16* serial_number) {
DCHECK(thread_checker_.CalledOnValidThread());
-#if defined(OS_LINUX)
+#if defined(USE_UDEV)
if (serial_number_.empty()) {
return false;
}
« no previous file with comments | « device/usb/usb_device_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698