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

Unified Diff: chrome/browser/chromeos/drive/sync/remove_performer.cc

Issue 321753002: drive: Stop returning ResourceEntry from JobScheduler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | « chrome/browser/chromeos/drive/sync/remove_performer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/drive/sync/remove_performer.cc
diff --git a/chrome/browser/chromeos/drive/sync/remove_performer.cc b/chrome/browser/chromeos/drive/sync/remove_performer.cc
index 527b1cfcd2fcac91f7e113e5f00efbfb8cacb477..9e6d4be3777f9abe723f813bcc9571c093f96f88 100644
--- a/chrome/browser/chromeos/drive/sync/remove_performer.cc
+++ b/chrome/browser/chromeos/drive/sync/remove_performer.cc
@@ -12,7 +12,9 @@
#include "chrome/browser/chromeos/drive/resource_entry_conversion.h"
#include "chrome/browser/chromeos/drive/resource_metadata.h"
#include "chrome/browser/chromeos/drive/sync/entry_revert_performer.h"
+#include "chrome/browser/drive/drive_api_util.h"
#include "content/public/browser/browser_thread.h"
+#include "google_apis/drive/drive_api_parser.h"
#include "google_apis/drive/gdata_wapi_parser.h"
using content::BrowserThread;
@@ -176,19 +178,19 @@ void RemovePerformer::UnparentResource(const ClientContext& context,
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!callback.is_null());
- scheduler_->GetResourceEntry(
+ scheduler_->GetFileResource(
resource_id,
context,
- base::Bind(&RemovePerformer::UnparentResourceAfterGetResourceEntry,
+ base::Bind(&RemovePerformer::UnparentResourceAfterGetFileResource,
weak_ptr_factory_.GetWeakPtr(), context, callback, local_id));
}
-void RemovePerformer::UnparentResourceAfterGetResourceEntry(
+void RemovePerformer::UnparentResourceAfterGetFileResource(
const ClientContext& context,
const FileOperationCallback& callback,
const std::string& local_id,
google_apis::GDataErrorCode status,
- scoped_ptr<google_apis::ResourceEntry> resource_entry) {
+ scoped_ptr<google_apis::FileResource> file_resource) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!callback.is_null());
@@ -206,7 +208,9 @@ void RemovePerformer::UnparentResourceAfterGetResourceEntry(
ResourceEntry entry;
std::string parent_resource_id;
- if (!ConvertToResourceEntry(*resource_entry, &entry, &parent_resource_id)) {
+ if (!ConvertToResourceEntry(
+ *util::ConvertFileResourceToResourceEntry(*file_resource),
+ &entry, &parent_resource_id)) {
callback.Run(FILE_ERROR_NOT_A_FILE);
return;
}
« no previous file with comments | « chrome/browser/chromeos/drive/sync/remove_performer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698