| Index: chrome/browser/media_galleries/linux/mtp_device_task_helper_map_service.h
|
| diff --git a/chrome/browser/media_galleries/linux/mtp_device_task_helper_map_service.h b/chrome/browser/media_galleries/linux/mtp_device_task_helper_map_service.h
|
| index d13920c22702fd0f9bbfc39f9cb0d3a2a60b9933..6b02b094a3996e2e885ca560dcf7495013f264e1 100644
|
| --- a/chrome/browser/media_galleries/linux/mtp_device_task_helper_map_service.h
|
| +++ b/chrome/browser/media_galleries/linux/mtp_device_task_helper_map_service.h
|
| @@ -20,25 +20,36 @@ class MTPDeviceTaskHelperMapService {
|
|
|
| // Creates and returns the MTPDeviceTaskHelper object for the storage device
|
| // specified by the |storage_name|.
|
| - MTPDeviceTaskHelper* CreateDeviceTaskHelper(const std::string& storage_name);
|
| + MTPDeviceTaskHelper* CreateDeviceTaskHelper(const std::string& storage_name,
|
| + const bool read_only);
|
|
|
| // Destroys the MTPDeviceTaskHelper object created by
|
| // CreateDeviceTaskHelper().
|
| // |storage_name| specifies the name of the storage device.
|
| - void DestroyDeviceTaskHelper(const std::string& storage_name);
|
| + void DestroyDeviceTaskHelper(const std::string& storage_name,
|
| + const bool read_only);
|
|
|
| // Gets the MTPDeviceTaskHelper object associated with the device storage.
|
| // |storage_name| specifies the name of the storage device.
|
| // Return NULL if the |storage_name| is no longer valid (e.g. because the
|
| // corresponding storage device is detached, etc).
|
| - MTPDeviceTaskHelper* GetDeviceTaskHelper(const std::string& storage_name);
|
| + MTPDeviceTaskHelper* GetDeviceTaskHelper(const std::string& storage_name,
|
| + const bool read_only);
|
|
|
| private:
|
| friend struct base::DefaultLazyInstanceTraits<MTPDeviceTaskHelperMapService>;
|
|
|
| - // Key: Storage name.
|
| + // A key to be used in TaskHelperMap.
|
| + typedef std::string MTPDeviceTaskHelperKey;
|
| +
|
| + // Gets a key from |storage_name| and |read_only|.
|
| + static MTPDeviceTaskHelperKey GetMTPDeviceTaskHelperKey(
|
| + const std::string& storage_name,
|
| + const bool read_only);
|
| +
|
| + // Key: A combined value with storage_name and read_only.
|
| // Value: MTPDeviceTaskHelper object.
|
| - typedef std::map<std::string, MTPDeviceTaskHelper*> TaskHelperMap;
|
| + typedef std::map<MTPDeviceTaskHelperKey, MTPDeviceTaskHelper*> TaskHelperMap;
|
|
|
| // Get access to this class using GetInstance() method.
|
| MTPDeviceTaskHelperMapService();
|
|
|