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

Unified Diff: ui/shell_dialogs/select_file_dialog_win.cc

Issue 1169923009: Remove remaining use of the deprecated MessageLoopProxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo. Created 5 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/compositor/compositor.h ('k') | win8/metro_driver/chrome_app_view.h » ('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 bf0d30b085f9d4cb792591d3ff7f69301dcf06aa..a90c3bc1642e766d7b026d20a99ef109991ff064 100644
--- a/ui/shell_dialogs/select_file_dialog_win.cc
+++ b/ui/shell_dialogs/select_file_dialog_win.cc
@@ -14,7 +14,6 @@
#include "base/files/file_util.h"
#include "base/i18n/case_conversion.h"
#include "base/message_loop/message_loop.h"
-#include "base/message_loop/message_loop_proxy.h"
#include "base/threading/thread.h"
#include "base/tuple.h"
#include "base/win/registry.h"
@@ -201,7 +200,7 @@ class SelectFileDialogImpl : public ui::SelectFileDialog,
file_type_index(file_type_index),
default_extension(default_extension),
run_state(run_state),
- ui_proxy(base::MessageLoopForUI::current()->message_loop_proxy()),
+ ui_task_runner(base::MessageLoopForUI::current()->task_runner()),
owner(owner),
params(params) {
if (file_types)
@@ -214,7 +213,7 @@ class SelectFileDialogImpl : public ui::SelectFileDialog,
int file_type_index;
std::wstring default_extension;
RunState run_state;
- scoped_refptr<base::MessageLoopProxy> ui_proxy;
+ scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner;
HWND owner;
void* params;
};
@@ -442,24 +441,21 @@ void SelectFileDialogImpl::ExecuteSelectFile(
std::vector<base::FilePath> paths;
if (RunOpenMultiFileDialog(params.title, filter,
params.run_state.owner, &paths)) {
- params.ui_proxy->PostTask(
- FROM_HERE,
- base::Bind(&SelectFileDialogImpl::MultiFilesSelected, this, paths,
- params.params, params.run_state));
+ params.ui_task_runner->PostTask(
+ FROM_HERE, base::Bind(&SelectFileDialogImpl::MultiFilesSelected, this,
+ paths, params.params, params.run_state));
return;
}
}
if (success) {
- params.ui_proxy->PostTask(
- FROM_HERE,
- base::Bind(&SelectFileDialogImpl::FileSelected, this, path,
- filter_index, params.params, params.run_state));
+ params.ui_task_runner->PostTask(
+ FROM_HERE, base::Bind(&SelectFileDialogImpl::FileSelected, this, path,
+ filter_index, params.params, params.run_state));
} else {
- params.ui_proxy->PostTask(
- FROM_HERE,
- base::Bind(&SelectFileDialogImpl::FileNotSelected, this, params.params,
- params.run_state));
+ params.ui_task_runner->PostTask(
+ FROM_HERE, base::Bind(&SelectFileDialogImpl::FileNotSelected, this,
+ params.params, params.run_state));
}
}
« no previous file with comments | « ui/compositor/compositor.h ('k') | win8/metro_driver/chrome_app_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698