Add a DiskMountManager method to refresh mount entries in addition to devices.
Lack of the info caused Chrome OS Files.app to fail finding external storages
after browser-only restart (like that from about:flags or from browser crash.)
BUG=356583
Review URL: https://codereview.chromium.org/379743004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282558 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chromeos/disks/disk_mount_manager.h b/chromeos/disks/disk_mount_manager.h
index 4edc4752..4f8862c 100644
--- a/chromeos/disks/disk_mount_manager.h
+++ b/chromeos/disks/disk_mount_manager.h
@@ -198,6 +198,9 @@
// A callback type for UnmountPath method.
typedef base::Callback<void(MountError error_code)> UnmountPathCallback;
+ // A callback type for EnsureMountInfoRefreshed method.
+ typedef base::Callback<void(bool success)> EnsureMountInfoRefreshedCallback;
+
// Implement this interface to be notified about disk/mount related events.
class Observer {
public:
@@ -236,8 +239,11 @@
// Gets the list of mount points.
virtual const MountPointMap& mount_points() const = 0;
- // Requests refreshing all the information about mounted disks.
- virtual void RequestMountInfoRefresh() = 0;
+ // Refreshes all the information about mounting if it is not yet done and
+ // invokes |callback| when finished. If the information is already refreshed
+ // It just runs |callback| immediately.
+ virtual void EnsureMountInfoRefreshed(
+ const EnsureMountInfoRefreshedCallback& callback) = 0;
// Mounts a device.
// Note that the mount operation may fail. To find out the result, one should