Chromium Code Reviews| Index: chrome/browser/chromeos/file_manager/fake_disk_mount_manager.h |
| diff --git a/chrome/browser/chromeos/file_manager/fake_disk_mount_manager.h b/chrome/browser/chromeos/file_manager/fake_disk_mount_manager.h |
| index 0645f6828dc872cf07f42e11fade17106e404551..ed9372ef69ebed6a1acbda5e24c3561b79e037ff 100644 |
| --- a/chrome/browser/chromeos/file_manager/fake_disk_mount_manager.h |
| +++ b/chrome/browser/chromeos/file_manager/fake_disk_mount_manager.h |
| @@ -7,6 +7,7 @@ |
| #include <string> |
| #include <vector> |
| +#include <queue> |
| #include "base/compiler_specific.h" |
| #include "base/macros.h" |
| @@ -66,9 +67,16 @@ class FakeDiskMountManager : public chromeos::disks::DiskMountManager { |
| const std::string& mount_label, |
| chromeos::MountType type, |
| chromeos::MountAccessMode access_mode) override; |
| + // In order to simulate asynchronous invocation of callbacks after unmount |
| + // is finished, |callback| will be invoked only when |
| + // |FinishAllUnmountRequest()| is called. |
| void UnmountPath(const std::string& mount_path, |
| chromeos::UnmountOptions options, |
| const UnmountPathCallback& callback) override; |
| + // Emulates that all mount request finished. |
| + // Return true if there was one or more mount request enqueued, or false |
| + // otherwise. |
| + bool FinishAllUnmountPathRequests(); |
|
fukino
2016/09/16 07:31:34
This is not an override of DiskMountManager.
We n
yamaguchi
2016/09/26 02:25:28
Done.
|
| void FormatMountedDevice(const std::string& mount_path) override; |
| void UnmountDeviceRecursively( |
| const std::string& device_path, |
| @@ -80,6 +88,7 @@ class FakeDiskMountManager : public chromeos::disks::DiskMountManager { |
| private: |
| base::ObserverList<Observer> observers_; |
| + std::queue<UnmountPathCallback> pending_unmount_callbacks_; |
| DiskMap disks_; |
| MountPointMap mount_points_; |