Index: google_apis/drive/base_requests.cc |
diff --git a/google_apis/drive/base_requests.cc b/google_apis/drive/base_requests.cc |
index 18846cba9a5789be48af6e336b09d53a10210d05..a1981387e755e365bd99b26b8d8aac396f5c5d1e 100644 |
--- a/google_apis/drive/base_requests.cc |
+++ b/google_apis/drive/base_requests.cc |
@@ -4,10 +4,13 @@ |
#include "google_apis/drive/base_requests.h" |
+#include <stddef.h> |
+ |
#include "base/files/file_util.h" |
#include "base/json/json_reader.h" |
#include "base/json/json_writer.h" |
#include "base/location.h" |
+#include "base/macros.h" |
#include "base/rand_util.h" |
#include "base/sequenced_task_runner.h" |
#include "base/strings/string_number_conversions.h" |
@@ -218,7 +221,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) { |
std::string boundary; |
// Generate random boundary. |
if (predetermined_boundary.empty()) { |
@@ -450,8 +453,8 @@ void UrlFetchRequestBase::StartAfterPrepare( |
url_fetcher_->SetUploadData(upload_content_type, upload_content); |
} else { |
base::FilePath local_file_path; |
- int64 range_offset = 0; |
- int64 range_length = 0; |
+ int64_t range_offset = 0; |
+ int64_t range_length = 0; |
if (GetContentFile(&local_file_path, &range_offset, &range_length, |
&upload_content_type)) { |
url_fetcher_->SetUploadFilePath( |
@@ -492,8 +495,8 @@ bool UrlFetchRequestBase::GetContentData(std::string* upload_content_type, |
} |
bool UrlFetchRequestBase::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) { |
return false; |
} |
@@ -600,7 +603,7 @@ InitiateUploadRequestBase::InitiateUploadRequestBase( |
RequestSender* sender, |
const InitiateUploadCallback& callback, |
const std::string& content_type, |
- int64 content_length) |
+ int64_t content_length) |
: UrlFetchRequestBase(sender), |
callback_(callback), |
content_type_(content_type), |
@@ -651,12 +654,11 @@ UploadRangeResponse::UploadRangeResponse() |
} |
UploadRangeResponse::UploadRangeResponse(DriveApiErrorCode code, |
- int64 start_position_received, |
- int64 end_position_received) |
+ int64_t start_position_received, |
+ int64_t end_position_received) |
: code(code), |
start_position_received(start_position_received), |
- end_position_received(end_position_received) { |
-} |
+ end_position_received(end_position_received) {} |
UploadRangeResponse::~UploadRangeResponse() { |
} |
@@ -692,8 +694,8 @@ void UploadRangeRequestBase::ProcessURLFetchResults( |
// The Range header is appeared only if there is at least one received |
// byte. So, initialize the positions by 0 so that the [0,0) will be |
// returned via the |callback_| for empty data case. |
- int64 start_position_received = 0; |
- int64 end_position_received = 0; |
+ int64_t start_position_received = 0; |
+ int64_t end_position_received = 0; |
std::string range_received; |
hdrs->EnumerateHeader(NULL, kUploadResponseRange, &range_received); |
if (!range_received.empty()) { // Parse the range header. |
@@ -755,9 +757,9 @@ void UploadRangeRequestBase::RunCallbackOnPrematureFailure( |
ResumeUploadRequestBase::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) |
: UploadRangeRequestBase(sender, upload_location), |
@@ -798,11 +800,10 @@ ResumeUploadRequestBase::GetExtraRequestHeaders() const { |
return headers; |
} |
-bool ResumeUploadRequestBase::GetContentFile( |
- base::FilePath* local_file_path, |
- int64* range_offset, |
- int64* range_length, |
- std::string* upload_content_type) { |
+bool ResumeUploadRequestBase::GetContentFile(base::FilePath* local_file_path, |
+ int64_t* range_offset, |
+ int64_t* range_length, |
+ std::string* upload_content_type) { |
if (start_position_ == end_position_) { |
// No content data. |
return false; |
@@ -819,7 +820,7 @@ bool ResumeUploadRequestBase::GetContentFile( |
GetUploadStatusRequestBase::GetUploadStatusRequestBase(RequestSender* sender, |
const GURL& upload_url, |
- int64 content_length) |
+ int64_t content_length) |
: UploadRangeRequestBase(sender, upload_url), |
content_length_(content_length) {} |
@@ -846,7 +847,7 @@ MultipartUploadRequestBase::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) |
@@ -939,8 +940,8 @@ void MultipartUploadRequestBase::NotifyError(DriveApiErrorCode code) { |
void MultipartUploadRequestBase::NotifyUploadProgress( |
const net::URLFetcher* source, |
- int64 current, |
- int64 total) { |
+ int64_t current, |
+ int64_t total) { |
if (!progress_callback_.is_null()) |
progress_callback_.Run(current, total); |
} |
@@ -994,8 +995,8 @@ void DownloadFileRequestBase::GetOutputFilePath( |
void DownloadFileRequestBase::OnURLFetchDownloadProgress( |
const URLFetcher* source, |
- int64 current, |
- int64 total) { |
+ int64_t current, |
+ int64_t total) { |
if (!progress_callback_.is_null()) |
progress_callback_.Run(current, total); |
} |