| Index: google_apis/drive/base_requests.h
|
| diff --git a/google_apis/drive/base_requests.h b/google_apis/drive/base_requests.h
|
| index ac64a54fa979ec8b768e80a89655abc94d1ecb45..f9e4f1daea47503336d8d57a5936960fba74772b 100644
|
| --- a/google_apis/drive/base_requests.h
|
| +++ b/google_apis/drive/base_requests.h
|
| @@ -8,11 +8,14 @@
|
| #ifndef GOOGLE_APIS_DRIVE_BASE_REQUESTS_H_
|
| #define GOOGLE_APIS_DRIVE_BASE_REQUESTS_H_
|
|
|
| +#include <stdint.h>
|
| +
|
| #include <string>
|
| #include <vector>
|
|
|
| #include "base/callback.h"
|
| #include "base/files/file_path.h"
|
| +#include "base/macros.h"
|
| #include "base/memory/weak_ptr.h"
|
| #include "base/threading/thread_checker.h"
|
| #include "google_apis/drive/drive_api_error_codes.h"
|
| @@ -51,7 +54,7 @@ typedef base::Callback<void(DriveApiErrorCode error,
|
| FileResourceCallback;
|
|
|
| // Callback used for DownloadFileRequest and ResumeUploadRequestBase.
|
| -typedef base::Callback<void(int64 progress, int64 total)> ProgressCallback;
|
| +typedef base::Callback<void(int64_t progress, int64_t total)> ProgressCallback;
|
|
|
| // Callback used to get the content from DownloadFileRequest.
|
| typedef base::Callback<void(
|
| @@ -69,7 +72,7 @@ void GenerateMultipartBody(MultipartType multipart_type,
|
| const std::string& predetermined_boundary,
|
| const std::vector<ContentTypeAndData>& parts,
|
| ContentTypeAndData* output,
|
| - std::vector<uint64>* data_offset);
|
| + std::vector<uint64_t>* data_offset);
|
|
|
| //======================= AuthenticatedRequestInterface ======================
|
|
|
| @@ -192,8 +195,8 @@ class UrlFetchRequestBase : public AuthenticatedRequestInterface,
|
| // uploaded.
|
| // Note that this and GetContentData() cannot be used together.
|
| virtual bool GetContentFile(base::FilePath* local_file_path,
|
| - int64* range_offset,
|
| - int64* range_length,
|
| + int64_t* range_offset,
|
| + int64_t* range_length,
|
| std::string* upload_content_type);
|
|
|
| // Used by a derived class to set an output file path if they want to save
|
| @@ -292,8 +295,8 @@ class BatchableDelegate {
|
|
|
| // Notifies progress.
|
| virtual void NotifyUploadProgress(const net::URLFetcher* source,
|
| - int64 current,
|
| - int64 total) = 0;
|
| + int64_t current,
|
| + int64_t total) = 0;
|
| };
|
|
|
| //============================ EntryActionRequest ============================
|
| @@ -348,7 +351,7 @@ class InitiateUploadRequestBase : public UrlFetchRequestBase {
|
| InitiateUploadRequestBase(RequestSender* sender,
|
| const InitiateUploadCallback& callback,
|
| const std::string& content_type,
|
| - int64 content_length);
|
| + int64_t content_length);
|
| ~InitiateUploadRequestBase() override;
|
|
|
| // UrlFetchRequestBase overrides.
|
| @@ -359,7 +362,7 @@ class InitiateUploadRequestBase : public UrlFetchRequestBase {
|
| private:
|
| const InitiateUploadCallback callback_;
|
| const std::string content_type_;
|
| - const int64 content_length_;
|
| + const int64_t content_length_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(InitiateUploadRequestBase);
|
| };
|
| @@ -370,8 +373,8 @@ class InitiateUploadRequestBase : public UrlFetchRequestBase {
|
| struct UploadRangeResponse {
|
| UploadRangeResponse();
|
| UploadRangeResponse(DriveApiErrorCode code,
|
| - int64 start_position_received,
|
| - int64 end_position_received);
|
| + int64_t start_position_received,
|
| + int64_t end_position_received);
|
| ~UploadRangeResponse();
|
|
|
| DriveApiErrorCode code;
|
| @@ -381,8 +384,8 @@ struct UploadRangeResponse {
|
| // |start_position_received| is inclusive and |end_position_received| is
|
| // exclusive to follow the common C++ manner, although the response from
|
| // the server has "Range" header in inclusive format at both sides.
|
| - int64 start_position_received;
|
| - int64 end_position_received;
|
| + int64_t start_position_received;
|
| + int64_t end_position_received;
|
| };
|
|
|
| // Base class for a URL fetch request expecting the response containing the
|
| @@ -454,9 +457,9 @@ class ResumeUploadRequestBase : public UploadRangeRequestBase {
|
| // meaning.
|
| ResumeUploadRequestBase(RequestSender* sender,
|
| const GURL& upload_location,
|
| - int64 start_position,
|
| - int64 end_position,
|
| - int64 content_length,
|
| + int64_t start_position,
|
| + int64_t end_position,
|
| + int64_t content_length,
|
| const std::string& content_type,
|
| const base::FilePath& local_file_path);
|
| ~ResumeUploadRequestBase() override;
|
| @@ -464,15 +467,15 @@ class ResumeUploadRequestBase : public UploadRangeRequestBase {
|
| // UrlFetchRequestBase overrides.
|
| std::vector<std::string> GetExtraRequestHeaders() const override;
|
| bool GetContentFile(base::FilePath* local_file_path,
|
| - int64* range_offset,
|
| - int64* range_length,
|
| + int64_t* range_offset,
|
| + int64_t* range_length,
|
| std::string* upload_content_type) override;
|
|
|
| private:
|
| // The parameters for the request. See ResumeUploadParams for the details.
|
| - const int64 start_position_;
|
| - const int64 end_position_;
|
| - const int64 content_length_;
|
| + const int64_t start_position_;
|
| + const int64_t end_position_;
|
| + const int64_t content_length_;
|
| const std::string content_type_;
|
| const base::FilePath local_file_path_;
|
|
|
| @@ -496,7 +499,7 @@ class GetUploadStatusRequestBase : public UploadRangeRequestBase {
|
| // parameters.
|
| GetUploadStatusRequestBase(RequestSender* sender,
|
| const GURL& upload_url,
|
| - int64 content_length);
|
| + int64_t content_length);
|
| ~GetUploadStatusRequestBase() override;
|
|
|
| protected:
|
| @@ -504,7 +507,7 @@ class GetUploadStatusRequestBase : public UploadRangeRequestBase {
|
| std::vector<std::string> GetExtraRequestHeaders() const override;
|
|
|
| private:
|
| - const int64 content_length_;
|
| + const int64_t content_length_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(GetUploadStatusRequestBase);
|
| };
|
| @@ -526,7 +529,7 @@ class MultipartUploadRequestBase : public BatchableDelegate {
|
| MultipartUploadRequestBase(base::SequencedTaskRunner* blocking_task_runner,
|
| const std::string& metadata_json,
|
| const std::string& content_type,
|
| - int64 content_length,
|
| + int64_t content_length,
|
| const base::FilePath& local_file_path,
|
| const FileResourceCallback& callback,
|
| const ProgressCallback& progress_callback);
|
| @@ -542,8 +545,8 @@ class MultipartUploadRequestBase : public BatchableDelegate {
|
| const base::Closure& callback) override;
|
| void NotifyError(DriveApiErrorCode code) override;
|
| void NotifyUploadProgress(const net::URLFetcher* source,
|
| - int64 current,
|
| - int64 total) override;
|
| + int64_t current,
|
| + int64_t total) override;
|
| // Parses the response value and invokes |callback_| with |FileResource|.
|
| void OnDataParsed(DriveApiErrorCode code,
|
| const base::Closure& callback,
|
| @@ -626,8 +629,8 @@ class DownloadFileRequestBase : public UrlFetchRequestBase {
|
|
|
| // net::URLFetcherDelegate overrides.
|
| void OnURLFetchDownloadProgress(const net::URLFetcher* source,
|
| - int64 current,
|
| - int64 total) override;
|
| + int64_t current,
|
| + int64_t total) override;
|
|
|
| private:
|
| const DownloadActionCallback download_action_callback_;
|
|
|