| Index: chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.h
|
| diff --git a/chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.h b/chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.h
|
| index 44d390dfd4bca66436487b4a4ba1bcb851fc0bfc..770c0603b0175e36fb345a518b9665baba214282 100644
|
| --- a/chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.h
|
| +++ b/chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.h
|
| @@ -60,6 +60,9 @@ class MTPDeviceDelegateImplLinux : public MTPDeviceAsyncDelegate {
|
| // Maps file ids to file nodes.
|
| typedef std::map<uint32, MTPFileNode*> FileIdToMTPFileNodeMap;
|
|
|
| + // Maps file paths to file info.
|
| + typedef std::map<base::FilePath, fileapi::DirectoryEntry> FileInfoCache;
|
| +
|
| // Should only be called by CreateMTPDeviceAsyncDelegate() factory call.
|
| // Defer the device initializations until the first file operation request.
|
| // Do all the initializations in EnsureInitAndRunTask() function.
|
| @@ -278,6 +281,11 @@ class MTPDeviceDelegateImplLinux : public MTPDeviceAsyncDelegate {
|
| // can return results over multiple callbacks, is in progress.
|
| std::set<std::string> child_nodes_seen_;
|
|
|
| + // A cache to store file metadata for file entries read during a ReadDirectory
|
| + // operation. Used to service incoming GetFileInfo calls for the duration of
|
| + // the ReadDirectory operation.
|
| + FileInfoCache file_info_cache_;
|
| +
|
| // For callbacks that may run after destruction.
|
| base::WeakPtrFactory<MTPDeviceDelegateImplLinux> weak_ptr_factory_;
|
|
|
|
|