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

Unified Diff: chrome/browser/google_apis/drive_service_interface.h

Issue 13927002: Add callback for upload progress in Drive service and operation layer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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
« no previous file with comments | « chrome/browser/google_apis/drive_api_service.cc ('k') | chrome/browser/google_apis/drive_uploader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/google_apis/drive_service_interface.h
diff --git a/chrome/browser/google_apis/drive_service_interface.h b/chrome/browser/google_apis/drive_service_interface.h
index 81e5693c81f9536837063839be778f38e3d880d5..fbf3901fc9d78531033d8991ec55dedcbdd9560f 100644
--- a/chrome/browser/google_apis/drive_service_interface.h
+++ b/chrome/browser/google_apis/drive_service_interface.h
@@ -79,6 +79,9 @@ typedef base::Callback<void(GDataErrorCode error,
const GURL& open_url)>
AuthorizeAppCallback;
+// Callback used for ResumeUpload().
+typedef base::Callback<void(int64 progress)> ProgressCallback;
+
// This defines an interface for sharing by DriveService and MockDriveService
// so that we can do testing of clients of DriveService.
//
@@ -349,7 +352,7 @@ class DriveServiceInterface {
const InitiateUploadCallback& callback) = 0;
// Resumes uploading of a document/file on the calling thread.
- // |callback| must not be null.
+ // |callback| must not be null. |progress_callback| may be null.
virtual void ResumeUpload(
UploadMode upload_mode,
const base::FilePath& drive_file_path,
@@ -359,7 +362,8 @@ class DriveServiceInterface {
int64 content_length,
const std::string& content_type,
const scoped_refptr<net::IOBuffer>& buf,
- const UploadRangeCallback& callback) = 0;
+ const UploadRangeCallback& callback,
+ const ProgressCallback& progress_callback) = 0;
// Gets the current status of the uploading to |upload_url| from the server.
// |upload_mode|, |drive_file_path| and |content_length| should be set to
« no previous file with comments | « chrome/browser/google_apis/drive_api_service.cc ('k') | chrome/browser/google_apis/drive_uploader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698