| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #include "chrome/browser/chromeos/file_manager/fake_disk_mount_manager.h" | 5 #include "chrome/browser/chromeos/file_manager/fake_disk_mount_manager.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
| 9 | 9 |
| 10 namespace file_manager { | 10 namespace file_manager { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 const std::string& mount_path, | 28 const std::string& mount_path, |
| 29 chromeos::UnmountOptions options) | 29 chromeos::UnmountOptions options) |
| 30 : mount_path(mount_path), | 30 : mount_path(mount_path), |
| 31 options(options) { | 31 options(options) { |
| 32 } | 32 } |
| 33 | 33 |
| 34 FakeDiskMountManager::FakeDiskMountManager() { | 34 FakeDiskMountManager::FakeDiskMountManager() { |
| 35 } | 35 } |
| 36 | 36 |
| 37 FakeDiskMountManager::~FakeDiskMountManager() { | 37 FakeDiskMountManager::~FakeDiskMountManager() { |
| 38 STLDeleteValues(&disks_); | 38 base::STLDeleteValues(&disks_); |
| 39 } | 39 } |
| 40 | 40 |
| 41 void FakeDiskMountManager::AddObserver(Observer* observer) { | 41 void FakeDiskMountManager::AddObserver(Observer* observer) { |
| 42 DCHECK(observer); | 42 DCHECK(observer); |
| 43 observers_.AddObserver(observer); | 43 observers_.AddObserver(observer); |
| 44 } | 44 } |
| 45 | 45 |
| 46 void FakeDiskMountManager::RemoveObserver(Observer* observer) { | 46 void FakeDiskMountManager::RemoveObserver(Observer* observer) { |
| 47 DCHECK(observer); | 47 DCHECK(observer); |
| 48 observers_.RemoveObserver(observer); | 48 observers_.RemoveObserver(observer); |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 | 130 |
| 131 void FakeDiskMountManager::InvokeDiskEventForTest( | 131 void FakeDiskMountManager::InvokeDiskEventForTest( |
| 132 chromeos::disks::DiskMountManager::DiskEvent event, | 132 chromeos::disks::DiskMountManager::DiskEvent event, |
| 133 const chromeos::disks::DiskMountManager::Disk* disk) { | 133 const chromeos::disks::DiskMountManager::Disk* disk) { |
| 134 FOR_EACH_OBSERVER(chromeos::disks::DiskMountManager::Observer, | 134 FOR_EACH_OBSERVER(chromeos::disks::DiskMountManager::Observer, |
| 135 observers_, | 135 observers_, |
| 136 OnDiskEvent(event, disk)); | 136 OnDiskEvent(event, disk)); |
| 137 } | 137 } |
| 138 | 138 |
| 139 } // namespace file_manager | 139 } // namespace file_manager |
| OLD | NEW |