| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 // | 4 // |
| 5 // This file contains a subclass of VolumeMountWatcherWin to expose some | 5 // This file contains a subclass of VolumeMountWatcherWin to expose some |
| 6 // functionality for testing. | 6 // functionality for testing. |
| 7 | 7 |
| 8 #ifndef COMPONENTS_STORAGE_MONITOR_TEST_VOLUME_MOUNT_WATCHER_WIN_H_ | 8 #ifndef COMPONENTS_STORAGE_MONITOR_TEST_VOLUME_MOUNT_WATCHER_WIN_H_ |
| 9 #define COMPONENTS_STORAGE_MONITOR_TEST_VOLUME_MOUNT_WATCHER_WIN_H_ | 9 #define COMPONENTS_STORAGE_MONITOR_TEST_VOLUME_MOUNT_WATCHER_WIN_H_ |
| 10 | 10 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 void ReleaseDeviceCheck(); | 47 void ReleaseDeviceCheck(); |
| 48 | 48 |
| 49 // VolumeMountWatcherWin: | 49 // VolumeMountWatcherWin: |
| 50 virtual void DeviceCheckComplete(const base::FilePath& device_path) override; | 50 virtual void DeviceCheckComplete(const base::FilePath& device_path) override; |
| 51 virtual GetAttachedDevicesCallbackType | 51 virtual GetAttachedDevicesCallbackType |
| 52 GetAttachedDevicesCallback() const override; | 52 GetAttachedDevicesCallback() const override; |
| 53 virtual GetDeviceDetailsCallbackType | 53 virtual GetDeviceDetailsCallbackType |
| 54 GetDeviceDetailsCallback() const override; | 54 GetDeviceDetailsCallback() const override; |
| 55 | 55 |
| 56 // Should be used by unit tests to make sure the worker pool doesn't survive | |
| 57 // into other test runs. | |
| 58 void ShutdownWorkerPool(); | |
| 59 | |
| 60 private: | 56 private: |
| 61 std::vector<base::FilePath> devices_checked_; | 57 std::vector<base::FilePath> devices_checked_; |
| 62 scoped_ptr<base::WaitableEvent> device_check_complete_event_; | 58 scoped_ptr<base::WaitableEvent> device_check_complete_event_; |
| 63 bool attached_devices_fake_; | 59 bool attached_devices_fake_; |
| 64 | 60 |
| 65 DISALLOW_COPY_AND_ASSIGN(TestVolumeMountWatcherWin); | 61 DISALLOW_COPY_AND_ASSIGN(TestVolumeMountWatcherWin); |
| 66 }; | 62 }; |
| 67 | 63 |
| 68 } // namespace storage_monitor | 64 } // namespace storage_monitor |
| 69 | 65 |
| 70 #endif // COMPONENTS_STORAGE_MONITOR_TEST_VOLUME_MOUNT_WATCHER_WIN_H_ | 66 #endif // COMPONENTS_STORAGE_MONITOR_TEST_VOLUME_MOUNT_WATCHER_WIN_H_ |
| OLD | NEW |