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

Unified Diff: components/storage_monitor/storage_monitor_linux.cc

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, 10 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 | « no previous file | components/storage_monitor/udev_util_linux.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/storage_monitor/storage_monitor_linux.cc
diff --git a/components/storage_monitor/storage_monitor_linux.cc b/components/storage_monitor/storage_monitor_linux.cc
index a78d2d6f33a1543e518dc74971d0776eb6deb5e1..84c7dc4d47da5e81baf6e4304a7c9ddaabdcc76e 100644
--- a/components/storage_monitor/storage_monitor_linux.cc
+++ b/components/storage_monitor/storage_monitor_linux.cc
@@ -51,7 +51,7 @@ const char kVendorID[] = "ID_VENDOR_ID";
// Construct a device id using label or manufacturer (vendor and model) details.
std::string MakeDeviceUniqueId(struct udev_device* device) {
- std::string uuid = GetUdevDevicePropertyValue(device, kFsUUID);
+ std::string uuid = device::UdevDeviceGetPropertyValue(device, kFsUUID);
// Keep track of device uuid, to see how often we receive empty uuid values.
UMA_HISTOGRAM_BOOLEAN(
"RemovableDeviceNotificationsLinux.device_file_system_uuid_available",
@@ -64,10 +64,10 @@ std::string MakeDeviceUniqueId(struct udev_device* device) {
// in the string is empty.
// Format: VendorModelSerial:VendorInfo:ModelInfo:SerialShortInfo
// E.g.: VendorModelSerial:Kn:DataTravel_12.10:8000000000006CB02CDB
- std::string vendor = GetUdevDevicePropertyValue(device, kVendorID);
- std::string model = GetUdevDevicePropertyValue(device, kModelID);
- std::string serial_short = GetUdevDevicePropertyValue(device,
- kSerialShort);
+ std::string vendor = device::UdevDeviceGetPropertyValue(device, kVendorID);
+ std::string model = device::UdevDeviceGetPropertyValue(device, kModelID);
+ std::string serial_short =
+ device::UdevDeviceGetPropertyValue(device, kSerialShort);
if (vendor.empty() && model.empty() && serial_short.empty())
return std::string();
@@ -147,12 +147,12 @@ scoped_ptr<StorageInfo> GetDeviceInfo(const base::FilePath& device_path,
if (!device.get())
return storage_info.Pass();
- base::string16 volume_label =
- base::UTF8ToUTF16(GetUdevDevicePropertyValue(device.get(), kLabel));
- base::string16 vendor_name =
- base::UTF8ToUTF16(GetUdevDevicePropertyValue(device.get(), kVendor));
- base::string16 model_name =
- base::UTF8ToUTF16(GetUdevDevicePropertyValue(device.get(), kModel));
+ base::string16 volume_label = base::UTF8ToUTF16(
+ device::UdevDeviceGetPropertyValue(device.get(), kLabel));
+ base::string16 vendor_name = base::UTF8ToUTF16(
+ device::UdevDeviceGetPropertyValue(device.get(), kVendor));
+ base::string16 model_name = base::UTF8ToUTF16(
+ device::UdevDeviceGetPropertyValue(device.get(), kModel));
std::string unique_id = MakeDeviceUniqueId(device.get());
« no previous file with comments | « no previous file | components/storage_monitor/udev_util_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698