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

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

Issue 12218011: WIP: Implement 5xx Error handling. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 10 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_service_interface.h ('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_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);
« no previous file with comments | « chrome/browser/google_apis/drive_service_interface.h ('k') | chrome/browser/google_apis/drive_uploader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698