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

Unified Diff: chrome/browser/storage_monitor/storage_monitor_linux.cc

Issue 16041004: Cleanup: Remove ScopedGenericObj usage in chrome/. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix compile Created 7 years, 7 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
Index: chrome/browser/storage_monitor/storage_monitor_linux.cc
===================================================================
--- chrome/browser/storage_monitor/storage_monitor_linux.cc (revision 202646)
+++ chrome/browser/storage_monitor/storage_monitor_linux.cc (working copy)
@@ -160,27 +160,30 @@
return storage_info.Pass(); // Not a supported type.
ScopedUdevDeviceObject device(
- udev_device_new_from_devnum(udev_obj, device_type, device_stat.st_rdev));
+ udev_device_new_from_devnum(udev_obj.get(), device_type,
+ device_stat.st_rdev));
if (!device.get())
return storage_info.Pass();
- string16 volume_label = UTF8ToUTF16(GetUdevDevicePropertyValue(device,
+ string16 volume_label = UTF8ToUTF16(GetUdevDevicePropertyValue(device.get(),
kLabel));
- string16 vendor_name = UTF8ToUTF16(GetUdevDevicePropertyValue(device,
+ string16 vendor_name = UTF8ToUTF16(GetUdevDevicePropertyValue(device.get(),
kVendor));
- string16 model_name = UTF8ToUTF16(GetUdevDevicePropertyValue(device, kModel));
+ string16 model_name = UTF8ToUTF16(GetUdevDevicePropertyValue(device.get(),
+ kModel));
- std::string unique_id = MakeDeviceUniqueId(device);
+ std::string unique_id = MakeDeviceUniqueId(device.get());
// Keep track of device info details to see how often we get invalid values.
MediaStorageUtil::RecordDeviceInfoHistogram(true, unique_id, volume_label);
- const char* value = udev_device_get_sysattr_value(device, kRemovableSysAttr);
+ const char* value =
+ 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,
+ udev_device_get_parent_with_subsystem_devtype(device.get(),
kBlockSubsystemKey,
kDiskDeviceTypeKey);
value = udev_device_get_sysattr_value(parent_device, kRemovableSysAttr);
@@ -204,7 +207,7 @@
volume_label,
vendor_name,
model_name,
- GetDeviceStorageSize(device_path, device)));
+ GetDeviceStorageSize(device_path, device.get())));
return storage_info.Pass();
}
« no previous file with comments | « chrome/browser/media_galleries/fileapi/native_media_file_util.cc ('k') | chrome/browser/storage_monitor/udev_util_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698