Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Unified Diff: webkit/fileapi/media/mtp_device_delegate.h

Issue 11416089: [Media Galleries] Filesystem interface for Mac PTP/MTP devices using ImageCaptureCore (part 3) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Defensive enumerator Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webkit/fileapi/media/mtp_device_delegate.h
diff --git a/webkit/fileapi/media/mtp_device_delegate.h b/webkit/fileapi/media/mtp_device_delegate.h
index 793f46c37c83da79ed60ce4e8fc29ef7d3f15381..0d2179fab0e62f1e6802d561fee8ef011135ff27 100644
--- a/webkit/fileapi/media/mtp_device_delegate.h
+++ b/webkit/fileapi/media/mtp_device_delegate.h
@@ -32,14 +32,20 @@ class MTPDeviceDelegate {
// Returns a pointer to a new instance of AbstractFileEnumerator to enumerate
// the file entries of |root| path. The instance needs to be freed by the
// caller, and its lifetime should not extend past when the current call
- // returns to the main media task runner thread.
+ // returns to the main media task runner thread. Callers must ensure the
+ // lifetime of the enumerator is shorter than the MTPDeviceDelegate
+ // implementation itself. Calls to the enumerator are made in the context of
+ // a SeuqencedWorkerPool, and the enumerator may block while it is being
+ // called.
virtual scoped_ptr<FileSystemFileUtil::AbstractFileEnumerator>
CreateFileEnumerator(const FilePath& root,
bool recursive) = 0;
// Updates the temporary snapshot file contents given by |local_path| with
// media file contents given by |device_file_path| and also returns the
- // metadata of the temporary file.
+ // metadata of the temporary file. All calls to this interface method are
+ // made in the context of a SequencedWorkerPool, and so only one call will be
+ // active at once. Implementations may block this pool.
virtual base::PlatformFileError CreateSnapshotFile(
const FilePath& device_file_path,
const FilePath& local_path,

Powered by Google App Engine
This is Rietveld 408576698