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

Unified Diff: chrome/browser/chromeos/drive/search_metadata.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/search_metadata.cc
diff --git a/chrome/browser/chromeos/drive/search_metadata.cc b/chrome/browser/chromeos/drive/search_metadata.cc
index 63d0fe1c23fa141245dd3ab9fe780a969a715973..fe14babb115d898e902734e5c7517929abdfbe79 100644
--- a/chrome/browser/chromeos/drive/search_metadata.cc
+++ b/chrome/browser/chromeos/drive/search_metadata.cc
@@ -274,9 +274,10 @@ FileError SearchMetadataOnBlockingPool(ResourceMetadata* resource_metadata,
// The path field of entries in result_candidates are empty at this point,
// because we don't want to run the expensive metadata DB look up except for
// the final results. Hence, here we fill the part.
- base::FilePath path = resource_metadata->GetFilePath(candidate.local_id);
- if (path.empty())
- return FILE_ERROR_FAILED;
+ base::FilePath path;
+ error = resource_metadata->GetFilePath(candidate.local_id, &path);
+ if (error != FILE_ERROR_OK)
+ return error;
bool is_directory = candidate.entry.file_info().is_directory();
results->push_back(MetadataSearchResult(
path, is_directory, candidate.highlighted_base_name));

Powered by Google App Engine
This is Rietveld 408576698