| 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 46943526e3c66f215d1b10f45e2621b74fac75e3..3cca572248dd49bc40b98a864dc1937b667bffb1 100644
|
| --- a/chrome/browser/google_apis/gdata_wapi_operations.cc
|
| +++ b/chrome/browser/google_apis/gdata_wapi_operations.cc
|
| @@ -785,4 +785,41 @@ void ResumeUploadOperation::OnURLFetchUploadProgress(
|
| NotifyProgress(start_position_ + current, 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
|
|
|