Commit 6372ccbf authored by Carlos Caballero's avatar Carlos Caballero Committed by Commit Bot

[scheduling] Use ScopedTaskEnvironment instead of MessageLoop in safe_browsing

MessageLoop will go away, eventually.

BUG=891670

Change-Id: I8895f7978fa8269f46fb63a9cf39fe9c0ac7f859
Reviewed-on: https://chromium-review.googlesource.com/c/1451882Reviewed-by: default avatarNathan Parker <nparker@chromium.org>
Commit-Queue: Carlos Caballero <carlscab@google.com>
Cr-Commit-Position: refs/heads/master@{#629521}
parent 6c0254a7
......@@ -14,12 +14,13 @@
#include "base/bind.h"
#include "base/callback.h"
#include "base/location.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
#include "base/strings/string16.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/scoped_task_environment.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "chrome/renderer/safe_browsing/features.h"
......@@ -115,7 +116,7 @@ class PhishingTermFeatureExtractorTest : public ::testing::Test {
shingle_hashes,
base::Bind(&PhishingTermFeatureExtractorTest::ExtractionDone,
base::Unretained(this)));
msg_loop_.task_runner()->PostTask(
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::BindOnce(&PhishingTermFeatureExtractorTest::QuitExtraction,
base::Unretained(this)));
......@@ -134,7 +135,7 @@ class PhishingTermFeatureExtractorTest : public ::testing::Test {
active_run_loop_->QuitWhenIdle();
}
base::MessageLoop msg_loop_;
base::test::ScopedTaskEnvironment scoped_task_environment_;
std::unique_ptr<base::RunLoop> active_run_loop_;
MockFeatureExtractorClock clock_;
std::unique_ptr<PhishingTermFeatureExtractor> extractor_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment