Index: chrome/browser/printing/printer_manager_dialog_win.cc |
diff --git a/chrome/browser/printing/printer_manager_dialog_win.cc b/chrome/browser/printing/printer_manager_dialog_win.cc |
index 5e71976ebb12018648da9799cd30191e53526d3e..983dea7ba645b4dc87bebb5951779b5cc02d1102 100644 |
--- a/chrome/browser/printing/printer_manager_dialog_win.cc |
+++ b/chrome/browser/printing/printer_manager_dialog_win.cc |
@@ -10,31 +10,31 @@ |
#include "base/bind.h" |
#include "base/files/file_path.h" |
#include "base/path_service.h" |
+#include "base/task_scheduler/post_task.h" |
#include "base/threading/thread.h" |
-#include "chrome/browser/browser_process.h" |
-#include "content/public/browser/browser_thread.h" |
-using content::BrowserThread; |
- |
-namespace printing { |
+namespace { |
// A helper callback that opens the printer management dialog. |
void OpenPrintersDialogCallback() { |
base::FilePath sys_dir; |
PathService::Get(base::DIR_SYSTEM, &sys_dir); |
- base::FilePath rundll32 = sys_dir.AppendASCII("rundll32.exe"); |
- base::FilePath shell32dll = sys_dir.AppendASCII("shell32.dll"); |
+ base::FilePath rundll32 = sys_dir.Append(L"rundll32.exe"); |
+ base::FilePath shell32dll = sys_dir.Append(L"shell32.dll"); |
std::wstring args(shell32dll.value()); |
args.append(L",SHHelpShortcuts_RunDLL PrintersFolder"); |
- ShellExecute(NULL, L"open", rundll32.value().c_str(), args.c_str(), NULL, |
- SW_SHOWNORMAL); |
+ ShellExecute(nullptr, L"open", rundll32.value().c_str(), args.c_str(), |
+ nullptr, SW_SHOWNORMAL); |
} |
+} // namespace |
+ |
+namespace printing { |
+ |
void PrinterManagerDialog::ShowPrinterManagerDialog() { |
- BrowserThread::PostTask( |
- BrowserThread::FILE, |
- FROM_HERE, |
+ base::PostTaskWithTraits( |
+ FROM_HERE, {base::MayBlock(), base::TaskPriority::USER_BLOCKING}, |
base::Bind(OpenPrintersDialogCallback)); |
} |