| Index: chrome/browser/google_apis/gdata_wapi_operations.h
|
| diff --git a/chrome/browser/google_apis/gdata_wapi_operations.h b/chrome/browser/google_apis/gdata_wapi_operations.h
|
| index b3381f9af798eab546f573d05cbc67dcbfc2df2f..abcc7b69d895f6c2d45abaef0bd0a71f4bfdb093 100644
|
| --- a/chrome/browser/google_apis/gdata_wapi_operations.h
|
| +++ b/chrome/browser/google_apis/gdata_wapi_operations.h
|
| @@ -565,6 +565,43 @@ class ResumeUploadOperation : public UploadRangeOperationBase {
|
| DISALLOW_COPY_AND_ASSIGN(ResumeUploadOperation);
|
| };
|
|
|
| +//========================== GetUploadStatusOperation ==========================
|
| +
|
| +// This class performs the operation for getting the current upload status
|
| +// of a file.
|
| +// This operation calls |callback| with:
|
| +// - HTTP_RESUME_INCOMPLETE and the range of previously uploaded data,
|
| +// if a file has been partially uploaded. |new_entry| of the |callback| is
|
| +// not used.
|
| +// - HTTP_SUCCESS or HTTP_CREATED (up to the upload mode) and |new_entry|
|
| +// for the uploaded data, if a file has been completely uploaded.
|
| +// |range| of the |callback| is not used.
|
| +// See also UploadRangeOperationBase.
|
| +class GetUploadStatusOperation : public UploadRangeOperationBase {
|
| + public:
|
| + // |callback| must not be null. See also UploadRangeOperationBase's
|
| + // constructor for more details.
|
| + // |content_length| is the whole data size to be uploaded.
|
| + 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);
|
| + virtual ~GetUploadStatusOperation();
|
| +
|
| + protected:
|
| + // UrlFetchOperationBase overrides.
|
| + virtual std::vector<std::string> GetExtraRequestHeaders() const OVERRIDE;
|
| +
|
| + private:
|
| + const int64 content_length_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(GetUploadStatusOperation);
|
| +};
|
| +
|
| } // namespace google_apis
|
|
|
| #endif // CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_OPERATIONS_H_
|
|
|