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

Unified Diff: chrome/browser/chromeos/drive/file_system.cc

Issue 16107004: drive: Stop returning FilePath from GetResourceEntryById (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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/file_system.cc
diff --git a/chrome/browser/chromeos/drive/file_system.cc b/chrome/browser/chromeos/drive/file_system.cc
index 1454eddc7c013ce75389712ba231bf2fbe964482..eb8e111d748c49022ab26f9c9c9492e09c742a9b 100644
--- a/chrome/browser/chromeos/drive/file_system.cc
+++ b/chrome/browser/chromeos/drive/file_system.cc
@@ -39,17 +39,6 @@ namespace {
//================================ Helper functions ============================
-// Helper function for binding |path| to GetResourceEntryWithFilePathCallback
-// and create GetResourceEntryCallback.
-void RunGetResourceEntryWithFilePathCallback(
- const GetResourceEntryWithFilePathCallback& callback,
- const base::FilePath& path,
- FileError error,
- scoped_ptr<ResourceEntry> entry) {
- DCHECK(!callback.is_null());
- callback.Run(error, path, entry.Pass());
-}
-
// Callback for ResourceMetadata::GetLargestChangestamp.
// |callback| must not be null.
void OnGetLargestChangestamp(
@@ -179,7 +168,7 @@ void FileSystem::RemoveObserver(FileSystemObserver* observer) {
void FileSystem::GetResourceEntryById(
const std::string& resource_id,
- const GetResourceEntryWithFilePathCallback& callback) {
+ const GetResourceEntryCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!resource_id.empty());
DCHECK(!callback.is_null());
@@ -192,24 +181,19 @@ void FileSystem::GetResourceEntryById(
}
void FileSystem::GetResourceEntryByIdAfterGetEntry(
- const GetResourceEntryWithFilePathCallback& callback,
+ const GetResourceEntryCallback& callback,
FileError error,
- const base::FilePath& file_path,
scoped_ptr<ResourceEntry> entry) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!callback.is_null());
if (error != FILE_ERROR_OK) {
- callback.Run(error, base::FilePath(), scoped_ptr<ResourceEntry>());
+ callback.Run(error, scoped_ptr<ResourceEntry>());
return;
}
DCHECK(entry.get());
- CheckLocalModificationAndRun(
- entry.Pass(),
- base::Bind(&RunGetResourceEntryWithFilePathCallback,
- callback,
- file_path));
+ CheckLocalModificationAndRun(entry.Pass(), callback);
}
void FileSystem::TransferFileFromRemoteToLocal(
« no previous file with comments | « chrome/browser/chromeos/drive/file_system.h ('k') | chrome/browser/chromeos/drive/file_system/create_directory_operation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698