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

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

Issue 214363002: drive: Return cancel closure from FileSystem::GetFileContent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comment Created 6 years, 9 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/fake_file_system.cc
diff --git a/chrome/browser/chromeos/drive/fake_file_system.cc b/chrome/browser/chromeos/drive/fake_file_system.cc
index 2ed13c01c55fbad10ebada9fac45ff364bb4f793..00555dcc088d7a5af32708b6316076c4bcb69f4d 100644
--- a/chrome/browser/chromeos/drive/fake_file_system.cc
+++ b/chrome/browser/chromeos/drive/fake_file_system.cc
@@ -127,7 +127,7 @@ void FakeFileSystem::GetFileForSaving(const base::FilePath& file_path,
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
}
-void FakeFileSystem::GetFileContent(
+base::Closure FakeFileSystem::GetFileContent(
const base::FilePath& file_path,
const GetFileContentInitializedCallback& initialized_callback,
const google_apis::GetContentCallback& get_content_callback,
@@ -140,6 +140,7 @@ void FakeFileSystem::GetFileContent(
weak_ptr_factory_.GetWeakPtr(),
initialized_callback, get_content_callback,
completion_callback));
+ return base::Bind(&base::DoNothing);
}
void FakeFileSystem::GetResourceEntry(
@@ -295,14 +296,12 @@ void FakeFileSystem::GetFileContentAfterGetWapiResourceEntry(
cache_dir_.path().AppendASCII(entry->resource_id());
if (base::PathExists(cache_path)) {
// Cache file is found.
- initialized_callback.Run(FILE_ERROR_OK, entry.Pass(), cache_path,
- base::Closure());
+ initialized_callback.Run(FILE_ERROR_OK, cache_path, entry.Pass());
completion_callback.Run(FILE_ERROR_OK);
return;
}
- initialized_callback.Run(FILE_ERROR_OK, entry.Pass(), base::FilePath(),
- base::Bind(&base::DoNothing));
+ initialized_callback.Run(FILE_ERROR_OK, base::FilePath(), entry.Pass());
drive_service_->DownloadFile(
cache_path,
gdata_entry->resource_id(),
« no previous file with comments | « chrome/browser/chromeos/drive/fake_file_system.h ('k') | chrome/browser/chromeos/drive/fake_file_system_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698