Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2019)

Unified Diff: chrome/browser/storage_monitor/storage_monitor_chromeos.cc

Issue 13533009: Storage Monitor: Remove MediaTransferProtocolDeviceObserverLinux::GetInstance() and access it only … (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;

Powered by Google App Engine
This is Rietveld 408576698