| Index: chrome/browser/system_monitor/removable_device_notifications_chromeos.h
|
| diff --git a/chrome/browser/system_monitor/removable_device_notifications_chromeos.h b/chrome/browser/system_monitor/removable_device_notifications_chromeos.h
|
| index db73bae930b454c143fe63a561f9994ea62e939e..48792ba9fc6743c5d5ae3797111d0d970397ce2c 100644
|
| --- a/chrome/browser/system_monitor/removable_device_notifications_chromeos.h
|
| +++ b/chrome/browser/system_monitor/removable_device_notifications_chromeos.h
|
| @@ -23,16 +23,27 @@
|
| #include "chromeos/disks/disk_mount_manager.h"
|
|
|
| namespace chromeos {
|
| -
|
| class RemovableDeviceNotificationsCros;
|
| -typedef RemovableDeviceNotificationsCros RemovableDeviceNotifications;
|
| +} // namespace chromeos
|
| +
|
| +namespace chrome {
|
| +
|
| +typedef class chromeos::RemovableDeviceNotificationsCros
|
| + RemovableDeviceNotifications;
|
| +
|
| +} // namespace chrome
|
| +
|
| +namespace chromeos {
|
|
|
| class RemovableDeviceNotificationsCros
|
| : public base::RefCountedThreadSafe<RemovableDeviceNotificationsCros>,
|
| public disks::DiskMountManager::Observer {
|
| public:
|
| + // Should only be called by browser start up code. Use GetInstance() instead.
|
| RemovableDeviceNotificationsCros();
|
|
|
| + static RemovableDeviceNotificationsCros* GetInstance();
|
| +
|
| virtual void DiskChanged(disks::DiskMountManagerEventType event,
|
| const disks::DiskMountManager::Disk* disk) OVERRIDE;
|
| virtual void DeviceChanged(disks::DiskMountManagerEventType event,
|
| @@ -42,11 +53,18 @@ class RemovableDeviceNotificationsCros
|
| MountError error_code,
|
| const disks::DiskMountManager::MountPointInfo& mount_info) OVERRIDE;
|
|
|
| + // Finds the device that contains |path| and populates |device_info|.
|
| + // Returns false if unable to find the device.
|
| + bool GetDeviceInfoForPath(
|
| + const FilePath& path,
|
| + base::SystemMonitor::RemovableStorageInfo* device_info) const;
|
| +
|
| private:
|
| friend class base::RefCountedThreadSafe<RemovableDeviceNotificationsCros>;
|
|
|
| - // Mapping of mount points to mount device IDs.
|
| - typedef std::map<std::string, std::string> MountMap;
|
| + // Mapping of mount path to removable mass storage info.
|
| + typedef std::map<std::string, base::SystemMonitor::RemovableStorageInfo>
|
| + MountMap;
|
|
|
| // Private to avoid code deleting the object.
|
| virtual ~RemovableDeviceNotificationsCros();
|
|
|