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

Side by Side Diff: components/storage_monitor/udev_util_linux.h

Issue 982883004: Move GetUdevDevicePropertyValue from components/storage_monitor to device/udev_linux and rename to … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert incorrect change in chromeos Created 5 years, 9 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 unified diff | Download patch
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 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" 10 #include "base/memory/scoped_ptr.h"
11 11
12 struct udev_device; 12 struct udev_device;
13 13
14 namespace base { 14 namespace base {
15 class FilePath; 15 class FilePath;
16 } 16 }
17 17
18 namespace storage_monitor { 18 namespace storage_monitor {
19 19
20 // Wrapper function for udev_device_get_property_value() that also checks for
21 // valid but empty values.
22 std::string GetUdevDevicePropertyValue(udev_device* udev_device,
23 const char* key);
24
25 // Helper for udev_device_new_from_syspath()/udev_device_get_property_value() 20 // Helper for udev_device_new_from_syspath()/udev_device_get_property_value()
26 // pair. |device_path| is the absolute path to the device, including /sys. 21 // pair. |device_path| is the absolute path to the device, including /sys.
27 bool GetUdevDevicePropertyValueByPath(const base::FilePath& device_path, 22 bool GetUdevDevicePropertyValueByPath(const base::FilePath& device_path,
28 const char* key, 23 const char* key,
29 std::string* result); 24 std::string* result);
30 25
31 } // namespace storage_monitor 26 } // namespace storage_monitor
32 27
33 #endif // COMPONENTS_STORAGE_MONITOR_UDEV_UTIL_LINUX_H_ 28 #endif // COMPONENTS_STORAGE_MONITOR_UDEV_UTIL_LINUX_H_
OLDNEW
« no previous file with comments | « components/storage_monitor/storage_monitor_linux.cc ('k') | components/storage_monitor/udev_util_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698