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

Side by Side Diff: chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.h

Issue 180783005: MTP Streaming: Optimize block reading (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_LINUX_MTP_DEVICE_DELEGATE_IMPL_LINUX_H_ 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_LINUX_MTP_DEVICE_DELEGATE_IMPL_LINUX_H_
6 #define CHROME_BROWSER_MEDIA_GALLERIES_LINUX_MTP_DEVICE_DELEGATE_IMPL_LINUX_H_ 6 #define CHROME_BROWSER_MEDIA_GALLERIES_LINUX_MTP_DEVICE_DELEGATE_IMPL_LINUX_H_
7 7
8 #include <queue> 8 #include <queue>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 // 164 //
165 // |current_snapshot_request_info_.error_callback| is invoked to notify the 165 // |current_snapshot_request_info_.error_callback| is invoked to notify the
166 // caller about |error|. 166 // caller about |error|.
167 void OnWriteDataIntoSnapshotFileError(base::File::Error error); 167 void OnWriteDataIntoSnapshotFileError(base::File::Error error);
168 168
169 // Called when ReadBytes() succeeds. 169 // Called when ReadBytes() succeeds.
170 // 170 //
171 // |success_callback| is invoked to notify the caller about the read bytes. 171 // |success_callback| is invoked to notify the caller about the read bytes.
172 // |bytes_read| is the number of bytes read. 172 // |bytes_read| is the number of bytes read.
173 void OnDidReadBytes(const ReadBytesSuccessCallback& success_callback, 173 void OnDidReadBytes(const ReadBytesSuccessCallback& success_callback,
174 int bytes_read); 174 const base::File::Info& file_info, int bytes_read);
175 175
176 // Handles the device file |error|. |error_callback| is invoked to notify the 176 // Handles the device file |error|. |error_callback| is invoked to notify the
177 // caller about the file error. 177 // caller about the file error.
178 void HandleDeviceFileError(const ErrorCallback& error_callback, 178 void HandleDeviceFileError(const ErrorCallback& error_callback,
179 base::File::Error error); 179 base::File::Error error);
180 180
181 // MTP device initialization state. 181 // MTP device initialization state.
182 InitializationState init_state_; 182 InitializationState init_state_;
183 183
184 // Used to make sure only one task is in progress at any time. 184 // Used to make sure only one task is in progress at any time.
(...skipping 17 matching lines...) Expand all
202 // request at any time. 202 // request at any time.
203 scoped_ptr<SnapshotRequestInfo> current_snapshot_request_info_; 203 scoped_ptr<SnapshotRequestInfo> current_snapshot_request_info_;
204 204
205 // For callbacks that may run after destruction. 205 // For callbacks that may run after destruction.
206 base::WeakPtrFactory<MTPDeviceDelegateImplLinux> weak_ptr_factory_; 206 base::WeakPtrFactory<MTPDeviceDelegateImplLinux> weak_ptr_factory_;
207 207
208 DISALLOW_COPY_AND_ASSIGN(MTPDeviceDelegateImplLinux); 208 DISALLOW_COPY_AND_ASSIGN(MTPDeviceDelegateImplLinux);
209 }; 209 };
210 210
211 #endif // CHROME_BROWSER_MEDIA_GALLERIES_LINUX_MTP_DEVICE_DELEGATE_IMPL_LINUX_H _ 211 #endif // CHROME_BROWSER_MEDIA_GALLERIES_LINUX_MTP_DEVICE_DELEGATE_IMPL_LINUX_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698