test_storage_monitor_win.cc 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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
  3. // found in the LICENSE file.
  4. //
  5. // TestStorageMonitorWin implementation.
  6. #include "components/storage_monitor/test_storage_monitor_win.h"
  7. #include <utility>
  8. #include "components/storage_monitor/test_portable_device_watcher_win.h"
  9. #include "components/storage_monitor/test_volume_mount_watcher_win.h"
  10. namespace storage_monitor {
  11. TestStorageMonitorWin::TestStorageMonitorWin(
  12. std::unique_ptr<TestVolumeMountWatcherWin> volume_mount_watcher,
  13. std::unique_ptr<TestPortableDeviceWatcherWin> portable_device_watcher)
  14. : StorageMonitorWin(std::move(volume_mount_watcher),
  15. std::move(portable_device_watcher)) {
  16. DCHECK(volume_mount_watcher_);
  17. DCHECK(portable_device_watcher_);
  18. }
  19. TestStorageMonitorWin::~TestStorageMonitorWin() {
  20. }
  21. void TestStorageMonitorWin::InjectDeviceChange(UINT event_type, LPARAM data) {
  22. OnDeviceChange(event_type, data);
  23. }
  24. VolumeMountWatcherWin*
  25. TestStorageMonitorWin::volume_mount_watcher() {
  26. return volume_mount_watcher_.get();
  27. }
  28. StorageMonitor::Receiver* TestStorageMonitorWin::receiver() const {
  29. return StorageMonitor::receiver();
  30. }
  31. } // namespace storage_monitor