Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(693)

Side by Side Diff: google_apis/drive/drive_api_url_generator.cc

Issue 1548673002: Switch to standard integer types in google_apis/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "google_apis/drive/drive_api_url_generator.h" 5 #include "google_apis/drive/drive_api_url_generator.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "google_apis/google_api_keys.h" 10 #include "google_apis/google_api_keys.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 } 187 }
188 188
189 GURL DriveApiUrlGenerator::GetFilesTrashUrl(const std::string& file_id) const { 189 GURL DriveApiUrlGenerator::GetFilesTrashUrl(const std::string& file_id) const {
190 return base_url_.Resolve(base::StringPrintf( 190 return base_url_.Resolve(base::StringPrintf(
191 kDriveV2FileTrashUrlFormat, net::EscapePath(file_id).c_str())); 191 kDriveV2FileTrashUrlFormat, net::EscapePath(file_id).c_str()));
192 } 192 }
193 193
194 GURL DriveApiUrlGenerator::GetChangesListUrl(bool include_deleted, 194 GURL DriveApiUrlGenerator::GetChangesListUrl(bool include_deleted,
195 int max_results, 195 int max_results,
196 const std::string& page_token, 196 const std::string& page_token,
197 int64 start_change_id) const { 197 int64_t start_change_id) const {
198 DCHECK_GE(start_change_id, 0); 198 DCHECK_GE(start_change_id, 0);
199 199
200 GURL url = base_url_.Resolve(kDriveV2ChangelistUrl); 200 GURL url = base_url_.Resolve(kDriveV2ChangelistUrl);
201 201
202 // includeDeleted is "true" by default. 202 // includeDeleted is "true" by default.
203 if (!include_deleted) 203 if (!include_deleted)
204 url = net::AppendOrReplaceQueryParameter(url, "includeDeleted", "false"); 204 url = net::AppendOrReplaceQueryParameter(url, "includeDeleted", "false");
205 205
206 // maxResults is "100" by default. 206 // maxResults is "100" by default.
207 if (max_results != 100) { 207 if (max_results != 100) {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 base::StringPrintf( 308 base::StringPrintf(
309 crop ? kDriveV2ThumbnailUrlWithCropFormat : kDriveV2ThumbnailUrlFormat, 309 crop ? kDriveV2ThumbnailUrlWithCropFormat : kDriveV2ThumbnailUrlFormat,
310 net::EscapePath(resource_id).c_str(), width, height)); 310 net::EscapePath(resource_id).c_str(), width, height));
311 } 311 }
312 312
313 GURL DriveApiUrlGenerator::GetBatchUploadUrl() const { 313 GURL DriveApiUrlGenerator::GetBatchUploadUrl() const {
314 return base_url_.Resolve(kDriveV2BatchUploadUrl); 314 return base_url_.Resolve(kDriveV2BatchUploadUrl);
315 } 315 }
316 316
317 } // namespace google_apis 317 } // namespace google_apis
OLDNEW
« no previous file with comments | « google_apis/drive/drive_api_url_generator.h ('k') | google_apis/drive/drive_api_url_generator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698