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

Unified Diff: chrome/browser/chromeos/gdata/gdata_files.cc

Issue 10399063: Revert 137657 - Remove directory_path argument from chromeos::FindEntryCallback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/gdata/gdata_files.cc
===================================================================
--- chrome/browser/chromeos/gdata/gdata_files.cc (revision 137657)
+++ chrome/browser/chromeos/gdata/gdata_files.cc (working copy)
@@ -519,7 +519,8 @@
if (path_type == util::GDATA_SEARCH_PATH_ROOT ||
path_type == util::GDATA_SEARCH_PATH_QUERY) {
- callback.Run(base::PLATFORM_FILE_OK, fake_search_directory_.get());
+ callback.Run(base::PLATFORM_FILE_OK, file_path.DirName(),
+ fake_search_directory_.get());
return;
}
@@ -528,7 +529,7 @@
if (path_type != util::GDATA_SEARCH_PATH_INVALID) {
if (!ModifyFindEntryParamsForSearchPath(file_path,
&components, &current_dir, &directory_path)) {
- callback.Run(base::PLATFORM_FILE_ERROR_NOT_FOUND, NULL);
+ callback.Run(base::PLATFORM_FILE_ERROR_NOT_FOUND, FilePath(), NULL);
return;
}
}
@@ -539,16 +540,16 @@
// Last element must match, if not last then it must be a directory.
if (i == components.size() - 1) {
if (current_dir->file_name() == components[i])
- callback.Run(base::PLATFORM_FILE_OK, current_dir);
+ callback.Run(base::PLATFORM_FILE_OK, directory_path, current_dir);
else
- callback.Run(base::PLATFORM_FILE_ERROR_NOT_FOUND, NULL);
+ callback.Run(base::PLATFORM_FILE_ERROR_NOT_FOUND, FilePath(), NULL);
return;
}
// Not the last part of the path, search for the next segment.
GDataEntry* entry = current_dir->FindChild(components[i + 1]);
if (!entry) {
- callback.Run(base::PLATFORM_FILE_ERROR_NOT_FOUND, NULL);
+ callback.Run(base::PLATFORM_FILE_ERROR_NOT_FOUND, FilePath(), NULL);
return;
}
@@ -558,14 +559,14 @@
current_dir = entry->AsGDataDirectory();
} else {
if ((i + 1) == (components.size() - 1))
- callback.Run(base::PLATFORM_FILE_OK, entry);
+ callback.Run(base::PLATFORM_FILE_OK, directory_path, entry);
else
- callback.Run(base::PLATFORM_FILE_ERROR_NOT_FOUND, NULL);
+ callback.Run(base::PLATFORM_FILE_ERROR_NOT_FOUND, FilePath(), NULL);
return;
}
}
- callback.Run(base::PLATFORM_FILE_ERROR_NOT_FOUND, NULL);
+ callback.Run(base::PLATFORM_FILE_ERROR_NOT_FOUND, FilePath(), NULL);
}
GDataEntry* GDataRootDirectory::GetEntryByResourceId(
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698