| Index: chrome/browser/chromeos/file_manager/mounted_disk_monitor.h
|
| diff --git a/chrome/browser/chromeos/file_manager/mounted_disk_monitor.h b/chrome/browser/chromeos/file_manager/mounted_disk_monitor.h
|
| index f26e4a8fb9c7ca13b795fec7e6de6c3f5046037b..bb0c540fd551df4942e4d2aa243035f7e91b02a8 100644
|
| --- a/chrome/browser/chromeos/file_manager/mounted_disk_monitor.h
|
| +++ b/chrome/browser/chromeos/file_manager/mounted_disk_monitor.h
|
| @@ -25,7 +25,9 @@ class MountedDiskMonitor
|
| : public chromeos::PowerManagerClient::Observer,
|
| public chromeos::disks::DiskMountManager::Observer {
|
| public:
|
| - MountedDiskMonitor();
|
| + MountedDiskMonitor(
|
| + chromeos::PowerManagerClient* power_manager_client,
|
| + chromeos::disks::DiskMountManager* disk_mount_manager);
|
| virtual ~MountedDiskMonitor();
|
|
|
| // PowerManagerClient::Observer overrides:
|
| @@ -53,6 +55,14 @@ class MountedDiskMonitor
|
| // been unmounted during the resuming time span.
|
| bool DiskIsRemounting(
|
| const chromeos::disks::DiskMountManager::Disk& disk) const;
|
| +
|
| + // In order to avoid consuming time a lot for testing, this allows to set the
|
| + // resuming time span.
|
| + void set_resuming_time_span_for_testing(
|
| + const base::TimeDelta& resuming_time_span) {
|
| + resuming_time_span_ = resuming_time_span;
|
| + }
|
| +
|
| private:
|
| // Maps source paths with corresponding uuids.
|
| typedef std::map<std::string, std::string> DiskMap;
|
| @@ -62,9 +72,13 @@ class MountedDiskMonitor
|
|
|
| void Reset();
|
|
|
| + chromeos::PowerManagerClient* power_manager_client_;
|
| + chromeos::disks::DiskMountManager* disk_mount_manager_;
|
| +
|
| bool is_resuming_;
|
| DiskMap mounted_disks_;
|
| DiskSet unmounted_while_resuming_;
|
| + base::TimeDelta resuming_time_span_;
|
| base::WeakPtrFactory<MountedDiskMonitor> weak_factory_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(MountedDiskMonitor);
|
|
|