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

Unified Diff: chrome/browser/safe_browsing/download_protection_service_unittest.cc

Issue 2821193005: Rewrite base::Bind to base::BindOnce with base_bind_rewriters in //chrome/browser/safe_browsing (Closed)
Patch Set: Created 3 years, 8 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/safe_browsing/download_protection_service_unittest.cc
diff --git a/chrome/browser/safe_browsing/download_protection_service_unittest.cc b/chrome/browser/safe_browsing/download_protection_service_unittest.cc
index c88eecb7f29b9dfb534fb671628bd5dc92f954b9..94c4c68c7ee07ff81c243dc07754f1e08c14fcad 100644
--- a/chrome/browser/safe_browsing/download_protection_service_unittest.cc
+++ b/chrome/browser/safe_browsing/download_protection_service_unittest.cc
@@ -233,10 +233,9 @@ ACTION_P(CheckDownloadUrlDone, threat_type) {
std::vector<SBThreatType>(1, SB_THREAT_TYPE_BINARY_MALWARE_URL));
for (size_t i = 0; i < check->url_results.size(); ++i)
check->url_results[i] = threat_type;
- BrowserThread::PostTask(BrowserThread::IO,
- FROM_HERE,
- base::Bind(&OnSafeBrowsingResult,
- base::Owned(check)));
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
+ base::BindOnce(&OnSafeBrowsingResult, base::Owned(check)));
}
class DownloadProtectionServiceTest : public testing::Test {
@@ -465,16 +464,16 @@ class DownloadProtectionServiceTest : public testing::Test {
const base::Closure& quit_closure) {
BrowserThread::PostTask(
thread, FROM_HERE,
- base::Bind(&DownloadProtectionServiceTest::RunAllPendingAndQuitUI,
- base::Unretained(this), quit_closure));
+ base::BindOnce(&DownloadProtectionServiceTest::RunAllPendingAndQuitUI,
+ base::Unretained(this), quit_closure));
}
void FlushMessageLoop(BrowserThread::ID thread) {
RunLoop run_loop;
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
- base::Bind(&DownloadProtectionServiceTest::PostRunMessageLoopTask,
- base::Unretained(this), thread, run_loop.QuitClosure()));
+ base::BindOnce(&DownloadProtectionServiceTest::PostRunMessageLoopTask,
+ base::Unretained(this), thread, run_loop.QuitClosure()));
run_loop.Run();
}
@@ -1512,8 +1511,8 @@ TEST_F(DownloadProtectionServiceTest, CheckClientDownloadValidateRequest) {
// Simulate the request finishing.
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
- base::Bind(&DownloadProtectionServiceTest::SendURLFetchComplete,
- base::Unretained(this), fetcher));
+ base::BindOnce(&DownloadProtectionServiceTest::SendURLFetchComplete,
+ base::Unretained(this), fetcher));
run_loop.Run();
}
@@ -1572,8 +1571,8 @@ TEST_F(DownloadProtectionServiceTest,
// Simulate the request finishing.
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
- base::Bind(&DownloadProtectionServiceTest::SendURLFetchComplete,
- base::Unretained(this), fetcher));
+ base::BindOnce(&DownloadProtectionServiceTest::SendURLFetchComplete,
+ base::Unretained(this), fetcher));
run_loop.Run();
}
@@ -1660,8 +1659,8 @@ TEST_F(DownloadProtectionServiceTest,
// Simulate the request finishing.
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
- base::Bind(&DownloadProtectionServiceTest::SendURLFetchComplete,
- base::Unretained(this), fetcher));
+ base::BindOnce(&DownloadProtectionServiceTest::SendURLFetchComplete,
+ base::Unretained(this), fetcher));
run_loop.Run();
}
@@ -1732,8 +1731,8 @@ TEST_F(DownloadProtectionServiceTest,
// Simulate the request finishing.
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
- base::Bind(&DownloadProtectionServiceTest::SendURLFetchComplete,
- base::Unretained(this), fetcher));
+ base::BindOnce(&DownloadProtectionServiceTest::SendURLFetchComplete,
+ base::Unretained(this), fetcher));
run_loop.Run();
}
}

Powered by Google App Engine
This is Rietveld 408576698