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

Unified Diff: ash/display/mirror_window_controller.cc

Issue 1640503002: ash: Do not use MessageLoopForUI when not needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
Index: ash/display/mirror_window_controller.cc
diff --git a/ash/display/mirror_window_controller.cc b/ash/display/mirror_window_controller.cc
index df5717438c47d26829f300773bb591d903e44920..08d82f80cbd379833f2528ee6b77675d84890fe9 100644
--- a/ash/display/mirror_window_controller.cc
+++ b/ash/display/mirror_window_controller.cc
@@ -26,6 +26,7 @@
#include "ash/root_window_settings.h"
#include "ash/shell.h"
#include "base/strings/stringprintf.h"
+#include "base/thread_task_runner_handle.h"
#include "ui/aura/client/capture_client.h"
#include "ui/aura/env.h"
#include "ui/aura/window_delegate.h"
@@ -378,7 +379,7 @@ void MirrorWindowController::CloseAndDeleteHost(MirroringHostInfo* host_info,
// was deleted as a result of input event (e.g. shortcut), so don't delete
// now.
if (delay_host_deletion)
- base::MessageLoop::current()->DeleteSoon(FROM_HERE, host_info);
+ base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, host_info);
else
delete host_info;
}

Powered by Google App Engine
This is Rietveld 408576698