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

Unified Diff: chromeos/disks/disk_mount_manager.h

Issue 379743004: Add a method in DiskMountManager to refresh mount entries in addition to devices. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed review comments + Fix up MockDiskMountManager. Created 6 years, 5 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: chromeos/disks/disk_mount_manager.h
diff --git a/chromeos/disks/disk_mount_manager.h b/chromeos/disks/disk_mount_manager.h
index 4edc475256855453962a80c55fd70e6db823c5f5..4f8862c7288b03586998f4a5254fda185fcd7f86 100644
--- a/chromeos/disks/disk_mount_manager.h
+++ b/chromeos/disks/disk_mount_manager.h
@@ -198,6 +198,9 @@ class CHROMEOS_EXPORT DiskMountManager {
// 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 @@ class CHROMEOS_EXPORT DiskMountManager {
// 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
« no previous file with comments | « chrome/browser/chromeos/imageburner/burn_device_handler_unittest.cc ('k') | chromeos/disks/disk_mount_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698