Chromium Code Reviews| 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 #include "components/storage_monitor/storage_monitor_chromeos.h" | 5 #include "components/storage_monitor/storage_monitor_chromeos.h" |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 189 chromeos::MountError error_code, | 189 chromeos::MountError error_code, |
| 190 const DiskMountManager::MountPointInfo& mount_info, | 190 const DiskMountManager::MountPointInfo& mount_info, |
| 191 const std::string& unique_id, | 191 const std::string& unique_id, |
| 192 const std::string& device_label, | 192 const std::string& device_label, |
| 193 const std::string& vendor_name, | 193 const std::string& vendor_name, |
| 194 const std::string& product_name, | 194 const std::string& product_name, |
| 195 chromeos::DeviceType device_type, | 195 chromeos::DeviceType device_type, |
| 196 uint64 device_size_in_bytes) { | 196 uint64 device_size_in_bytes) { |
| 197 if (error_code == chromeos::MOUNT_ERROR_NONE) { | 197 if (error_code == chromeos::MOUNT_ERROR_NONE) { |
| 198 disk_mount_manager_mock_->CreateDiskEntryForMountDevice( | 198 disk_mount_manager_mock_->CreateDiskEntryForMountDevice( |
| 199 mount_info, unique_id, device_label, vendor_name, product_name, | 199 mount_info, |
| 200 device_type, device_size_in_bytes); | 200 unique_id, |
| 201 device_label, | |
| 202 vendor_name, | |
| 203 product_name, | |
| 204 device_type, | |
| 205 device_size_in_bytes, | |
| 206 false, | |
|
tbarzic
2014/03/26 00:40:09
nit:
add comments here:
false /* is_parent */,
tru
Drew Haven
2014/03/27 01:47:34
Done.
| |
| 207 true, | |
| 208 false); | |
| 201 } | 209 } |
| 202 monitor_->OnMountEvent(DiskMountManager::MOUNTING, error_code, mount_info); | 210 monitor_->OnMountEvent(DiskMountManager::MOUNTING, error_code, mount_info); |
| 203 WaitForFileThread(); | 211 WaitForFileThread(); |
| 204 } | 212 } |
| 205 | 213 |
| 206 void StorageMonitorCrosTest::UnmountDevice( | 214 void StorageMonitorCrosTest::UnmountDevice( |
| 207 chromeos::MountError error_code, | 215 chromeos::MountError error_code, |
| 208 const DiskMountManager::MountPointInfo& mount_info) { | 216 const DiskMountManager::MountPointInfo& mount_info) { |
| 209 monitor_->OnMountEvent(DiskMountManager::UNMOUNTING, error_code, mount_info); | 217 monitor_->OnMountEvent(DiskMountManager::UNMOUNTING, error_code, mount_info); |
| 210 if (error_code == chromeos::MOUNT_ERROR_NONE) | 218 if (error_code == chromeos::MOUNT_ERROR_NONE) |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 536 base::Bind(&StorageMonitorCrosTest::EjectNotify, | 544 base::Bind(&StorageMonitorCrosTest::EjectNotify, |
| 537 base::Unretained(this))); | 545 base::Unretained(this))); |
| 538 base::RunLoop().RunUntilIdle(); | 546 base::RunLoop().RunUntilIdle(); |
| 539 | 547 |
| 540 EXPECT_EQ(StorageMonitor::EJECT_OK, status_); | 548 EXPECT_EQ(StorageMonitor::EJECT_OK, status_); |
| 541 } | 549 } |
| 542 | 550 |
| 543 } // namespace | 551 } // namespace |
| 544 | 552 |
| 545 } // namespace storage_monitor | 553 } // namespace storage_monitor |
| OLD | NEW |