Index: chromeos/disks/disk_mount_manager.h |
diff --git a/chromeos/disks/disk_mount_manager.h b/chromeos/disks/disk_mount_manager.h |
index 842b6f57c46cc0c5ce540dd4820edcd6ae9ca8af..0a40a23b37f8e014de570849637b633ad1f5b1f3 100644 |
--- a/chromeos/disks/disk_mount_manager.h |
+++ b/chromeos/disks/disk_mount_manager.h |
@@ -195,6 +195,9 @@ class CHROMEOS_EXPORT DiskMountManager { |
// finishes. |
typedef base::Callback<void(bool)> UnmountDeviceRecursivelyCallbackType; |
+ // A callback type for UnmountPath method. |
+ typedef base::Callback<void(MountError error_code)> UnmountPathCallback; |
+ |
// Implement this interface to be notified about disk/mount related events. |
class Observer { |
public: |
@@ -237,6 +240,9 @@ class CHROMEOS_EXPORT DiskMountManager { |
virtual void RequestMountInfoRefresh() = 0; |
// Mounts a device. |
+ // Note that the mount operation may fail. To find out the result, one should |
+ // observe DiskMountManager for |Observer::OnMountEvent| event, which will be |
+ // raised upon the mount operation completion. |
virtual void MountPath(const std::string& source_path, |
const std::string& source_format, |
const std::string& mount_label, |
@@ -244,8 +250,11 @@ class CHROMEOS_EXPORT DiskMountManager { |
// Unmounts a mounted disk. |
// |UnmountOptions| enum defined in chromeos/dbus/cros_disks_client.h. |
+ // When the method is complete, |callback| will be called and observers' |
+ // |OnMountEvent| will be raised. |
satorux1
2013/03/14 00:58:43
Please comment that |callback| can be optional (ca
tbarzic
2013/03/14 01:10:03
I agree, I don't like optional parameters in gener
|
virtual void UnmountPath(const std::string& mount_path, |
- UnmountOptions options) = 0; |
+ UnmountOptions options, |
+ const UnmountPathCallback& callback) = 0; |
// Formats Device given its mount path. Unmounts the device. |
// Example: mount_path: /media/VOLUME_LABEL |