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; |
} |