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

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

Issue 278273002: drive: Change the return type of ResourceMetadata's methods to FileError (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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/sync/entry_revert_performer.cc
diff --git a/chrome/browser/chromeos/drive/sync/entry_revert_performer.cc b/chrome/browser/chromeos/drive/sync/entry_revert_performer.cc
index 853039ee9de9f44149d366fe1219b34efcc4893b..fc7d06769e03577cd0004e0107ac8292ec4ebc56 100644
--- a/chrome/browser/chromeos/drive/sync/entry_revert_performer.cc
+++ b/chrome/browser/chromeos/drive/sync/entry_revert_performer.cc
@@ -40,7 +40,10 @@ FileError FinishRevert(ResourceMetadata* metadata,
return error;
}
- const base::FilePath original_path = metadata->GetFilePath(local_id);
+ base::FilePath original_path;
+ error = metadata->GetFilePath(local_id, &original_path);
+ if (error != FILE_ERROR_OK)
+ return error;
if (entry.deleted()) {
error = metadata->RemoveEntry(local_id);
@@ -59,7 +62,11 @@ FileError FinishRevert(ResourceMetadata* metadata,
if (error != FILE_ERROR_OK)
return error;
- changed_directories->insert(metadata->GetFilePath(entry.parent_local_id()));
+ base::FilePath new_parent_path;
+ error = metadata->GetFilePath(entry.parent_local_id(), &new_parent_path);
+ if (error != FILE_ERROR_OK)
+ return error;
+ changed_directories->insert(new_parent_path);
changed_directories->insert(original_path.DirName());
}
return FILE_ERROR_OK;
« no previous file with comments | « chrome/browser/chromeos/drive/search_metadata.cc ('k') | chrome/browser/chromeos/drive/sync/entry_update_performer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698