summaryrefslogtreecommitdiffstats
path: root/google_apis/drive/drive_api_url_generator.cc
diff options
context:
space:
mode:
authorkinaba@chromium.org <kinaba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-04 09:44:20 +0000
committerkinaba@chromium.org <kinaba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-04 09:44:20 +0000
commit00d2f3ef3b4b3fb3df23723fdb12b788fba11581 (patch)
tree732111630d6abb8f1fd31fffaccf917e817ed9e2 /google_apis/drive/drive_api_url_generator.cc
parent55fe4e36df1e79bb03770b837a7803b4cf9907e6 (diff)
downloadchromium_src-00d2f3ef3b4b3fb3df23723fdb12b788fba11581.zip
chromium_src-00d2f3ef3b4b3fb3df23723fdb12b788fba11581.tar.gz
chromium_src-00d2f3ef3b4b3fb3df23723fdb12b788fba11581.tar.bz2
drive: Add request class for Permissions.insert API.
BUG=348465 Review URL: https://codereview.chromium.org/185723004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254738 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'google_apis/drive/drive_api_url_generator.cc')
-rw-r--r--google_apis/drive/drive_api_url_generator.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/google_apis/drive/drive_api_url_generator.cc b/google_apis/drive/drive_api_url_generator.cc
index a68938c..b8374e27 100644
--- a/google_apis/drive/drive_api_url_generator.cc
+++ b/google_apis/drive/drive_api_url_generator.cc
@@ -30,6 +30,7 @@ const char kDriveV2FileTrashUrlFormat[] = "/drive/v2/files/%s/trash";
const char kDriveV2InitiateUploadNewFileUrl[] = "/upload/drive/v2/files";
const char kDriveV2InitiateUploadExistingFileUrlPrefix[] =
"/upload/drive/v2/files/";
+const char kDriveV2PermissionsUrlFormat[] = "/drive/v2/files/%s/permissions";
// apps.delete and file.authorize API is exposed through a special endpoint
// v2internal that is accessible only by the official API key for Chrome.
@@ -216,4 +217,11 @@ GURL DriveApiUrlGenerator::GenerateDownloadFileUrl(
return base_download_url_.Resolve(net::EscapePath(resource_id));
}
+GURL DriveApiUrlGenerator::GetPermissionsInsertUrl(
+ const std::string& resource_id) const {
+ return base_url_.Resolve(
+ base::StringPrintf(kDriveV2PermissionsUrlFormat,
+ net::EscapePath(resource_id).c_str()));
+}
+
} // namespace google_apis