Commit a46727d6 authored by Carlos Caballero's avatar Carlos Caballero Committed by Commit Bot

[scheduling] Use ScopedTaskEnvironment instead of MessageLoop in ntp_tiles

MessageLoop will go away, eventually.

BUG=891670

Change-Id: I6b2246cf59b8454ab0a6522bc7825bbcd9e76e12
Reviewed-on: https://chromium-review.googlesource.com/c/1352368Reviewed-by: default avatarMarc Treib <treib@chromium.org>
Commit-Queue: Carlos Caballero <carlscab@google.com>
Cr-Commit-Position: refs/heads/master@{#612207}
parent 07c810d2
...@@ -17,11 +17,11 @@ ...@@ -17,11 +17,11 @@
#include "base/callback_list.h" #include "base/callback_list.h"
#include "base/command_line.h" #include "base/command_line.h"
#include "base/macros.h" #include "base/macros.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h" #include "base/run_loop.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "base/task/cancelable_task_tracker.h" #include "base/task/cancelable_task_tracker.h"
#include "base/test/scoped_feature_list.h" #include "base/test/scoped_feature_list.h"
#include "base/test/scoped_task_environment.h"
#include "base/threading/thread_task_runner_handle.h" #include "base/threading/thread_task_runner_handle.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "components/history/core/browser/top_sites.h" #include "components/history/core/browser/top_sites.h"
...@@ -535,7 +535,7 @@ class MostVisitedSitesTest : public ::testing::TestWithParam<bool> { ...@@ -535,7 +535,7 @@ class MostVisitedSitesTest : public ::testing::TestWithParam<bool> {
suggestions_service_callbacks_; suggestions_service_callbacks_;
TopSitesCallbackList top_sites_callbacks_; TopSitesCallbackList top_sites_callbacks_;
base::MessageLoop message_loop_; base::test::ScopedTaskEnvironment task_environment_;
sync_preferences::TestingPrefServiceSyncable pref_service_; sync_preferences::TestingPrefServiceSyncable pref_service_;
PopularSitesFactoryForTest popular_sites_factory_; PopularSitesFactoryForTest popular_sites_factory_;
scoped_refptr<StrictMock<MockTopSites>> mock_top_sites_; scoped_refptr<StrictMock<MockTopSites>> mock_top_sites_;
......
...@@ -13,12 +13,12 @@ ...@@ -13,12 +13,12 @@
#include "base/bind.h" #include "base/bind.h"
#include "base/command_line.h" #include "base/command_line.h"
#include "base/json/json_writer.h" #include "base/json/json_writer.h"
#include "base/message_loop/message_loop.h"
#include "base/optional.h" #include "base/optional.h"
#include "base/run_loop.h" #include "base/run_loop.h"
#include "base/strings/string_number_conversions.h" #include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "base/test/scoped_feature_list.h" #include "base/test/scoped_feature_list.h"
#include "base/test/scoped_task_environment.h"
#include "base/threading/thread_task_runner_handle.h" #include "base/threading/thread_task_runner_handle.h"
#include "base/values.h" #include "base/values.h"
#include "build/build_config.h" #include "build/build_config.h"
...@@ -211,7 +211,8 @@ class PopularSitesTest : public ::testing::Test { ...@@ -211,7 +211,8 @@ class PopularSitesTest : public ::testing::Test {
const TestPopularSite kYouTube; const TestPopularSite kYouTube;
const TestPopularSite kChromium; const TestPopularSite kChromium;
base::MessageLoopForUI ui_loop_; base::test::ScopedTaskEnvironment task_environment_{
base::test::ScopedTaskEnvironment::MainThreadType::UI};
std::unique_ptr<sync_preferences::TestingPrefServiceSyncable> prefs_; std::unique_ptr<sync_preferences::TestingPrefServiceSyncable> prefs_;
network::TestURLLoaderFactory test_url_loader_factory_; network::TestURLLoaderFactory test_url_loader_factory_;
scoped_refptr<network::SharedURLLoaderFactory> test_shared_loader_factory_; scoped_refptr<network::SharedURLLoaderFactory> test_shared_loader_factory_;
......
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