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

Unified Diff: chrome/browser/chromeos/gdata/gdata_file_system.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
Index: chrome/browser/chromeos/gdata/gdata_file_system.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_file_system.cc b/chrome/browser/chromeos/gdata/gdata_file_system.cc
index d329e9eed0c208a17f501ad1c06b696914cddba7..0f0343ac338d04da4bb502cf9710ab9a03b280c3 100644
--- a/chrome/browser/chromeos/gdata/gdata_file_system.cc
+++ b/chrome/browser/chromeos/gdata/gdata_file_system.cc
@@ -785,8 +785,7 @@ void RelayFindEntryCallback(scoped_refptr<base::MessageLoopProxy> relay_proxy,
base::PlatformFileError error,
const FilePath& directory_path,
GDataEntry* entry) {
- relay_proxy->PostTask(FROM_HERE,
- base::Bind(callback, error, directory_path, entry));
+ relay_proxy->PostTask(FROM_HERE, base::Bind(callback, error, entry));
}
// Ditto for FileOperationCallback.
@@ -1022,7 +1021,6 @@ void GDataFileSystem::CheckForUpdates() {
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_);
@@ -1117,9 +1115,9 @@ void GDataFileSystem::FindEntryByResourceIdSync(
file = entry->AsGDataFile();
if (file)
- callback.Run(base::PLATFORM_FILE_OK, file->parent()->GetFilePath(), file);
+ callback.Run(base::PLATFORM_FILE_OK, file);
else
- callback.Run(base::PLATFORM_FILE_ERROR_NOT_FOUND, FilePath(), NULL);
+ callback.Run(base::PLATFORM_FILE_ERROR_NOT_FOUND, NULL);
}
void GDataFileSystem::FindEntryByPathAsyncOnUIThread(
@@ -1301,10 +1299,8 @@ void GDataFileSystem::LoadFeedFromServer(
void GDataFileSystem::OnFeedFromServerLoaded(GetDocumentsParams* params,
base::PlatformFileError error) {
if (error != base::PLATFORM_FILE_OK) {
- if (!params->callback.is_null()) {
- params->callback.Run(error, FilePath(),
- reinterpret_cast<GDataEntry*>(NULL));
- }
+ if (!params->callback.is_null())
+ params->callback.Run(error, NULL);
return;
}
@@ -1314,10 +1310,8 @@ void GDataFileSystem::OnFeedFromServerLoaded(GetDocumentsParams* params,
params->root_feed_changestamp);
if (error != base::PLATFORM_FILE_OK) {
- if (!params->callback.is_null()) {
- params->callback.Run(error, FilePath(),
- reinterpret_cast<GDataEntry*>(NULL));
- }
+ if (!params->callback.is_null())
+ params->callback.Run(error, NULL);
return;
}
@@ -2395,7 +2389,6 @@ void GDataFileSystem::GetEntryInfoByPathAsyncOnUIThread(
void GDataFileSystem::OnGetEntryInfo(const GetEntryInfoCallback& callback,
base::PlatformFileError error,
- const FilePath& directory_path,
GDataEntry* entry) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -2443,14 +2436,11 @@ void GDataFileSystem::GetFileInfoByPathAsyncOnUIThread(
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));
@@ -2511,7 +2501,6 @@ void GDataFileSystem::ReadDirectoryByPathAsyncOnUIThread(
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