Index: chrome/browser/google_apis/base_operations.h |
diff --git a/chrome/browser/google_apis/base_operations.h b/chrome/browser/google_apis/base_operations.h |
index fc1f8b57666a55e68067ba0fdf8026384ffbc878..f92ce67bc6fdb60ae72f6ea3d1eb2a6a3e9784bb 100644 |
--- a/chrome/browser/google_apis/base_operations.h |
+++ b/chrome/browser/google_apis/base_operations.h |
@@ -34,6 +34,9 @@ namespace google_apis { |
// then the passed argument is null. |
typedef base::Callback<void(scoped_ptr<base::Value> value)> ParseJsonCallback; |
+// Callback used for DownloadOperation and ResumeUploadOperation. |
+typedef base::Callback<void(int64 progress, int64 total)> ProgressCallback; |
+ |
// Parses JSON passed in |json| on blocking pool. Runs |callback| on the calling |
// thread when finished with either success or failure. |
// The callback must not be null. |
@@ -458,6 +461,10 @@ class DownloadFileOperation : public UrlFetchOperationBase { |
// This callback is called when some part of the content is |
// read. Used to read the download content progressively. May be null. |
// |
+ // progress_callback: |
+ // This callback is called for periodically reporting the number of bytes |
+ // downloaded so far. May be null. |
+ // |
// download_url: |
// Specifies the target file to download. |
// |
@@ -473,6 +480,7 @@ class DownloadFileOperation : public UrlFetchOperationBase { |
net::URLRequestContextGetter* url_request_context_getter, |
const DownloadActionCallback& download_action_callback, |
const GetContentCallback& get_content_callback, |
+ const ProgressCallback& progress_callback, |
const GURL& download_url, |
const base::FilePath& drive_file_path, |
const base::FilePath& output_file_path); |
@@ -495,6 +503,7 @@ class DownloadFileOperation : public UrlFetchOperationBase { |
private: |
const DownloadActionCallback download_action_callback_; |
const GetContentCallback get_content_callback_; |
+ const ProgressCallback progress_callback_; |
const GURL download_url_; |
DISALLOW_COPY_AND_ASSIGN(DownloadFileOperation); |