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

Side by Side Diff: device/udev_linux/scoped_udev.h

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 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 unified diff | Download patch
« no previous file with comments | « device/udev_linux/BUILD.gn ('k') | device/udev_linux/udev.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef DEVICE_UDEV_LINUX_SCOPED_UDEV_H_ 5 #ifndef DEVICE_UDEV_LINUX_SCOPED_UDEV_H_
6 #define DEVICE_UDEV_LINUX_SCOPED_UDEV_H_ 6 #define DEVICE_UDEV_LINUX_SCOPED_UDEV_H_
7 7
8 #include <libudev.h>
9
10 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "device/udev_linux/udev.h"
11 10
12 #if !defined(USE_UDEV) 11 #if !defined(USE_UDEV)
13 #error "USE_UDEV not defined" 12 #error "USE_UDEV not defined"
14 #endif 13 #endif
15 14
16 namespace device { 15 namespace device {
17 16
18 struct UdevDeleter { 17 struct UdevDeleter {
19 void operator()(udev* dev) const { 18 void operator()(udev* dev) const {
20 udev_unref(dev); 19 udev_unref(dev);
(...skipping 16 matching lines...) Expand all
37 }; 36 };
38 37
39 typedef scoped_ptr<udev, UdevDeleter> ScopedUdevPtr; 38 typedef scoped_ptr<udev, UdevDeleter> ScopedUdevPtr;
40 typedef scoped_ptr<udev_enumerate, UdevEnumerateDeleter> ScopedUdevEnumeratePtr; 39 typedef scoped_ptr<udev_enumerate, UdevEnumerateDeleter> ScopedUdevEnumeratePtr;
41 typedef scoped_ptr<udev_device, UdevDeviceDeleter> ScopedUdevDevicePtr; 40 typedef scoped_ptr<udev_device, UdevDeviceDeleter> ScopedUdevDevicePtr;
42 typedef scoped_ptr<udev_monitor, UdevMonitorDeleter> ScopedUdevMonitorPtr; 41 typedef scoped_ptr<udev_monitor, UdevMonitorDeleter> ScopedUdevMonitorPtr;
43 42
44 } // namespace device 43 } // namespace device
45 44
46 #endif // DEVICE_UDEV_LINUX_SCOPED_UDEV_H_ 45 #endif // DEVICE_UDEV_LINUX_SCOPED_UDEV_H_
OLDNEW
« no previous file with comments | « device/udev_linux/BUILD.gn ('k') | device/udev_linux/udev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698