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

Unified Diff: chrome/browser/storage_monitor/storage_monitor_linux.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
« no previous file with comments | « chrome/browser/storage_monitor/storage_monitor_chromeos.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/storage_monitor/storage_monitor_linux.cc
===================================================================
--- chrome/browser/storage_monitor/storage_monitor_linux.cc (revision 192467)
+++ chrome/browser/storage_monitor/storage_monitor_linux.cc (working copy)
@@ -258,8 +258,7 @@
device::MediaTransferProtocolManager::Initialize(loop_proxy);
media_transfer_protocol_device_observer_.reset(
- new MediaTransferProtocolDeviceObserverLinux());
- media_transfer_protocol_device_observer_->SetNotifications(receiver());
+ new MediaTransferProtocolDeviceObserverLinux(receiver()));
}
}
@@ -268,6 +267,14 @@
StorageInfo* device_info) const {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ // 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;
« no previous file with comments | « chrome/browser/storage_monitor/storage_monitor_chromeos.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698