Commit cdb25c74 authored by kinaba@chromium.org's avatar kinaba@chromium.org

Files.app: Retrieve disk label name from mount path.

As it was before r272170.

BUG=378879

Review URL: https://codereview.chromium.org/309483008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273815 0039d316-1c4b-4281-b951-d872f2087c98
parent 59ad5d28
......@@ -183,11 +183,11 @@ VolumeInfo CreateVolumeInfoFromMountPointInfo(
volume_info.source_path = base::FilePath(mount_point.source_path);
volume_info.mount_path = base::FilePath(mount_point.mount_path);
volume_info.mount_condition = mount_point.mount_condition;
volume_info.volume_label = volume_info.mount_path.BaseName().AsUTF8Unsafe();
if (disk) {
volume_info.device_type = disk->device_type();
volume_info.system_path_prefix =
base::FilePath(disk->system_path_prefix());
volume_info.volume_label = disk->drive_label();
volume_info.is_parent = disk->is_parent();
volume_info.is_read_only = disk->is_read_only();
} else {
......
......@@ -5,7 +5,7 @@
// These have to be sync'd with file_browser_private_apitest.cc
var expectedVolume1 = {
volumeId: 'removable:mount_path1',
volumeLabel: 'drive_label1',
volumeLabel: 'mount_path1',
sourcePath: 'device_path1',
volumeType: 'removable',
deviceType: 'usb',
......@@ -17,7 +17,7 @@ var expectedVolume1 = {
var expectedVolume2 = {
volumeId: 'removable:mount_path2',
volumeLabel: 'drive_label2',
volumeLabel: 'mount_path2',
sourcePath: 'device_path2',
volumeType: 'removable',
deviceType: 'mobile',
......@@ -29,7 +29,7 @@ var expectedVolume2 = {
var expectedVolume3 = {
volumeId: 'removable:mount_path3',
volumeLabel: 'drive_label3',
volumeLabel: 'mount_path3',
sourcePath: 'device_path3',
volumeType: 'removable',
deviceType: 'optical',
......@@ -58,7 +58,7 @@ var expectedDriveVolume = {
var expectedArchiveVolume = {
volumeId: 'archive:archive_mount_path',
volumeLabel: '',
volumeLabel: 'archive_mount_path',
sourcePath: /removable\/mount_path3\/archive.zip$/,
volumeType: 'archive',
isReadOnly: true,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment