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

Unified Diff: chrome/browser/system_monitor/media_transfer_protocol_device_observer_linux.h

Issue 12147002: Add a receiver interface to RemovableStorageNotifications. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Merging Created 7 years, 10 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/system_monitor/media_transfer_protocol_device_observer_linux.h
diff --git a/chrome/browser/system_monitor/media_transfer_protocol_device_observer_linux.h b/chrome/browser/system_monitor/media_transfer_protocol_device_observer_linux.h
index 45c9e67ae66c832abbf0e5f0ce17487706745d96..68aa4ed11b72ce805319f0d9d7710a5ca1c7f25f 100644
--- a/chrome/browser/system_monitor/media_transfer_protocol_device_observer_linux.h
+++ b/chrome/browser/system_monitor/media_transfer_protocol_device_observer_linux.h
@@ -42,6 +42,10 @@ class MediaTransferProtocolDeviceObserverLinux
const base::FilePath& path,
RemovableStorageNotifications::StorageInfo* storage_info) const;
+ // Set the volume notifications object to be used when new
+ // MTP devices are found.
+ void SetNotifications(RemovableStorageNotifications::Receiver* notifications);
+
protected:
// Only used in unit tests.
explicit MediaTransferProtocolDeviceObserverLinux(
@@ -67,6 +71,12 @@ class MediaTransferProtocolDeviceObserverLinux
// handler for unit testing.
GetStorageInfoFunc get_storage_info_func_;
+ // The notifications object to use to signal newly attached devices.
+ // Guaranteed to outlive this class.
+ // TODO(gbillock): Edit this when this class is owned by a
+ // RemovableStorageNotifications subclass.
+ RemovableStorageNotifications::Receiver* notifications_;
+
DISALLOW_COPY_AND_ASSIGN(MediaTransferProtocolDeviceObserverLinux);
};

Powered by Google App Engine
This is Rietveld 408576698