Chromium Code Reviews| 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..f07bb2a17c91046a4529e8bdfd36dbfe9f02b21a 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 SetResumingTimeSpanForTesting( |
|
hashimoto
2013/09/09 12:15:17
nit: set_resuming_time_span_for_testing because th
hidehiko
2013/09/09 12:44:11
Done.
|
| + 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); |