OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 CHROME_BROWSER_STORAGE_MONITOR_TEST_VOLUME_MOUNT_WATCHER_WIN_H_ | 8 #ifndef CHROME_BROWSER_STORAGE_MONITOR_TEST_VOLUME_MOUNT_WATCHER_WIN_H_ |
9 #define CHROME_BROWSER_STORAGE_MONITOR_TEST_VOLUME_MOUNT_WATCHER_WIN_H_ | 9 #define CHROME_BROWSER_STORAGE_MONITOR_TEST_VOLUME_MOUNT_WATCHER_WIN_H_ |
10 | 10 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 uint64* total_size_in_bytes) const OVERRIDE; | 57 uint64* total_size_in_bytes) const OVERRIDE; |
58 virtual std::vector<base::FilePath> GetAttachedDevices(); | 58 virtual std::vector<base::FilePath> GetAttachedDevices(); |
59 | 59 |
60 bool GetRawDeviceInfo(const base::FilePath& device_path, | 60 bool GetRawDeviceInfo(const base::FilePath& device_path, |
61 string16* device_location, | 61 string16* device_location, |
62 std::string* unique_id, | 62 std::string* unique_id, |
63 string16* name, | 63 string16* name, |
64 bool* removable, | 64 bool* removable, |
65 uint64* total_size_in_bytes); | 65 uint64* total_size_in_bytes); |
66 | 66 |
| 67 // Should be used by unit tests to make sure the worker pool doesn't survive |
| 68 // into other test runs. |
| 69 void ShutdownWorkerPool(); |
| 70 |
67 private: | 71 private: |
68 std::vector<base::FilePath> devices_checked_; | 72 std::vector<base::FilePath> devices_checked_; |
69 scoped_ptr<base::WaitableEvent> device_check_complete_event_; | 73 scoped_ptr<base::WaitableEvent> device_check_complete_event_; |
70 | 74 |
71 DISALLOW_COPY_AND_ASSIGN(TestVolumeMountWatcherWin); | 75 DISALLOW_COPY_AND_ASSIGN(TestVolumeMountWatcherWin); |
72 }; | 76 }; |
73 | 77 |
74 } // namespace test | 78 } // namespace test |
75 } // namespace chrome | 79 } // namespace chrome |
76 | 80 |
77 #endif // CHROME_BROWSER_STORAGE_MONITOR_TEST_VOLUME_MOUNT_WATCHER_WIN_H_ | 81 #endif // CHROME_BROWSER_STORAGE_MONITOR_TEST_VOLUME_MOUNT_WATCHER_WIN_H_ |
OLD | NEW |