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

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

Issue 23514007: Refactor TrashResourceRequest. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 4 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 | chrome/browser/google_apis/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 cb05955a70d18f49485bc862a1e7c7240c814b63..9cb3d73345f3f179df4957286130cbe142ee2f66 100644
--- a/chrome/browser/drive/drive_api_service.cc
+++ b/chrome/browser/drive/drive_api_service.cc
@@ -62,12 +62,12 @@ using google_apis::drive::FilesGetRequest;
using google_apis::drive::FilesInsertRequest;
using google_apis::drive::FilesPatchRequest;
using google_apis::drive::FilesListRequest;
+using google_apis::drive::FilesTrashRequest;
using google_apis::drive::GetUploadStatusRequest;
using google_apis::drive::InitiateUploadExistingFileRequest;
using google_apis::drive::InitiateUploadNewFileRequest;
using google_apis::drive::InsertResourceRequest;
using google_apis::drive::ResumeUploadRequest;
-using google_apis::drive::TrashResourceRequest;
namespace drive {
@@ -592,11 +592,11 @@ CancelCallback DriveAPIService::DeleteResource(
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!callback.is_null());
- return sender_->StartRequestWithRetry(new TrashResourceRequest(
- sender_.get(),
- url_generator_,
- resource_id,
- callback));
+ FilesTrashRequest* request = new FilesTrashRequest(
+ sender_.get(), url_generator_,
+ base::Bind(&EntryActionCallbackAdapter, callback));
+ request->set_file_id(resource_id);
+ return sender_->StartRequestWithRetry(request);
}
CancelCallback DriveAPIService::AddNewDirectory(
« no previous file with comments | « no previous file | chrome/browser/google_apis/drive_api_requests.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698