| 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 f4b0d8690d5f235f5a7b866fde46ffd4da240dc3..fef4be103131b3511f266325329888c55bdfe18d 100644
|
| --- a/chrome/browser/google_apis/gdata_wapi_operations.cc
|
| +++ b/chrome/browser/google_apis/gdata_wapi_operations.cc
|
| @@ -782,4 +782,41 @@ void ResumeUploadOperation::OnURLFetchUploadProgress(
|
| NotifyProgress(params_.start_position + current, params_.content_length);
|
| }
|
|
|
| +//========================== GetUploadStatusOperation ==========================
|
| +
|
| +GetUploadStatusOperation::GetUploadStatusOperation(
|
| + OperationRegistry* registry,
|
| + net::URLRequestContextGetter* url_request_context_getter,
|
| + const UploadRangeCallback& callback,
|
| + UploadMode upload_mode,
|
| + const FilePath& drive_file_path,
|
| + const GURL& upload_url,
|
| + int64 content_length)
|
| + : UploadRangeOperationBase(registry,
|
| + url_request_context_getter,
|
| + callback,
|
| + upload_mode,
|
| + drive_file_path,
|
| + upload_url),
|
| + content_length_(content_length) {}
|
| +
|
| +GetUploadStatusOperation::~GetUploadStatusOperation() {}
|
| +
|
| +std::vector<std::string>
|
| +GetUploadStatusOperation::GetExtraRequestHeaders() const {
|
| + // The header looks like
|
| + // Content-Range: bytes */<content_length>
|
| + // for example:
|
| + // Content-Range: bytes */13851821
|
| + // Use * for unknown/streaming content length, such as
|
| + // Content-Range: bytes */*
|
| + DCHECK_GE(content_length_, -1);
|
| +
|
| + std::vector<std::string> headers;
|
| + headers.push_back(
|
| + std::string(kUploadContentRange) + "*/" +
|
| + (content_length_ == -1 ? "*" : base::Int64ToString(content_length_)));
|
| + return headers;
|
| +}
|
| +
|
| } // namespace google_apis
|
|
|