| 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 6b57f5cd6d10029bd6acd9e7cbf79750e05aabdc..9d0b75a48c70a7c18cbfe5d929b527c1fdd5313b 100644
|
| --- a/components/storage_monitor/storage_monitor_linux.cc
|
| +++ b/components/storage_monitor/storage_monitor_linux.cc
|
| @@ -99,7 +99,7 @@ class ScopedGetDeviceInfoResultRecorder {
|
| uint64 GetDeviceStorageSize(const base::FilePath& device_path,
|
| struct udev_device* device) {
|
| // sysfs provides the device size in units of 512-byte blocks.
|
| - const std::string partition_size = udev_device_get_sysattr_value(
|
| + const std::string partition_size = device::udev_device_get_sysattr_value(
|
| device, kSizeSysAttr);
|
|
|
| // Keep track of device size, to see how often this information is
|
| @@ -125,7 +125,7 @@ scoped_ptr<StorageInfo> GetDeviceInfo(const base::FilePath& device_path,
|
|
|
| ScopedGetDeviceInfoResultRecorder results_recorder;
|
|
|
| - device::ScopedUdevPtr udev_obj(udev_new());
|
| + device::ScopedUdevPtr udev_obj(device::udev_new());
|
| if (!udev_obj.get())
|
| return storage_info.Pass();
|
|
|
| @@ -142,8 +142,8 @@ scoped_ptr<StorageInfo> GetDeviceInfo(const base::FilePath& device_path,
|
| return storage_info.Pass(); // Not a supported type.
|
|
|
| device::ScopedUdevDevicePtr device(
|
| - udev_device_new_from_devnum(udev_obj.get(), device_type,
|
| - device_stat.st_rdev));
|
| + device::udev_device_new_from_devnum(udev_obj.get(), device_type,
|
| + device_stat.st_rdev));
|
| if (!device.get())
|
| return storage_info.Pass();
|
|
|
| @@ -160,15 +160,17 @@ scoped_ptr<StorageInfo> GetDeviceInfo(const base::FilePath& device_path,
|
| MediaStorageUtil::RecordDeviceInfoHistogram(true, unique_id, volume_label);
|
|
|
| const char* value =
|
| - udev_device_get_sysattr_value(device.get(), kRemovableSysAttr);
|
| + device::udev_device_get_sysattr_value(device.get(), kRemovableSysAttr);
|
| if (!value) {
|
| // |parent_device| is owned by |device| and does not need to be cleaned
|
| // up.
|
| struct udev_device* parent_device =
|
| - udev_device_get_parent_with_subsystem_devtype(device.get(),
|
| - kBlockSubsystemKey,
|
| - kDiskDeviceTypeKey);
|
| - value = udev_device_get_sysattr_value(parent_device, kRemovableSysAttr);
|
| + device::udev_device_get_parent_with_subsystem_devtype(
|
| + device.get(),
|
| + kBlockSubsystemKey,
|
| + kDiskDeviceTypeKey);
|
| + value = device::udev_device_get_sysattr_value(parent_device,
|
| + kRemovableSysAttr);
|
| }
|
| const bool is_removable = (value && atoi(value) == 1);
|
|
|
|
|