mock_removable_storage_observer.cc 756 B

12345678910111213141516171819202122232425262728
  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. #include "components/storage_monitor/mock_removable_storage_observer.h"
  5. namespace storage_monitor {
  6. MockRemovableStorageObserver::MockRemovableStorageObserver()
  7. : attach_calls_(0), detach_calls_(0) {
  8. }
  9. MockRemovableStorageObserver::~MockRemovableStorageObserver() {
  10. }
  11. void MockRemovableStorageObserver::OnRemovableStorageAttached(
  12. const StorageInfo& info) {
  13. attach_calls_++;
  14. last_attached_ = info;
  15. }
  16. void MockRemovableStorageObserver::OnRemovableStorageDetached(
  17. const StorageInfo& info) {
  18. detach_calls_++;
  19. last_detached_ = info;
  20. }
  21. } // namespace storage_monitor