| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 | 68 |
| 69 void FakeDiskMountManager::EnsureMountInfoRefreshed( | 69 void FakeDiskMountManager::EnsureMountInfoRefreshed( |
| 70 const EnsureMountInfoRefreshedCallback& callback, | 70 const EnsureMountInfoRefreshedCallback& callback, |
| 71 bool force) { | 71 bool force) { |
| 72 callback.Run(true); | 72 callback.Run(true); |
| 73 } | 73 } |
| 74 | 74 |
| 75 void FakeDiskMountManager::MountPath(const std::string& source_path, | 75 void FakeDiskMountManager::MountPath(const std::string& source_path, |
| 76 const std::string& source_format, | 76 const std::string& source_format, |
| 77 const std::string& mount_label, | 77 const std::string& mount_label, |
| 78 chromeos::MountType type) { | 78 chromeos::MountType type, |
| 79 chromeos::MountAccessMode access_mode) { |
| 79 mount_requests_.push_back( | 80 mount_requests_.push_back( |
| 80 MountRequest(source_path, source_format, mount_label, type)); | 81 MountRequest(source_path, source_format, mount_label, type)); |
| 81 | 82 |
| 82 const MountPointInfo mount_point( | 83 const MountPointInfo mount_point( |
| 83 source_path, | 84 source_path, |
| 84 source_path, | 85 source_path, |
| 85 type, | 86 type, |
| 86 chromeos::disks::MOUNT_CONDITION_NONE); | 87 chromeos::disks::MOUNT_CONDITION_NONE); |
| 87 mount_points_.insert(make_pair(source_path, mount_point)); | 88 mount_points_.insert(make_pair(source_path, mount_point)); |
| 88 FOR_EACH_OBSERVER(DiskMountManager::Observer, observers_, | 89 FOR_EACH_OBSERVER(DiskMountManager::Observer, observers_, |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 | 129 |
| 129 void FakeDiskMountManager::InvokeDiskEventForTest( | 130 void FakeDiskMountManager::InvokeDiskEventForTest( |
| 130 chromeos::disks::DiskMountManager::DiskEvent event, | 131 chromeos::disks::DiskMountManager::DiskEvent event, |
| 131 const chromeos::disks::DiskMountManager::Disk* disk) { | 132 const chromeos::disks::DiskMountManager::Disk* disk) { |
| 132 FOR_EACH_OBSERVER(chromeos::disks::DiskMountManager::Observer, | 133 FOR_EACH_OBSERVER(chromeos::disks::DiskMountManager::Observer, |
| 133 observers_, | 134 observers_, |
| 134 OnDiskEvent(event, disk)); | 135 OnDiskEvent(event, disk)); |
| 135 } | 136 } |
| 136 | 137 |
| 137 } // namespace file_manager | 138 } // namespace file_manager |
| OLD | NEW |