Index: chrome/browser/storage_monitor/storage_monitor_chromeos.cc |
=================================================================== |
--- chrome/browser/storage_monitor/storage_monitor_chromeos.cc (revision 192467) |
+++ chrome/browser/storage_monitor/storage_monitor_chromeos.cc (working copy) |
@@ -131,8 +131,7 @@ |
device::MediaTransferProtocolManager::Initialize(loop_proxy); |
media_transfer_protocol_device_observer_.reset( |
- new chrome::MediaTransferProtocolDeviceObserverLinux()); |
- media_transfer_protocol_device_observer_->SetNotifications(receiver()); |
+ new chrome::MediaTransferProtocolDeviceObserverLinux(receiver())); |
} |
} |
@@ -207,6 +206,14 @@ |
bool StorageMonitorCros::GetStorageInfoForPath( |
const base::FilePath& path, |
StorageInfo* device_info) const { |
+ // TODO(thestig) |media_transfer_protocol_device_observer_| should always be |
+ // valid. |
+ if (media_transfer_protocol_device_observer_ && |
+ media_transfer_protocol_device_observer_->GetStorageInfoForPath( |
+ path, device_info)) { |
+ return true; |
+ } |
+ |
if (!path.IsAbsolute()) |
return false; |