|
@@ -24,6 +24,7 @@
|
|
|
#include "base/strings/string_util.h"
|
|
|
#include "base/strings/utf_string_conversions.h"
|
|
|
#include "base/task/post_task.h"
|
|
|
+#include "base/task/thread_pool.h"
|
|
|
#include "base/threading/scoped_blocking_call.h"
|
|
|
#include "base/win/registry.h"
|
|
|
#include "base/win/scoped_co_mem.h"
|
|
@@ -317,8 +318,8 @@ std::string OpenPathOnThread(const base::FilePath& full_path) {
|
|
|
namespace platform_util {
|
|
|
|
|
|
void ShowItemInFolder(const base::FilePath& full_path) {
|
|
|
- base::CreateCOMSTATaskRunner(
|
|
|
- {base::ThreadPool(), base::MayBlock(), base::TaskPriority::USER_BLOCKING})
|
|
|
+ base::ThreadPool::CreateSingleThreadTaskRunner(
|
|
|
+ {base::MayBlock(), base::TaskPriority::USER_BLOCKING})
|
|
|
->PostTask(FROM_HERE,
|
|
|
base::BindOnce(&ShowItemInFolderOnWorkerThread, full_path));
|
|
|
}
|
|
@@ -327,7 +328,7 @@ void OpenPath(const base::FilePath& full_path, OpenCallback callback) {
|
|
|
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
|
|
|
|
|
base::PostTaskAndReplyWithResult(
|
|
|
- base::CreateCOMSTATaskRunner({base::ThreadPool(), base::MayBlock(),
|
|
|
+ base::ThreadPool::CreateSingleThreadTaskRunner(({base::MayBlock(),
|
|
|
base::TaskPriority::USER_BLOCKING})
|
|
|
.get(),
|
|
|
FROM_HERE, base::BindOnce(&OpenPathOnThread, full_path),
|
|
@@ -338,8 +339,8 @@ void OpenExternal(const GURL& url,
|
|
|
const OpenExternalOptions& options,
|
|
|
OpenCallback callback) {
|
|
|
base::PostTaskAndReplyWithResult(
|
|
|
- base::CreateCOMSTATaskRunner({base::ThreadPool(), base::MayBlock(),
|
|
|
- base::TaskPriority::USER_BLOCKING})
|
|
|
+ base::ThreadPool::CreateCOMSTATaskRunner(
|
|
|
+ {base::MayBlock(), base::TaskPriority::USER_BLOCKING})
|
|
|
.get(),
|
|
|
FROM_HERE, base::BindOnce(&OpenExternalOnWorkerThread, url, options),
|
|
|
std::move(callback));
|