| Index: chromeos/dbus/fake_cros_disks_client.cc
|
| diff --git a/chromeos/dbus/fake_cros_disks_client.cc b/chromeos/dbus/fake_cros_disks_client.cc
|
| index 62fcd5cc2584938c10f0ea6896a22379c440189d..4323a81bcd9505e1706acbe4e7d0f7628c1e004d 100644
|
| --- a/chromeos/dbus/fake_cros_disks_client.cc
|
| +++ b/chromeos/dbus/fake_cros_disks_client.cc
|
| @@ -82,11 +82,25 @@ void FakeCrosDisksClient::Mount(const std::string& source_path,
|
| MountAccessMode access_mode,
|
| const base::Closure& callback,
|
| const base::Closure& error_callback) {
|
| - // This fake implementation only accepts archive mount requests.
|
| - const MountType type = MOUNT_TYPE_ARCHIVE;
|
| -
|
| - const base::FilePath mounted_path = GetArchiveMountPoint().Append(
|
| - base::FilePath::FromUTF8Unsafe(mount_label));
|
| + // This fake implementation assumes mounted path is device when source_format
|
| + // is empty, or an archive otherwise.
|
| + MountType type =
|
| + (source_format == "") ? MOUNT_TYPE_DEVICE : MOUNT_TYPE_ARCHIVE;
|
| +
|
| + base::FilePath mounted_path;
|
| + switch (type) {
|
| + case MOUNT_TYPE_ARCHIVE:
|
| + mounted_path = GetArchiveMountPoint().Append(
|
| + base::FilePath::FromUTF8Unsafe(mount_label));
|
| + break;
|
| + case MOUNT_TYPE_DEVICE:
|
| + mounted_path = GetRemovableDiskMountPoint().Append(
|
| + base::FilePath::FromUTF8Unsafe(mount_label));
|
| + break;
|
| + case MOUNT_TYPE_INVALID:
|
| + // Unreachable
|
| + return;
|
| + }
|
| mounted_paths_.insert(mounted_path);
|
|
|
| base::PostTaskAndReplyWithResult(
|
|
|