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

Unified Diff: chrome/browser/chromeos/gdata/gdata_file_system.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
Index: chrome/browser/chromeos/gdata/gdata_file_system.cc
===================================================================
--- chrome/browser/chromeos/gdata/gdata_file_system.cc (revision 137657)
+++ chrome/browser/chromeos/gdata/gdata_file_system.cc (working copy)
@@ -785,7 +785,8 @@
base::PlatformFileError error,
const FilePath& directory_path,
GDataEntry* entry) {
- relay_proxy->PostTask(FROM_HERE, base::Bind(callback, error, entry));
+ relay_proxy->PostTask(FROM_HERE,
+ base::Bind(callback, error, directory_path, entry));
}
// Ditto for FileOperationCallback.
@@ -1021,6 +1022,7 @@
void GDataFileSystem::OnUpdateChecked(ContentOrigin initial_origin,
base::PlatformFileError error,
+ const FilePath& /* directory_path */,
GDataEntry* /* entry */) {
if (error != base::PLATFORM_FILE_OK) {
base::AutoLock lock(lock_);
@@ -1115,9 +1117,9 @@
file = entry->AsGDataFile();
if (file)
- callback.Run(base::PLATFORM_FILE_OK, file);
+ callback.Run(base::PLATFORM_FILE_OK, file->parent()->GetFilePath(), file);
else
- callback.Run(base::PLATFORM_FILE_ERROR_NOT_FOUND, NULL);
+ callback.Run(base::PLATFORM_FILE_ERROR_NOT_FOUND, FilePath(), NULL);
}
void GDataFileSystem::FindEntryByPathAsyncOnUIThread(
@@ -1299,8 +1301,10 @@
void GDataFileSystem::OnFeedFromServerLoaded(GetDocumentsParams* params,
base::PlatformFileError error) {
if (error != base::PLATFORM_FILE_OK) {
- if (!params->callback.is_null())
- params->callback.Run(error, NULL);
+ if (!params->callback.is_null()) {
+ params->callback.Run(error, FilePath(),
+ reinterpret_cast<GDataEntry*>(NULL));
+ }
return;
}
@@ -1310,8 +1314,10 @@
params->root_feed_changestamp);
if (error != base::PLATFORM_FILE_OK) {
- if (!params->callback.is_null())
- params->callback.Run(error, NULL);
+ if (!params->callback.is_null()) {
+ params->callback.Run(error, FilePath(),
+ reinterpret_cast<GDataEntry*>(NULL));
+ }
return;
}
@@ -2389,6 +2395,7 @@
void GDataFileSystem::OnGetEntryInfo(const GetEntryInfoCallback& callback,
base::PlatformFileError error,
+ const FilePath& directory_path,
GDataEntry* entry) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -2436,11 +2443,14 @@
FindEntryByPathAsyncOnUIThread(
file_path,
- base::Bind(&GDataFileSystem::OnGetFileInfo, ui_weak_ptr_, callback));
+ base::Bind(&GDataFileSystem::OnGetFileInfo,
+ ui_weak_ptr_,
+ callback));
}
void GDataFileSystem::OnGetFileInfo(const GetFileInfoCallback& callback,
base::PlatformFileError error,
+ const FilePath& directory_path,
GDataEntry* entry) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -2501,6 +2511,7 @@
void GDataFileSystem::OnReadDirectory(const ReadDirectoryCallback& callback,
base::PlatformFileError error,
+ const FilePath& directory_path,
GDataEntry* entry) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_file_system.h ('k') | chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698