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

Unified Diff: ui/display/chromeos/test/test_native_display_delegate.cc

Issue 2049493004: Remove use of deprecated MessageLoop methods in ui. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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
« no previous file with comments | « ui/base/x/x11_util.cc ('k') | ui/events/gesture_detection/gesture_provider_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/chromeos/test/test_native_display_delegate.cc
diff --git a/ui/display/chromeos/test/test_native_display_delegate.cc b/ui/display/chromeos/test/test_native_display_delegate.cc
index 00d7cd97f82f1b504826ba9308bc2fed8ab736de..2b011f003e403ff6722294f131cf2ab9d53f9d1b 100644
--- a/ui/display/chromeos/test/test_native_display_delegate.cc
+++ b/ui/display/chromeos/test/test_native_display_delegate.cc
@@ -5,7 +5,9 @@
#include "ui/display/chromeos/test/test_native_display_delegate.h"
#include "base/bind.h"
-#include "base/message_loop/message_loop.h"
+#include "base/location.h"
+#include "base/single_thread_task_runner.h"
+#include "base/threading/thread_task_runner_handle.h"
#include "ui/display/chromeos/test/action_logger.h"
#include "ui/display/types/display_mode.h"
@@ -63,8 +65,8 @@ void TestNativeDisplayDelegate::ForceDPMSOn() {
void TestNativeDisplayDelegate::GetDisplays(
const GetDisplaysCallback& callback) {
if (run_async_) {
- base::MessageLoop::current()->PostTask(FROM_HERE,
- base::Bind(callback, outputs_));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(callback, outputs_));
} else {
callback.Run(outputs_);
}
@@ -95,8 +97,8 @@ void TestNativeDisplayDelegate::Configure(const DisplaySnapshot& output,
const ConfigureCallback& callback) {
bool result = Configure(output, mode, origin);
if (run_async_) {
- base::MessageLoop::current()->PostTask(FROM_HERE,
- base::Bind(callback, result));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE,
+ base::Bind(callback, result));
} else {
callback.Run(result);
}
« no previous file with comments | « ui/base/x/x11_util.cc ('k') | ui/events/gesture_detection/gesture_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698