Index: chrome/browser/google_apis/drive_uploader.h |
diff --git a/chrome/browser/google_apis/drive_uploader.h b/chrome/browser/google_apis/drive_uploader.h |
index 4dc496b47f681d2e95727897fea4736d1f498287..22fdae13f343841812b2a8756cc4f4898edd9aa0 100644 |
--- a/chrome/browser/google_apis/drive_uploader.h |
+++ b/chrome/browser/google_apis/drive_uploader.h |
@@ -116,6 +116,11 @@ class DriveUploader : public DriveUploaderInterface { |
GDataErrorCode code, |
const GURL& upload_location); |
+ // Uploads the remaining data in the current chunk. |
+ // The |restart_position| is the file's position to be restart for uploading. |
+ void UploadCurrentChunk( |
+ scoped_ptr<UploadFileInfo> upload_file_info, int64 restart_position); |
+ |
// Uploads the next chunk of data from the file. |
void UploadNextChunk(scoped_ptr<UploadFileInfo> upload_file_info); |
@@ -128,12 +133,23 @@ class DriveUploader : public DriveUploaderInterface { |
void ResumeUpload(scoped_ptr<UploadFileInfo> upload_file_info, |
int bytes_to_send); |
- // DriveService callback for ResumeUpload. |
+ // DriveService callback for ResumeUpload and GetUploadState. |
void OnResumeUploadResponseReceived( |
scoped_ptr<UploadFileInfo> upload_file_info, |
const ResumeUploadResponse& response, |
scoped_ptr<ResourceEntry> entry); |
+ // Resumes the uploading interrupted by HTTP 5xx response. |
+ // To avoid receiving the server errors repeatedly, this method waits |
+ // for a while before actual resuming. |
+ void ResumeInterruptedUpload( |
+ scoped_ptr<UploadFileInfo> upload_file_info); |
+ |
+ // This method processes the remaining tasks to resume the uploading |
+ // after waiting followed by ResumeInterruptedUpload. |
+ void ResumeInterruptedUploadAfterWaiting( |
+ scoped_ptr<UploadFileInfo> upload_file_info); |
+ |
// Handle failed uploads. |
void UploadFailed(scoped_ptr<UploadFileInfo> upload_file_info, |
DriveUploadError error); |