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

Unified Diff: chrome/browser/chromeos/drive/fake_file_system_unittest.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
« no previous file with comments | « chrome/browser/chromeos/drive/fake_file_system.cc ('k') | chrome/browser/chromeos/drive/file_system.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/drive/fake_file_system_unittest.cc
diff --git a/chrome/browser/chromeos/drive/fake_file_system_unittest.cc b/chrome/browser/chromeos/drive/fake_file_system_unittest.cc
index 6b014ab4d95446c4b431aafb602d5b775fe57858..a391d125371fdad05ab369162c682e20954d6f62 100644
--- a/chrome/browser/chromeos/drive/fake_file_system_unittest.cc
+++ b/chrome/browser/chromeos/drive/fake_file_system_unittest.cc
@@ -38,7 +38,6 @@ TEST_F(FakeFileSystemTest, GetFileContent) {
FileError initialize_error = FILE_ERROR_FAILED;
scoped_ptr<ResourceEntry> entry;
base::FilePath cache_file_path;
- base::Closure cancel_download;
google_apis::test_util::TestGetContentCallback get_content_callback;
FileError completion_error = FILE_ERROR_FAILED;
@@ -46,10 +45,10 @@ TEST_F(FakeFileSystemTest, GetFileContent) {
util::GetDriveMyDriveRootPath().AppendASCII("File 1.txt");
// For the first time, the file should be downloaded from the service.
- fake_file_system_->GetFileContent(
+ base::Closure cancel_download = fake_file_system_->GetFileContent(
kDriveFile,
google_apis::test_util::CreateCopyResultCallback(
- &initialize_error, &entry, &cache_file_path, &cancel_download),
+ &initialize_error, &cache_file_path, &entry),
get_content_callback.callback(),
google_apis::test_util::CreateCopyResultCallback(&completion_error));
base::RunLoop().RunUntilIdle();
@@ -72,10 +71,10 @@ TEST_F(FakeFileSystemTest, GetFileContent) {
completion_error = FILE_ERROR_FAILED;
// For the second time, the cache file should be found.
- fake_file_system_->GetFileContent(
+ cancel_download = fake_file_system_->GetFileContent(
kDriveFile,
google_apis::test_util::CreateCopyResultCallback(
- &initialize_error, &entry, &cache_file_path, &cancel_download),
+ &initialize_error, &cache_file_path, &entry),
get_content_callback.callback(),
google_apis::test_util::CreateCopyResultCallback(&completion_error));
base::RunLoop().RunUntilIdle();
@@ -103,12 +102,10 @@ TEST_F(FakeFileSystemTest, GetFileContent_Directory) {
base::FilePath cache_file_path;
google_apis::test_util::TestGetContentCallback get_content_callback;
FileError completion_error = FILE_ERROR_FAILED;
- base::Closure cancel_download;
-
- fake_file_system_->GetFileContent(
+ base::Closure cancel_download = fake_file_system_->GetFileContent(
util::GetDriveMyDriveRootPath(),
google_apis::test_util::CreateCopyResultCallback(
- &initialize_error, &entry, &cache_file_path, &cancel_download),
+ &initialize_error, &cache_file_path, &entry),
get_content_callback.callback(),
google_apis::test_util::CreateCopyResultCallback(&completion_error));
base::RunLoop().RunUntilIdle();
« no previous file with comments | « chrome/browser/chromeos/drive/fake_file_system.cc ('k') | chrome/browser/chromeos/drive/file_system.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698