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

Unified Diff: chrome/browser/drive/drive_api_service.cc

Issue 127663002: Implement DriveAPIService::UninstallApp(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Typo fix Created 6 years, 11 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 | « no previous file | google_apis/drive/drive_api_requests.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/drive/drive_api_service.cc
diff --git a/chrome/browser/drive/drive_api_service.cc b/chrome/browser/drive/drive_api_service.cc
index 6ded526202bf61e3cf7bb914054eef862f0990e5..46f4e9fe90bc824243e7454dcaff1da2e521ba3a 100644
--- a/chrome/browser/drive/drive_api_service.cc
+++ b/chrome/browser/drive/drive_api_service.cc
@@ -310,10 +310,10 @@ void DriveAPIService::Initialize(const std::string& account_id) {
std::vector<std::string> scopes;
scopes.push_back(kDriveScope);
scopes.push_back(kDriveAppsReadonlyScope);
+ scopes.push_back(util::kDriveAppsScope);
- // GData WAPI token. These are for GetShareUrl().
+ // GData WAPI token for GetShareUrl() and GetResourceListInDirectoryByWapi().
scopes.push_back(util::kDocsListScope);
- scopes.push_back(util::kDriveAppsScope);
sender_.reset(new RequestSender(
new google_apis::AuthService(oauth2_token_service_,
@@ -798,9 +798,11 @@ CancelCallback DriveAPIService::UninstallApp(
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!callback.is_null());
- // TODO(kinaba) implement.
- NOTREACHED();
- return CancelCallback();
+ google_apis::drive::AppsDeleteRequest* request =
+ new google_apis::drive::AppsDeleteRequest(sender_.get(), url_generator_,
+ callback);
+ request->set_app_id(app_id);
+ return sender_->StartRequestWithRetry(request);
}
CancelCallback DriveAPIService::GetResourceListInDirectoryByWapi(
« no previous file with comments | « no previous file | google_apis/drive/drive_api_requests.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698