Chromium Code Reviews| Index: google_apis/drive/drive_api_requests.h |
| diff --git a/google_apis/drive/drive_api_requests.h b/google_apis/drive/drive_api_requests.h |
| index 6017799f60decb592e50373118d658d733d617cf..a34ba40153a984e6a29b26ac8acc44d6accd808b 100644 |
| --- a/google_apis/drive/drive_api_requests.h |
| +++ b/google_apis/drive/drive_api_requests.h |
| @@ -1114,9 +1114,11 @@ class PermissionsInsertRequest : public EntryActionRequest { |
| struct BatchUploadChildEntry { |
| BatchUploadChildEntry() : request(NULL), prepared(false) {} |
| explicit BatchUploadChildEntry(BatchableRequestBase* request) |
| - : request(request), prepared(false) {} |
| + : request(request), prepared(false), data_position(0), data_size(0) {} |
| BatchableRequestBase* request; |
| bool prepared; |
| + int64 data_position; |
|
kinaba
2015/05/11 13:17:35
maybe: data_offset (ditto for other use of "positi
hirono
2015/05/12 03:42:17
Done.
|
| + int64 data_size; |
| }; |
| class BatchUploadRequest : public UrlFetchRequestBase { |
| @@ -1155,6 +1157,11 @@ class BatchUploadRequest : public UrlFetchRequestBase { |
| void ProcessURLFetchResults(const net::URLFetcher* source) override; |
| void RunCallbackOnPrematureFailure(DriveApiErrorCode code) override; |
| + // content::UrlFetcherDelegate overrides. |
| + void OnURLFetchUploadProgress(const net::URLFetcher* source, |
| + int64 current, |
| + int64 total) override; |
| + |
| private: |
| typedef void* RequestID; |
| // Obtains corresponding child entry of |request_id|. Returns NULL if the |
| @@ -1184,6 +1191,9 @@ class BatchUploadRequest : public UrlFetchRequestBase { |
| // Multipart of child requests. |
| ContentTypeAndData upload_content_; |
| + // Last reported progress value. |
| + int64 last_progress_value_; |
| + |
| // Note: This should remain the last member so it'll be destroyed and |
| // invalidate its weak pointers before any other members are destroyed. |
| base::WeakPtrFactory<BatchUploadRequest> weak_ptr_factory_; |