Commit 0b06641c authored by Carlos Caballero's avatar Carlos Caballero Committed by Commit Bot

Remove references of MessageLoopForIO in /net

MessageLoopForIO will go away soon use ScopedTaskEnvironment instead.

ScopedTaskEnvironment will per default start a ThreadPool, which should
be fine in most of the cases. If you believe your test needs to make sure
that no ThreadPool runs let me know and I will update the patch.

BUG=891670
This CL was uploaded by git cl split.

R=mmenke@chromium.org

Change-Id: I2abffb81e28b6afcf29a9e0d96b1eff8163c130e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1733494
Auto-Submit: Carlos Caballero <carlscab@google.com>
Reviewed-by: default avatarMatt Menke <mmenke@chromium.org>
Commit-Queue: Matt Menke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#683639}
parent 391400b7
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
#include "base/bind.h" #include "base/bind.h"
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h" #include "base/run_loop.h"
#include "base/test/perf_time_logger.h" #include "base/test/perf_time_logger.h"
#include "base/test/scoped_task_environment.h"
#include "net/base/io_buffer.h" #include "net/base/io_buffer.h"
#include "net/base/ip_endpoint.h" #include "net/base/ip_endpoint.h"
#include "net/base/net_errors.h" #include "net/base/net_errors.h"
...@@ -91,7 +91,8 @@ void UDPSocketPerfTest::WritePacketsToSocket(UDPClientSocket* socket, ...@@ -91,7 +91,8 @@ void UDPSocketPerfTest::WritePacketsToSocket(UDPClientSocket* socket,
} }
void UDPSocketPerfTest::WriteBenchmark(bool use_nonblocking_io) { void UDPSocketPerfTest::WriteBenchmark(bool use_nonblocking_io) {
base::MessageLoopForIO message_loop; base::test::ScopedTaskEnvironment scoped_task_environment(
base::test::ScopedTaskEnvironment::MainThreadType::IO);
const uint16_t kPort = 9999; const uint16_t kPort = 9999;
// Setup the server to listen. // Setup the server to listen.
......
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