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

Unified Diff: chromeos/dbus/cros_disks_client.h

Issue 10825170: chromeos: Add dbus MTPDClient. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | « chromeos/chromeos.gyp ('k') | chromeos/dbus/cros_disks_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/cros_disks_client.h
===================================================================
--- chromeos/dbus/cros_disks_client.h (revision 150137)
+++ chromeos/dbus/cros_disks_client.h (working copy)
@@ -71,14 +71,14 @@
~DiskInfo();
// Device path. (e.g. /sys/devices/pci0000:00/.../8:0:0:0/block/sdb/sdb1)
- std::string device_path() const { return device_path_; }
+ const std::string& device_path() const { return device_path_; }
// Disk mount path. (e.g. /media/removable/VOLUME)
- std::string mount_path() const { return mount_path_; }
+ const std::string& mount_path() const { return mount_path_; }
// Disk system path given by udev.
// (e.g. /sys/devices/pci0000:00/.../8:0:0:0/block/sdb/sdb1)
- std::string system_path() const { return system_path_; }
+ const std::string& system_path() const { return system_path_; }
// Is a drive or not. (i.e. true with /dev/sdb, false with /dev/sdb1)
bool is_drive() const { return is_drive_; }
@@ -90,13 +90,13 @@
bool on_boot_device() const { return on_boot_device_; }
// Disk file path (e.g. /dev/sdb).
- std::string file_path() const { return file_path_; }
+ const std::string& file_path() const { return file_path_; }
// Disk label.
- std::string label() const { return label_; }
+ const std::string& label() const { return label_; }
// Disk model. (e.g. "TransMemory")
- std::string drive_label() const { return drive_model_; }
+ const std::string& drive_label() const { return drive_model_; }
// Device type. Not working well, yet.
DeviceType device_type() const { return device_type_; }
@@ -111,7 +111,7 @@
bool is_hidden() const { return is_hidden_; }
// Returns file system uuid.
- std::string uuid() const { return uuid_; }
+ const std::string& uuid() const { return uuid_; }
private:
void InitializeFromResponse(dbus::Response* response);
@@ -146,34 +146,40 @@
// A callback to handle the result of Unmount.
// The argument is the device path.
- typedef base::Callback<void(const std::string&)> UnmountCallback;
+ typedef base::Callback<void(const std::string& device_path)> UnmountCallback;
// A callback to handle the result of EnumerateAutoMountableDevices.
// The argument is the enumerated device paths.
- typedef base::Callback<void(const std::vector<std::string>&)
+ typedef base::Callback<void(const std::vector<std::string>& device_paths)
> EnumerateAutoMountableDevicesCallback;
// A callback to handle the result of FormatDevice.
// The first argument is the device path.
// The second argument is true when formatting succeeded, false otherwise.
- typedef base::Callback<void(const std::string&, bool)> FormatDeviceCallback;
+ typedef base::Callback<void(const std::string& device_path,
+ bool format_succeeded)> FormatDeviceCallback;
// A callback to handle the result of GetDeviceProperties.
// The argument is the information about the specified device.
- typedef base::Callback<void(const DiskInfo&)> GetDevicePropertiesCallback;
+ typedef base::Callback<void(const DiskInfo& disk_info)
+ > GetDevicePropertiesCallback;
// A callback to handle MountCompleted signal.
// The first argument is the error code.
// The second argument is the source path.
// The third argument is the mount type.
// The fourth argument is the mount path.
- typedef base::Callback<void(MountError, const std::string&, MountType,
- const std::string&)> MountCompletedHandler;
+ typedef base::Callback<void(MountError error_code,
+ const std::string& source_path,
+ MountType mount_type,
+ const std::string& mount_path)
+ > MountCompletedHandler;
// A callback to handle mount events.
// The first argument is the event type.
// The second argument is the device path.
- typedef base::Callback<void(MountEventType, const std::string&)
+ typedef base::Callback<void(MountEventType event_type,
+ const std::string& device_path)
> MountEventHandler;
virtual ~CrosDisksClient();
« no previous file with comments | « chromeos/chromeos.gyp ('k') | chromeos/dbus/cros_disks_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698