diff options
-rw-r--r-- | chrome/browser/chromeos/file_manager/volume_manager.cc | 18 | ||||
-rw-r--r-- | chromeos/dbus/cros_disks_client.h | 3 |
2 files changed, 10 insertions, 11 deletions
diff --git a/chrome/browser/chromeos/file_manager/volume_manager.cc b/chrome/browser/chromeos/file_manager/volume_manager.cc index de5d43b..62affcc 100644 --- a/chrome/browser/chromeos/file_manager/volume_manager.cc +++ b/chrome/browser/chromeos/file_manager/volume_manager.cc @@ -36,14 +36,18 @@ void OnMarkCacheFileAsUnmounted(drive::FileError error) { VolumeType MountTypeToVolumeType( chromeos::MountType type) { switch (type) { + case chromeos::MOUNT_TYPE_INVALID: + // We don't expect this value, but list here, so that when any value + // is added to the enum definition but this is not edited, the compiler + // warns it. + break; case chromeos::MOUNT_TYPE_DEVICE: return VOLUME_TYPE_REMOVABLE_DISK_PARTITION; case chromeos::MOUNT_TYPE_ARCHIVE: return VOLUME_TYPE_MOUNTED_ARCHIVE_FILE; - default: - NOTREACHED(); } + NOTREACHED(); return VOLUME_TYPE_DOWNLOADS_DIRECTORY; } @@ -185,11 +189,9 @@ std::vector<VolumeInfo> VolumeManager::GetVolumeInfoList() const { for (chromeos::disks::DiskMountManager::MountPointMap::const_iterator it = mount_points.begin(); it != mount_points.end(); ++it) { - if (it->second.mount_type == chromeos::MOUNT_TYPE_DEVICE || - it->second.mount_type == chromeos::MOUNT_TYPE_ARCHIVE) - result.push_back(CreateVolumeInfoFromMountPointInfo( - it->second, - disk_mount_manager_->FindDiskBySourcePath(it->second.source_path))); + result.push_back(CreateVolumeInfoFromMountPointInfo( + it->second, + disk_mount_manager_->FindDiskBySourcePath(it->second.source_path))); } return result; @@ -301,7 +303,7 @@ void VolumeManager::OnMountEvent( chromeos::MountError error_code, const chromeos::disks::DiskMountManager::MountPointInfo& mount_info) { DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); - DCHECK(mount_info.mount_type != chromeos::MOUNT_TYPE_INVALID); + DCHECK_NE(chromeos::MOUNT_TYPE_INVALID, mount_info.mount_type); if (mount_info.mount_type == chromeos::MOUNT_TYPE_ARCHIVE) { // If the file is not mounted now, tell it to drive file system so that diff --git a/chromeos/dbus/cros_disks_client.h b/chromeos/dbus/cros_disks_client.h index b440ac8a..92871da82 100644 --- a/chromeos/dbus/cros_disks_client.h +++ b/chromeos/dbus/cros_disks_client.h @@ -33,9 +33,6 @@ enum MountType { MOUNT_TYPE_INVALID, MOUNT_TYPE_DEVICE, MOUNT_TYPE_ARCHIVE, - // TODO(hidehiko): Drive is not managed by DiskMountManager nor - // CrosDisksClient. Remove this after fileBrowserPrivate API is cleaned. - MOUNT_TYPE_GOOGLE_DRIVE, }; // Type of device. |