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

Unified Diff: chrome/browser/google_apis/gdata_wapi_operations.cc

Issue 12209035: Implement retry flow on DriveUploader. (Closed) Base URL: http://git.chromium.org/chromium/src.git@b148632_wapi_get_upload_status_operation_impl
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
Index: chrome/browser/google_apis/gdata_wapi_operations.cc
diff --git a/chrome/browser/google_apis/gdata_wapi_operations.cc b/chrome/browser/google_apis/gdata_wapi_operations.cc
index fef4be103131b3511f266325329888c55bdfe18d..a2e5124a3c8ab630be3de878afb2c6820093932f 100644
--- a/chrome/browser/google_apis/gdata_wapi_operations.cc
+++ b/chrome/browser/google_apis/gdata_wapi_operations.cc
@@ -88,6 +88,7 @@ ResumeUploadParams::ResumeUploadParams(
int64 content_length,
const std::string& content_type,
scoped_refptr<net::IOBuffer> buf,
+ int64 buf_offset,
const GURL& upload_location,
const FilePath& drive_file_path) : upload_mode(upload_mode),
start_position(start_position),
@@ -95,6 +96,7 @@ ResumeUploadParams::ResumeUploadParams(
content_length(content_length),
content_type(content_type),
buf(buf),
+ buf_offset(buf_offset),
upload_location(upload_location),
drive_file_path(drive_file_path) {
}
@@ -771,7 +773,7 @@ std::vector<std::string> ResumeUploadOperation::GetExtraRequestHeaders() const {
bool ResumeUploadOperation::GetContentData(std::string* upload_content_type,
std::string* upload_content) {
*upload_content_type = params_.content_type;
- *upload_content = std::string(params_.buf->data(),
+ *upload_content = std::string(params_.buf->data() + params_.buf_offset,
params_.end_position - params_.start_position);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698