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

Unified Diff: chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.h

Issue 397743003: Media Galleries: Another round of MTPDeviceDelegateImplLinux cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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: 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 0a698e6c7c2b18bb9ec5c1507211b3f408bc8fa0..2b4a905f17786ea5ec193d2a87c2d766b19c0825 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
@@ -95,6 +95,9 @@ class MTPDeviceDelegateImplLinux : public MTPDeviceAsyncDelegate {
// |snapshot_file_info| specifies the metadata details of the snapshot file.
void WriteDataIntoSnapshotFile(const base::File::Info& snapshot_file_info);
+ // Mark the current request as complete and call ProcessNextPendingRequest().
+ void PendingRequestDone();
+
// Processes the next pending request.
void ProcessNextPendingRequest();
@@ -177,6 +180,8 @@ class MTPDeviceDelegateImplLinux : public MTPDeviceAsyncDelegate {
InitializationState init_state_;
// Used to make sure only one task is in progress at any time.
+ // Otherwise the browser will try to send too many requests at once and
+ // overload the device.
bool task_in_progress_;
// Registered file system device path. This path does not

Powered by Google App Engine
This is Rietveld 408576698