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

Unified Diff: chrome/browser/storage_monitor/removable_device_notifications_chromeos.h

Issue 12334096: Regularize ownerships and lifecycle for storage monitor platform classes. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Document lifecycle in storage_monitor.h 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/storage_monitor/removable_device_notifications_chromeos.h
diff --git a/chrome/browser/storage_monitor/removable_device_notifications_chromeos.h b/chrome/browser/storage_monitor/removable_device_notifications_chromeos.h
index be745499bc268a9916ffc98c6ec66693e2914d1e..5d34fe4f4d136f7c4450c774032e9ac04824f87c 100644
--- a/chrome/browser/storage_monitor/removable_device_notifications_chromeos.h
+++ b/chrome/browser/storage_monitor/removable_device_notifications_chromeos.h
@@ -22,6 +22,10 @@
#include "chrome/browser/storage_monitor/storage_monitor.h"
#include "chromeos/disks/disk_mount_manager.h"
+namespace chrome {
+class MediaTransferProtocolDeviceObserverLinux;
+}
+
namespace chromeos {
class RemovableDeviceNotificationsCros
@@ -32,6 +36,10 @@ class RemovableDeviceNotificationsCros
// Should only be called by browser start up code. Use GetInstance() instead.
RemovableDeviceNotificationsCros();
+ // Sets up disk listeners and issues notifications for any discovered
+ // mount points. Sets up MTP manager and listeners.
+ void Init();
+
virtual void OnDiskEvent(disks::DiskMountManager::DiskEvent event,
const disks::DiskMountManager::Disk* disk) OVERRIDE;
virtual void OnDeviceEvent(disks::DiskMountManager::DeviceEvent event,
@@ -91,6 +99,9 @@ class RemovableDeviceNotificationsCros
// Only accessed on the UI thread.
MountMap mount_map_;
+ scoped_ptr<chrome::MediaTransferProtocolDeviceObserverLinux>
+ media_transfer_protocol_device_observer_;
+
DISALLOW_COPY_AND_ASSIGN(RemovableDeviceNotificationsCros);
};

Powered by Google App Engine
This is Rietveld 408576698