| 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 |
| 11 #include <stdint.h> | 11 #include <stdint.h> |
| 12 | 12 |
| 13 #include <memory> |
| 13 #include <string> | 14 #include <string> |
| 14 #include <vector> | 15 #include <vector> |
| 15 | 16 |
| 16 #include "base/macros.h" | 17 #include "base/macros.h" |
| 17 #include "base/strings/string16.h" | 18 #include "base/strings/string16.h" |
| 18 #include "base/synchronization/waitable_event.h" | 19 #include "base/synchronization/waitable_event.h" |
| 19 #include "components/storage_monitor/volume_mount_watcher_win.h" | 20 #include "components/storage_monitor/volume_mount_watcher_win.h" |
| 20 | 21 |
| 21 namespace base { | 22 namespace base { |
| 22 class FilePath; | 23 class FilePath; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 49 | 50 |
| 50 void ReleaseDeviceCheck(); | 51 void ReleaseDeviceCheck(); |
| 51 | 52 |
| 52 // VolumeMountWatcherWin: | 53 // VolumeMountWatcherWin: |
| 53 void DeviceCheckComplete(const base::FilePath& device_path) override; | 54 void DeviceCheckComplete(const base::FilePath& device_path) override; |
| 54 GetAttachedDevicesCallbackType GetAttachedDevicesCallback() const override; | 55 GetAttachedDevicesCallbackType GetAttachedDevicesCallback() const override; |
| 55 GetDeviceDetailsCallbackType GetDeviceDetailsCallback() const override; | 56 GetDeviceDetailsCallbackType GetDeviceDetailsCallback() const override; |
| 56 | 57 |
| 57 private: | 58 private: |
| 58 std::vector<base::FilePath> devices_checked_; | 59 std::vector<base::FilePath> devices_checked_; |
| 59 scoped_ptr<base::WaitableEvent> device_check_complete_event_; | 60 std::unique_ptr<base::WaitableEvent> device_check_complete_event_; |
| 60 bool attached_devices_fake_; | 61 bool attached_devices_fake_; |
| 61 | 62 |
| 62 DISALLOW_COPY_AND_ASSIGN(TestVolumeMountWatcherWin); | 63 DISALLOW_COPY_AND_ASSIGN(TestVolumeMountWatcherWin); |
| 63 }; | 64 }; |
| 64 | 65 |
| 65 } // namespace storage_monitor | 66 } // namespace storage_monitor |
| 66 | 67 |
| 67 #endif // COMPONENTS_STORAGE_MONITOR_TEST_VOLUME_MOUNT_WATCHER_WIN_H_ | 68 #endif // COMPONENTS_STORAGE_MONITOR_TEST_VOLUME_MOUNT_WATCHER_WIN_H_ |
| OLD | NEW |