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

Unified Diff: ui/shell_dialogs/select_file_dialog_win.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 | « ui/ozone/platform/wayland/wayland_connection.cc ('k') | ui/views/controls/menu/menu_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/shell_dialogs/select_file_dialog_win.cc
diff --git a/ui/shell_dialogs/select_file_dialog_win.cc b/ui/shell_dialogs/select_file_dialog_win.cc
index 1574f88d341dab10d9e89c67cc1fcf2ee1436f8e..46804d2ac696ba305b23bc68cce4e4f5ecd9697e 100644
--- a/ui/shell_dialogs/select_file_dialog_win.cc
+++ b/ui/shell_dialogs/select_file_dialog_win.cc
@@ -15,10 +15,12 @@
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/i18n/case_conversion.h"
+#include "base/logging.h"
#include "base/macros.h"
#include "base/message_loop/message_loop.h"
#include "base/single_thread_task_runner.h"
#include "base/threading/thread.h"
+#include "base/threading/thread_task_runner_handle.h"
#include "base/win/registry.h"
#include "base/win/scoped_comptr.h"
#include "base/win/shortcut.h"
@@ -201,9 +203,10 @@ class SelectFileDialogImpl : public ui::SelectFileDialog,
file_type_index(file_type_index),
default_extension(default_extension),
run_state(run_state),
- ui_task_runner(base::MessageLoopForUI::current()->task_runner()),
+ ui_task_runner(base::ThreadTaskRunnerHandle::Get()),
owner(owner),
params(params) {
+ DCHECK(base::MessageLoopForUI::IsCurrent());
if (file_types)
this->file_types = *file_types;
}
« no previous file with comments | « ui/ozone/platform/wayland/wayland_connection.cc ('k') | ui/views/controls/menu/menu_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698