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

Remove MessageLoop references in /components/leveldb_proto

MessageLoop is going away soon.

This CL was uploaded by git cl split.

R=nyquist@chromium.org

Bug: 891670
Change-Id: Ica327fbc1bc3d3a328c3fd60dc211b8b1f752162
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1944854
Auto-Submit: Carlos Caballero <carlscab@google.com>
Reviewed-by: default avatarTommy Nyquist <nyquist@chromium.org>
Commit-Queue: Carlos Caballero <carlscab@google.com>
Cr-Commit-Position: refs/heads/master@{#720865}
parent 537a90df
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
#include <vector> #include <vector>
#include "base/test/perf_time_logger.h" #include "base/test/perf_time_logger.h"
#include "base/test/task_environment.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/timer/elapsed_timer.h" #include "base/timer/elapsed_timer.h"
#include "base/bind.h" #include "base/bind.h"
...@@ -17,7 +19,6 @@ ...@@ -17,7 +19,6 @@
#include "base/files/scoped_temp_dir.h" #include "base/files/scoped_temp_dir.h"
#include "base/location.h" #include "base/location.h"
#include "base/memory/ptr_util.h" #include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h" #include "base/run_loop.h"
#include "base/stl_util.h" #include "base/stl_util.h"
#include "base/strings/string_number_conversions.h" #include "base/strings/string_number_conversions.h"
...@@ -36,7 +37,6 @@ ...@@ -36,7 +37,6 @@
#include "third_party/leveldatabase/env_chromium.h" #include "third_party/leveldatabase/env_chromium.h"
#include "third_party/leveldatabase/leveldb_chrome.h" #include "third_party/leveldatabase/leveldb_chrome.h"
using base::MessageLoop;
using base::ScopedTempDir; using base::ScopedTempDir;
using leveldb_env::Options; using leveldb_env::Options;
using testing::_; using testing::_;
...@@ -139,10 +139,7 @@ class TestDatabase { ...@@ -139,10 +139,7 @@ class TestDatabase {
class ProtoDBPerfTest : public testing::Test { class ProtoDBPerfTest : public testing::Test {
public: public:
void SetUp() override { void SetUp() override { task_runner_ = base::ThreadTaskRunnerHandle::Get(); }
main_loop_.reset(new MessageLoop());
task_runner_ = main_loop_->task_runner();
}
void TearDown() override { void TearDown() override {
ShutdownDBs(); ShutdownDBs();
...@@ -561,7 +558,7 @@ class ProtoDBPerfTest : public testing::Test { ...@@ -561,7 +558,7 @@ class ProtoDBPerfTest : public testing::Test {
std::map<std::string, std::unique_ptr<ScopedTempDir>> temp_dirs_; std::map<std::string, std::unique_ptr<ScopedTempDir>> temp_dirs_;
std::map<std::string, std::unique_ptr<TestDatabase>> dbs_; std::map<std::string, std::unique_ptr<TestDatabase>> dbs_;
std::unique_ptr<MessageLoop> main_loop_; base::test::SingleThreadTaskEnvironment task_environment_;
scoped_refptr<base::SingleThreadTaskRunner> task_runner_; scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
}; };
......
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