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 c18f2a8344aa540cd35b5de1614c5c966363e1f1..1edfdfc07b597075bf2a050a8819c40011bf8c7f 100644 |
--- a/chrome/browser/google_apis/drive_uploader.h |
+++ b/chrome/browser/google_apis/drive_uploader.h |
@@ -124,9 +124,12 @@ class DriveUploader : public DriveUploaderInterface { |
int bytes_to_read, |
int bytes_read); |
- // Calls DriveService's ResumeUpload with the current upload info. |
+ // Call DriveServer's ResumeUpload with the current remaining chunk of data. |
satorux1
2013/02/07 05:48:32
Calls ?
|
+ // |start_position| should be the position in the file, and it must be |
+ // in the current chunk range. In other words, the actual data range sent |
+ // to the server will be |start_position| to the end of the current chunk. |
void ResumeUpload(scoped_ptr<UploadFileInfo> upload_file_info, |
- int bytes_to_send); |
+ int64 start_position); |
// DriveService callback for ResumeUpload. |
void OnUploadRangeResponseReceived( |
@@ -134,6 +137,16 @@ class DriveUploader : public DriveUploaderInterface { |
const UploadRangeResponse& response, |
scoped_ptr<ResourceEntry> entry); |
+ // The server may return 5xx server error response. |
+ // In such a case, following two methods will try to resume the upload. |
+ // Note that in order to avoid receiving many server errors (like |
+ // when the server is overloaded), this method will wait for |
+ // a certain period before connecting to the server again. |
+ void ResumeInterruptedUpload( |
+ scoped_ptr<UploadFileInfo> upload_file_info); |
+ void ResumeInterruptedUploadAfterWait( |
+ scoped_ptr<UploadFileInfo> upload_file_info); |
+ |
// Handle failed uploads. |
void UploadFailed(scoped_ptr<UploadFileInfo> upload_file_info, |
DriveUploadError error); |