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

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

Issue 2029903002: Add token field to ClientSafeBrowsingReportReqeust (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tweak comments Created 4 years, 6 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 c3ccd7178c2e567d9bf3d9aedb20e0f984379ca4..31ac67d5c742f2e2417a0082e017bf6fea93fbb6 100644
--- a/chrome/browser/safe_browsing/download_protection_service_unittest.cc
+++ b/chrome/browser/safe_browsing/download_protection_service_unittest.cc
@@ -463,15 +463,22 @@ class DownloadProtectionServiceTest : public testing::Test {
}
public:
- void CheckDoneCallback(
+ void CheckUrlDoneCallback(
DownloadProtectionService::DownloadCheckResult result) {
result_ = result;
has_result_ = true;
MessageLoop::current()->QuitWhenIdle();
}
+ void CheckDoneCallback(
+ DownloadProtectionService::DownloadCheckResult result,
+ const std::string& unused_token) {
+ CheckUrlDoneCallback(result);
+ }
+
void SyncCheckDoneCallback(
- DownloadProtectionService::DownloadCheckResult result) {
+ DownloadProtectionService::DownloadCheckResult result,
+ const std::string& token_unused) {
result_ = result;
has_result_ = true;
}
@@ -1589,7 +1596,7 @@ TEST_F(DownloadProtectionServiceTest, TestCheckDownloadUrl) {
.WillOnce(Return(true));
download_service_->CheckDownloadUrl(
item,
- base::Bind(&DownloadProtectionServiceTest::CheckDoneCallback,
+ base::Bind(&DownloadProtectionServiceTest::CheckUrlDoneCallback,
base::Unretained(this)));
MessageLoop::current()->Run();
EXPECT_TRUE(IsResult(DownloadProtectionService::SAFE));
@@ -1601,7 +1608,7 @@ TEST_F(DownloadProtectionServiceTest, TestCheckDownloadUrl) {
Return(false)));
download_service_->CheckDownloadUrl(
item,
- base::Bind(&DownloadProtectionServiceTest::CheckDoneCallback,
+ base::Bind(&DownloadProtectionServiceTest::CheckUrlDoneCallback,
base::Unretained(this)));
MessageLoop::current()->Run();
EXPECT_TRUE(IsResult(DownloadProtectionService::SAFE));
@@ -1614,7 +1621,7 @@ TEST_F(DownloadProtectionServiceTest, TestCheckDownloadUrl) {
Return(false)));
download_service_->CheckDownloadUrl(
item,
- base::Bind(&DownloadProtectionServiceTest::CheckDoneCallback,
+ base::Bind(&DownloadProtectionServiceTest::CheckUrlDoneCallback,
base::Unretained(this)));
MessageLoop::current()->Run();
EXPECT_TRUE(IsResult(DownloadProtectionService::SAFE));
@@ -1628,7 +1635,7 @@ TEST_F(DownloadProtectionServiceTest, TestCheckDownloadUrl) {
Return(false)));
download_service_->CheckDownloadUrl(
item,
- base::Bind(&DownloadProtectionServiceTest::CheckDoneCallback,
+ base::Bind(&DownloadProtectionServiceTest::CheckUrlDoneCallback,
base::Unretained(this)));
MessageLoop::current()->Run();
EXPECT_TRUE(IsResult(DownloadProtectionService::DANGEROUS));

Powered by Google App Engine
This is Rietveld 408576698