summaryrefslogtreecommitdiffstats
path: root/google_apis/drive/drive_api_url_generator.cc
diff options
context:
space:
mode:
authortzik@chromium.org <tzik@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-12 12:00:06 +0000
committertzik@chromium.org <tzik@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-12 12:00:06 +0000
commit56fc130a8b04f83192d09bd838d290fe724a6838 (patch)
treecbca2de0a5c419078b8974bf13dcf1124dcd48ac /google_apis/drive/drive_api_url_generator.cc
parent165fad29acd06b872c5a757a4a626e033e01af1f (diff)
downloadchromium_src-56fc130a8b04f83192d09bd838d290fe724a6838.zip
chromium_src-56fc130a8b04f83192d09bd838d290fe724a6838.tar.gz
chromium_src-56fc130a8b04f83192d09bd838d290fe724a6838.tar.bz2
[Drive] Add DriveServiceInterface::DeleteResource
* Add DriveServiceInterface::DeleteResource * Implement DriveAPIService::DeleteResource BUG=240165 R=hashimoto@chromium.org Review URL: https://codereview.chromium.org/113803002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240278 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.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/google_apis/drive/drive_api_url_generator.cc b/google_apis/drive/drive_api_url_generator.cc
index 3be0f29..c12b947 100644
--- a/google_apis/drive/drive_api_url_generator.cc
+++ b/google_apis/drive/drive_api_url_generator.cc
@@ -24,6 +24,7 @@ const char kDriveV2ChildrenUrlFormat[] = "/drive/v2/files/%s/children";
const char kDriveV2ChildrenUrlForRemovalFormat[] =
"/drive/v2/files/%s/children/%s";
const char kDriveV2FileCopyUrlFormat[] = "/drive/v2/files/%s/copy";
+const char kDriveV2FileDeleteUrlFormat[] = "/drive/v2/files/%s";
const char kDriveV2FileTrashUrlFormat[] = "/drive/v2/files/%s/trash";
const char kDriveV2InitiateUploadNewFileUrl[] = "/upload/drive/v2/files";
const char kDriveV2InitiateUploadExistingFileUrlPrefix[] =
@@ -109,6 +110,11 @@ GURL DriveApiUrlGenerator::GetFilesListUrl(int max_results,
return url;
}
+GURL DriveApiUrlGenerator::GetFilesDeleteUrl(const std::string& file_id) const {
+ return base_url_.Resolve(base::StringPrintf(
+ kDriveV2FileDeleteUrlFormat, net::EscapePath(file_id).c_str()));
+}
+
GURL DriveApiUrlGenerator::GetFilesTrashUrl(const std::string& file_id) const {
return base_url_.Resolve(base::StringPrintf(
kDriveV2FileTrashUrlFormat, net::EscapePath(file_id).c_str()));