OLD | NEW |
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 COMPONENTS_STORAGE_MONITOR_UDEV_UTIL_LINUX_H_ | 5 #ifndef COMPONENTS_STORAGE_MONITOR_UDEV_UTIL_LINUX_H_ |
6 #define COMPONENTS_STORAGE_MONITOR_UDEV_UTIL_LINUX_H_ | 6 #define COMPONENTS_STORAGE_MONITOR_UDEV_UTIL_LINUX_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | |
11 | |
12 struct udev_device; | 10 struct udev_device; |
13 | 11 |
14 namespace base { | 12 namespace base { |
15 class FilePath; | 13 class FilePath; |
16 } | 14 } |
17 | 15 |
18 namespace storage_monitor { | 16 namespace storage_monitor { |
19 | 17 |
20 // Helper for udev_device_new_from_syspath()/udev_device_get_property_value() | 18 // Helper for udev_device_new_from_syspath()/udev_device_get_property_value() |
21 // pair. |device_path| is the absolute path to the device, including /sys. | 19 // pair. |device_path| is the absolute path to the device, including /sys. |
22 bool GetUdevDevicePropertyValueByPath(const base::FilePath& device_path, | 20 bool GetUdevDevicePropertyValueByPath(const base::FilePath& device_path, |
23 const char* key, | 21 const char* key, |
24 std::string* result); | 22 std::string* result); |
25 | 23 |
26 } // namespace storage_monitor | 24 } // namespace storage_monitor |
27 | 25 |
28 #endif // COMPONENTS_STORAGE_MONITOR_UDEV_UTIL_LINUX_H_ | 26 #endif // COMPONENTS_STORAGE_MONITOR_UDEV_UTIL_LINUX_H_ |
OLD | NEW |