| 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/volume_manager.h" | 5 #include "chrome/browser/chromeos/file_manager/volume_manager.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 "device1", "", "", "", "", "", "", "", "", "", "uuid1", "", | 510 "device1", "", "", "", "", "", "", "", "", "", "uuid1", "", |
| 511 chromeos::DEVICE_TYPE_UNKNOWN, 0, | 511 chromeos::DEVICE_TYPE_UNKNOWN, 0, |
| 512 false, false, false, false, false)); | 512 false, false, false, false, false)); |
| 513 disk_mount_manager_->AddDiskForTest(disk.release()); | 513 disk_mount_manager_->AddDiskForTest(disk.release()); |
| 514 disk_mount_manager_->MountPath( | 514 disk_mount_manager_->MountPath( |
| 515 "device1", "", "", chromeos::MOUNT_TYPE_DEVICE); | 515 "device1", "", "", chromeos::MOUNT_TYPE_DEVICE); |
| 516 | 516 |
| 517 // Emulate system suspend and then resume. | 517 // Emulate system suspend and then resume. |
| 518 { | 518 { |
| 519 power_manager_client_->SendSuspendImminent(); | 519 power_manager_client_->SendSuspendImminent(); |
| 520 power_manager::SuspendState state; | 520 power_manager_client_->SendSuspendDone(); |
| 521 state.set_type(power_manager::SuspendState_Type_SUSPEND_TO_MEMORY); | |
| 522 state.set_wall_time(0); | |
| 523 power_manager_client_->SendSuspendStateChanged(state); | |
| 524 state.set_type(power_manager::SuspendState_Type_RESUME); | |
| 525 power_manager_client_->SendSuspendStateChanged(state); | |
| 526 | 521 |
| 527 // After resume, the device is unmounted and then mounted. | 522 // After resume, the device is unmounted and then mounted. |
| 528 disk_mount_manager_->UnmountPath( | 523 disk_mount_manager_->UnmountPath( |
| 529 "device1", chromeos::UNMOUNT_OPTIONS_NONE, | 524 "device1", chromeos::UNMOUNT_OPTIONS_NONE, |
| 530 chromeos::disks::DiskMountManager::UnmountPathCallback()); | 525 chromeos::disks::DiskMountManager::UnmountPathCallback()); |
| 531 disk_mount_manager_->MountPath( | 526 disk_mount_manager_->MountPath( |
| 532 "device1", "", "", chromeos::MOUNT_TYPE_DEVICE); | 527 "device1", "", "", chromeos::MOUNT_TYPE_DEVICE); |
| 533 } | 528 } |
| 534 | 529 |
| 535 LoggingObserver observer; | 530 LoggingObserver observer; |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 809 chromeos::disks::DiskMountManager::MountPointInfo( | 804 chromeos::disks::DiskMountManager::MountPointInfo( |
| 810 "/other/profile/drive/folder/3.zip", | 805 "/other/profile/drive/folder/3.zip", |
| 811 "/archive/3", | 806 "/archive/3", |
| 812 chromeos::MOUNT_TYPE_ARCHIVE, | 807 chromeos::MOUNT_TYPE_ARCHIVE, |
| 813 chromeos::disks::MOUNT_CONDITION_NONE)); | 808 chromeos::disks::MOUNT_CONDITION_NONE)); |
| 814 EXPECT_FALSE(volume_manager()->FindVolumeInfoById("archive:3", &volume_info)); | 809 EXPECT_FALSE(volume_manager()->FindVolumeInfoById("archive:3", &volume_info)); |
| 815 EXPECT_EQ(3u, observer.events().size()); | 810 EXPECT_EQ(3u, observer.events().size()); |
| 816 } | 811 } |
| 817 | 812 |
| 818 } // namespace file_manager | 813 } // namespace file_manager |
| OLD | NEW |