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

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

Issue 10383156: Remove directory_path argument from chromeos::FindEntryCallback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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
diff --git a/chrome/browser/chromeos/gdata/gdata_files.cc b/chrome/browser/chromeos/gdata/gdata_files.cc
index a7e9bfd7b2f23a194d4d9eadf789e0a3e7daf9a7..83c1fd9902349f0fe7b1652f4a8460786d0027d0 100644
--- a/chrome/browser/chromeos/gdata/gdata_files.cc
+++ b/chrome/browser/chromeos/gdata/gdata_files.cc
@@ -519,8 +519,7 @@ void GDataRootDirectory::FindEntryByPath(const FilePath& file_path,
if (path_type == util::GDATA_SEARCH_PATH_ROOT ||
path_type == util::GDATA_SEARCH_PATH_QUERY) {
- callback.Run(base::PLATFORM_FILE_OK, file_path.DirName(),
- fake_search_directory_.get());
+ callback.Run(base::PLATFORM_FILE_OK, fake_search_directory_.get());
return;
}
@@ -529,7 +528,7 @@ void GDataRootDirectory::FindEntryByPath(const FilePath& file_path,
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, FilePath(), NULL);
+ callback.Run(base::PLATFORM_FILE_ERROR_NOT_FOUND, NULL);
return;
}
}
@@ -540,16 +539,16 @@ void GDataRootDirectory::FindEntryByPath(const FilePath& file_path,
// 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, directory_path, current_dir);
+ callback.Run(base::PLATFORM_FILE_OK, current_dir);
else
- callback.Run(base::PLATFORM_FILE_ERROR_NOT_FOUND, FilePath(), NULL);
+ callback.Run(base::PLATFORM_FILE_ERROR_NOT_FOUND, 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, FilePath(), NULL);
+ callback.Run(base::PLATFORM_FILE_ERROR_NOT_FOUND, NULL);
return;
}
@@ -559,14 +558,14 @@ void GDataRootDirectory::FindEntryByPath(const FilePath& file_path,
current_dir = entry->AsGDataDirectory();
} else {
if ((i + 1) == (components.size() - 1))
- callback.Run(base::PLATFORM_FILE_OK, directory_path, entry);
+ callback.Run(base::PLATFORM_FILE_OK, entry);
else
- callback.Run(base::PLATFORM_FILE_ERROR_NOT_FOUND, FilePath(), NULL);
+ callback.Run(base::PLATFORM_FILE_ERROR_NOT_FOUND, NULL);
return;
}
}
- callback.Run(base::PLATFORM_FILE_ERROR_NOT_FOUND, FilePath(), NULL);
+ callback.Run(base::PLATFORM_FILE_ERROR_NOT_FOUND, 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