Index: chrome/browser/media_gallery/linux/mtp_recursive_device_object_enumerator.h |
diff --git a/chrome/browser/media_gallery/linux/mtp_recursive_device_object_enumerator.h b/chrome/browser/media_gallery/linux/mtp_recursive_device_object_enumerator.h |
index 13b5910198f9f5cddf465f0a9115c28648760a59..74a0cfeed67f39b57b5d3fa05cef516214c25d07 100644 |
--- a/chrome/browser/media_gallery/linux/mtp_recursive_device_object_enumerator.h |
+++ b/chrome/browser/media_gallery/linux/mtp_recursive_device_object_enumerator.h |
@@ -5,6 +5,7 @@ |
#ifndef CHROME_BROWSER_MEDIA_GALLERY_LINUX_MTP_RECURSIVE_DEVICE_OBJECT_ENUMERATOR_H_ |
#define CHROME_BROWSER_MEDIA_GALLERY_LINUX_MTP_RECURSIVE_DEVICE_OBJECT_ENUMERATOR_H_ |
+#include <queue> |
#include <string> |
#include <vector> |
@@ -40,6 +41,10 @@ class MTPRecursiveDeviceObjectEnumerator |
virtual base::Time LastModifiedTime() OVERRIDE; |
private: |
+ typedef uint32_t DirectoryEntryId; |
+ |
+ void UpdateEnumeratorToTraverseSubdirectory(); |
+ |
// Stores the device handle that was used to open the device. |
const std::string device_handle_; |
@@ -47,16 +52,13 @@ class MTPRecursiveDeviceObjectEnumerator |
// ReadMTPDirectoryWorker object on the correct thread. |
scoped_refptr<base::SequencedTaskRunner> media_task_runner_; |
- // List of top-level directory file entries. |
- const std::vector<MtpFileEntry> file_entries_; |
- |
- // Iterator to access the individual file entries. |
- std::vector<MtpFileEntry>::const_iterator file_entry_iter_; |
- |
// Enumerator to access current directory Id/path entries. |
scoped_ptr<fileapi::FileSystemFileUtil::AbstractFileEnumerator> |
current_enumerator_; |
+ // Queue of untraversed directories. |
+ std::queue<DirectoryEntryId> untraversed_directory_entry_ids_; |
+ |
// |media_task_runner_| can wait on this event until the requested operation |
// is complete. |
base::WaitableEvent* on_task_completed_event_; |