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

Unified Diff: chrome/browser/chromeos/drive/file_system/copy_operation.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
Index: chrome/browser/chromeos/drive/file_system/copy_operation.cc
diff --git a/chrome/browser/chromeos/drive/file_system/copy_operation.cc b/chrome/browser/chromeos/drive/file_system/copy_operation.cc
index c301edf6ec661aeb90749885242332994b98281f..45154c657a31eb8610cb225129d796a037186df6 100644
--- a/chrome/browser/chromeos/drive/file_system/copy_operation.cc
+++ b/chrome/browser/chromeos/drive/file_system/copy_operation.cc
@@ -163,13 +163,15 @@ FileError TryToCopyLocally(internal::ResourceMetadata* metadata,
// Stores the entry returned from the server and returns its path.
FileError UpdateLocalStateForServerSideOperation(
internal::ResourceMetadata* metadata,
- scoped_ptr<google_apis::ResourceEntry> resource_entry,
+ scoped_ptr<google_apis::FileResource> file_resource,
base::FilePath* file_path) {
- DCHECK(resource_entry);
+ DCHECK(file_resource);
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) ||
parent_resource_id.empty())
return FILE_ERROR_NOT_A_FILE;
@@ -493,7 +495,7 @@ void CopyOperation::CopyResourceOnServer(
void CopyOperation::UpdateAfterServerSideOperation(
const FileOperationCallback& callback,
google_apis::GDataErrorCode status,
- scoped_ptr<google_apis::ResourceEntry> resource_entry) {
+ scoped_ptr<google_apis::FileResource> entry) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!callback.is_null());
@@ -510,7 +512,7 @@ void CopyOperation::UpdateAfterServerSideOperation(
blocking_task_runner_.get(),
FROM_HERE,
base::Bind(&UpdateLocalStateForServerSideOperation,
- metadata_, base::Passed(&resource_entry), file_path),
+ metadata_, base::Passed(&entry), file_path),
base::Bind(&CopyOperation::UpdateAfterLocalStateUpdate,
weak_ptr_factory_.GetWeakPtr(),
callback, base::Owned(file_path)));
« no previous file with comments | « chrome/browser/chromeos/drive/file_system/copy_operation.h ('k') | chrome/browser/chromeos/drive/job_scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698