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

Unified Diff: ui/aura/test/ui_controls_factory_aurawin.cc

Issue 2375663002: Replace MessageLoop::current()->task_runner() with ThreadTaskRunnerHandle::Get(). (Closed)
Patch Set: rebase Created 4 years, 3 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 | « third_party/zlib/google/zip_reader.cc ('k') | ui/ozone/platform/wayland/wayland_connection.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/test/ui_controls_factory_aurawin.cc
diff --git a/ui/aura/test/ui_controls_factory_aurawin.cc b/ui/aura/test/ui_controls_factory_aurawin.cc
index ae8d41543c99e46778a79f7b0165a47b33021142..7d1d2bbe4ef0775eb35aebeb574398c83168822e 100644
--- a/ui/aura/test/ui_controls_factory_aurawin.cc
+++ b/ui/aura/test/ui_controls_factory_aurawin.cc
@@ -6,6 +6,7 @@
#include "base/macros.h"
#include "base/message_loop/message_loop.h"
#include "base/single_thread_task_runner.h"
+#include "base/threading/thread_task_runner_handle.h"
#include "ui/aura/test/ui_controls_factory_aura.h"
#include "ui/aura/window.h"
#include "ui/aura/window_tree_host.h"
@@ -77,8 +78,8 @@ class UIControlsWin : public UIControlsAura {
void RunClosureAfterAllPendingUIEvents(
const base::Closure& closure) override {
// On windows, posting UI events is synchronous so just post the closure.
- base::MessageLoopForUI::current()->task_runner()->PostTask(FROM_HERE,
- closure);
+ DCHECK(base::MessageLoopForUI::IsCurrent());
+ base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, closure);
}
private:
« no previous file with comments | « third_party/zlib/google/zip_reader.cc ('k') | ui/ozone/platform/wayland/wayland_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698