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

Unified Diff: components/drive/file_system/operation_test_base.cc

Issue 2352853002: Disallow redundant Bind calls. (Closed)
Patch Set: static_assert message tweak Created 4 years, 3 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: components/drive/file_system/operation_test_base.cc
diff --git a/components/drive/file_system/operation_test_base.cc b/components/drive/file_system/operation_test_base.cc
index 8e6955e6d4585aa34d9fb82b2fe1fe9fd6a0cabc..5659880145f6af19af5d875bf4e1dda36a232041 100644
--- a/components/drive/file_system/operation_test_base.cc
+++ b/components/drive/file_system/operation_test_base.cc
@@ -145,11 +145,10 @@ FileError OperationTestBase::GetLocalResourceEntry(const base::FilePath& path,
ResourceEntry* entry) {
FileError error = FILE_ERROR_FAILED;
base::PostTaskAndReplyWithResult(
- blocking_task_runner(),
- FROM_HERE,
+ blocking_task_runner(), FROM_HERE,
base::Bind(&internal::ResourceMetadata::GetResourceEntryByPath,
base::Unretained(metadata()), path, entry),
- base::Bind(google_apis::test_util::CreateCopyResultCallback(&error)));
+ google_apis::test_util::CreateCopyResultCallback(&error));
content::RunAllBlockingPoolTasksUntilIdle();
return error;
}
@@ -159,11 +158,10 @@ FileError OperationTestBase::GetLocalResourceEntryById(
ResourceEntry* entry) {
FileError error = FILE_ERROR_FAILED;
base::PostTaskAndReplyWithResult(
- blocking_task_runner(),
- FROM_HERE,
+ blocking_task_runner(), FROM_HERE,
base::Bind(&internal::ResourceMetadata::GetResourceEntryById,
base::Unretained(metadata()), local_id, entry),
- base::Bind(google_apis::test_util::CreateCopyResultCallback(&error)));
+ google_apis::test_util::CreateCopyResultCallback(&error));
content::RunAllBlockingPoolTasksUntilIdle();
return error;
}
@@ -172,11 +170,10 @@ std::string OperationTestBase::GetLocalId(const base::FilePath& path) {
std::string local_id;
FileError error = FILE_ERROR_FAILED;
base::PostTaskAndReplyWithResult(
- blocking_task_runner(),
- FROM_HERE,
+ blocking_task_runner(), FROM_HERE,
base::Bind(&internal::ResourceMetadata::GetIdByPath,
base::Unretained(metadata()), path, &local_id),
- base::Bind(google_apis::test_util::CreateCopyResultCallback(&error)));
+ google_apis::test_util::CreateCopyResultCallback(&error));
content::RunAllBlockingPoolTasksUntilIdle();
EXPECT_EQ(FILE_ERROR_OK, error) << path.value();
return local_id;

Powered by Google App Engine
This is Rietveld 408576698