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

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

Issue 14215003: Add ProgressCallback to DriveServiceInterface::DownloadFile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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
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 1da2301213786bfe19eac837e56465d456af409f..0f564fa71e8c1cd8f0a99b4bcc514628595630a1 100644
--- a/chrome/browser/google_apis/drive_service_interface.h
+++ b/chrome/browser/google_apis/drive_service_interface.h
@@ -79,9 +79,6 @@ typedef base::Callback<void(GDataErrorCode error,
const GURL& open_url)>
AuthorizeAppCallback;
-// Callback used for ResumeUpload().
-typedef base::Callback<void(int64 progress, int64 total)> ProgressCallback;
-
// This defines an interface for sharing by DriveService and MockDriveService
// so that we can do testing of clients of DriveService.
//
@@ -289,15 +286,18 @@ class DriveServiceInterface {
// If |get_content_callback| is not empty,
// URLFetcherDelegate::OnURLFetchDownloadData will be called, which will in
// turn invoke |get_content_callback| on the calling thread.
+ // If |progress_callback| is not empty, it is invoked periodically when
+ // the download made some progress.
//
// |download_action_callback| must not be null.
- // |get_content_callback| may be null.
+ // |get_content_callback| and |progress_callback| may be null.
virtual void DownloadFile(
const base::FilePath& virtual_path,
const base::FilePath& local_cache_path,
const GURL& download_url,
const DownloadActionCallback& download_action_callback,
- const GetContentCallback& get_content_callback) = 0;
+ const GetContentCallback& get_content_callback,
+ const ProgressCallback& progress_callback) = 0;
// Initiates uploading of a new document/file.
// |content_type| and |content_length| should be the ones of the file to be
« no previous file with comments | « chrome/browser/google_apis/drive_api_service.cc ('k') | chrome/browser/google_apis/drive_uploader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698