| Index: chrome/browser/storage_monitor/storage_monitor_linux.cc
|
| diff --git a/chrome/browser/storage_monitor/storage_monitor_linux.cc b/chrome/browser/storage_monitor/storage_monitor_linux.cc
|
| index 3be93b981eb174dc6f3eeb7b65c87627d72ed416..a8096f6c747f15c2a4ec58a1d1a535062a59a5d7 100644
|
| --- a/chrome/browser/storage_monitor/storage_monitor_linux.cc
|
| +++ b/chrome/browser/storage_monitor/storage_monitor_linux.cc
|
| @@ -334,6 +334,17 @@ void StorageMonitorLinux::SetMediaTransferProtocolManagerForTest(
|
| void StorageMonitorLinux::EjectDevice(
|
| const std::string& device_id,
|
| base::Callback<void(EjectStatus)> callback) {
|
| + StorageInfo::Type type;
|
| + if (!StorageInfo::CrackDeviceId(device_id, &type, NULL)) {
|
| + callback.Run(EJECT_FAILURE);
|
| + return;
|
| + }
|
| +
|
| + if (type == StorageInfo::MTP_OR_PTP) {
|
| + media_transfer_protocol_device_observer_->EjectDevice(device_id, callback);
|
| + return;
|
| + }
|
| +
|
| // Find the mount point for the given device ID.
|
| base::FilePath path;
|
| base::FilePath device;
|
|
|