| Index: chrome/browser/storage_monitor/storage_monitor_linux.h
|
| ===================================================================
|
| --- chrome/browser/storage_monitor/storage_monitor_linux.h (revision 193280)
|
| +++ chrome/browser/storage_monitor/storage_monitor_linux.h (working copy)
|
| @@ -34,19 +34,15 @@
|
| class StorageMonitorLinux : public StorageMonitor,
|
| public MtabWatcherLinux::Delegate {
|
| public:
|
| - // Should only be called by browser start up code. Use GetInstance() instead.
|
| - explicit StorageMonitorLinux(const base::FilePath& path);
|
| + // Should only be called by browser start up code.
|
| + // Use StorageMonitor::GetInstance() instead.
|
| + // |mtab_file_path| is the path to a mtab file to watch for mount points.
|
| + explicit StorageMonitorLinux(const base::FilePath& mtab_file_path);
|
| virtual ~StorageMonitorLinux();
|
|
|
| // Must be called for StorageMonitorLinux to work.
|
| void Init();
|
|
|
| - // Finds the device that contains |path| and populates |device_info|.
|
| - // Returns false if unable to find the device.
|
| - virtual bool GetStorageInfoForPath(
|
| - const base::FilePath& path,
|
| - StorageInfo* device_info) const OVERRIDE;
|
| -
|
| protected:
|
| // Gets device information given a |device_path| and |mount_point|.
|
| typedef base::Callback<scoped_ptr<StorageInfo>(
|
| @@ -56,6 +52,8 @@
|
| void SetGetDeviceInfoCallbackForTest(
|
| const GetDeviceInfoCallback& get_device_info_callback);
|
|
|
| + void UseDummyMediaTransferProtocolManagerForTest();
|
| +
|
| // MtabWatcherLinux::Delegate implementation.
|
| virtual void UpdateMtab(
|
| const MtabWatcherLinux::MountPointDeviceMap& new_mtab) OVERRIDE;
|
| @@ -89,6 +87,12 @@
|
| // any) we have notified system monitor about.
|
| typedef std::map<base::FilePath, ReferencedMountPoint> MountPriorityMap;
|
|
|
| + // StorageMonitor implementation.
|
| + virtual bool GetStorageInfoForPath(const base::FilePath& path,
|
| + StorageInfo* device_info) const OVERRIDE;
|
| + virtual device::MediaTransferProtocolManager*
|
| + media_transfer_protocol_manager() OVERRIDE;
|
| +
|
| // Called when the MtabWatcher has been created.
|
| void OnMtabWatcherCreated(MtabWatcherLinux* watcher);
|
|
|
| @@ -121,6 +125,11 @@
|
| // points.
|
| MountPriorityMap mount_priority_map_;
|
|
|
| + // When true, the |media_transfer_protocol_manager_| created will be a dummy.
|
| + bool use_dummy_media_transfer_protocol_manager_;
|
| +
|
| + scoped_ptr<device::MediaTransferProtocolManager>
|
| + media_transfer_protocol_manager_;
|
| scoped_ptr<MediaTransferProtocolDeviceObserverLinux>
|
| media_transfer_protocol_device_observer_;
|
|
|
|
|