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

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

Issue 2033753002: Remove use of deprecated MessageLoop methods in chrome/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: manual change Created 4 years, 7 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..ac825f5edd7ba8525594ddc259d691a46285f9a4 100644
--- a/chrome/browser/safe_browsing/download_protection_service_unittest.cc
+++ b/chrome/browser/safe_browsing/download_protection_service_unittest.cc
@@ -18,13 +18,16 @@
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
+#include "base/location.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/message_loop/message_loop.h"
#include "base/path_service.h"
#include "base/run_loop.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/string_number_conversions.h"
#include "base/threading/sequenced_worker_pool.h"
+#include "base/threading/thread_task_runner_handle.h"
#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/safe_browsing/download_feedback_service.h"
#include "chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.h"
@@ -1337,7 +1340,7 @@ TEST_F(DownloadProtectionServiceTest, CheckClientDownloadValidateRequest) {
EXPECT_EQ("dummy dos header", headers.pe_headers().dos_header());
// Simulate the request finishing.
- base::MessageLoop::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::Bind(&DownloadProtectionServiceTest::SendURLFetchComplete,
base::Unretained(this), fetcher));
@@ -1397,7 +1400,7 @@ TEST_F(DownloadProtectionServiceTest,
EXPECT_EQ(0, request.signature().certificate_chain_size());
// Simulate the request finishing.
- base::MessageLoop::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::Bind(&DownloadProtectionServiceTest::SendURLFetchComplete,
base::Unretained(this), fetcher));
@@ -1485,11 +1488,10 @@ TEST_F(DownloadProtectionServiceTest,
EXPECT_EQ("dummy dos header", headers.pe_headers().dos_header());
// Simulate the request finishing.
- base::MessageLoop::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::Bind(&DownloadProtectionServiceTest::SendURLFetchComplete,
- base::Unretained(this),
- fetcher));
+ base::Unretained(this), fetcher));
MessageLoop::current()->Run();
}
@@ -1558,11 +1560,10 @@ TEST_F(DownloadProtectionServiceTest,
EXPECT_EQ("dummy cert data", chain.element(0).certificate());
// Simulate the request finishing.
- base::MessageLoop::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::Bind(&DownloadProtectionServiceTest::SendURLFetchComplete,
- base::Unretained(this),
- fetcher));
+ base::Unretained(this), fetcher));
MessageLoop::current()->Run();
}
}
« no previous file with comments | « chrome/browser/safe_browsing/client_side_model_loader.cc ('k') | chrome/browser/sessions/session_restore.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698