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

Unified Diff: google_apis/drive/drive_api_url_generator.cc

Issue 2885323002: Add URL generator / json parser for getting start_page_token of changes. (Closed)
Patch Set: Created 3 years, 7 months 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/drive/drive_api_url_generator.cc
diff --git a/google_apis/drive/drive_api_url_generator.cc b/google_apis/drive/drive_api_url_generator.cc
index e79bf0decca7285d8673d9767bc6f870ba3c6c7d..c257e3c5de8c20104f91344cfc4605fc161cea94 100644
--- a/google_apis/drive/drive_api_url_generator.cc
+++ b/google_apis/drive/drive_api_url_generator.cc
@@ -23,6 +23,8 @@ namespace {
const char kDriveV2AboutUrl[] = "drive/v2/about";
const char kDriveV2AppsUrl[] = "drive/v2/apps";
const char kDriveV2ChangelistUrl[] = "drive/v2/changes";
+const char kDriveV2ChangesGetStartPageTokenUrl[] =
+ "drive/v2/changes/startPageToken";
const char kDriveV2FilesUrl[] = "drive/v2/files";
const char kDriveV2FileUrlPrefix[] = "drive/v2/files/";
const char kDriveV2ChildrenUrlFormat[] = "drive/v2/files/%s/children";
@@ -223,6 +225,19 @@ GURL DriveApiUrlGenerator::GetFilesTrashUrl(const std::string& file_id) const {
return url;
}
+GURL DriveApiUrlGenerator::GetChangesGetStartPageTokenUrl(
+ const std::string& team_drive_id) const {
+ GURL url = base_url_.Resolve(kDriveV2ChangesGetStartPageTokenUrl);
+ if (enable_team_drives_) {
+ url = net::AppendOrReplaceQueryParameter(url, kSupportsTeamDrives, "true");
+ if (!team_drive_id.empty()) {
+ url =
+ net::AppendOrReplaceQueryParameter(url, "teamDriveId", team_drive_id);
+ }
+ }
+ return url;
+}
+
GURL DriveApiUrlGenerator::GetChangesListUrl(
bool include_deleted,
int max_results,
« 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