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

Unified Diff: chrome/browser/ui/webui/version_handler_chromeos.cc

Issue 2672023003: Use TaskScheduler instead of blocking pool in version_handler_chromeos.cc. (Closed)
Patch Set: may block comment Created 3 years, 10 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 | « no previous file | chromeos/system/version_loader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/version_handler_chromeos.cc
diff --git a/chrome/browser/ui/webui/version_handler_chromeos.cc b/chrome/browser/ui/webui/version_handler_chromeos.cc
index 09c446a7b69c254c13c8e123d42224d27c94ddaf..cd9ab7f5e85f50a5c32a702f7cd4eab03570d2de 100644
--- a/chrome/browser/ui/webui/version_handler_chromeos.cc
+++ b/chrome/browser/ui/webui/version_handler_chromeos.cc
@@ -5,8 +5,7 @@
#include "chrome/browser/ui/webui/version_handler_chromeos.h"
#include "base/bind.h"
-#include "base/task_runner_util.h"
-#include "content/public/browser/browser_thread.h"
+#include "base/task_scheduler/post_task.h"
#include "content/public/browser/web_ui.h"
VersionHandlerChromeOS::VersionHandlerChromeOS()
@@ -19,16 +18,16 @@ VersionHandlerChromeOS::~VersionHandlerChromeOS() {
void VersionHandlerChromeOS::HandleRequestVersionInfo(
const base::ListValue* args) {
// Start the asynchronous load of the versions.
- base::PostTaskAndReplyWithResult(
- content::BrowserThread::GetBlockingPool(),
- FROM_HERE,
+ base::PostTaskWithTraitsAndReplyWithResult(
+ FROM_HERE, base::TaskTraits().MayBlock().WithPriority(
+ base::TaskPriority::BACKGROUND),
base::Bind(&chromeos::version_loader::GetVersion,
chromeos::version_loader::VERSION_FULL),
base::Bind(&VersionHandlerChromeOS::OnVersion,
weak_factory_.GetWeakPtr()));
- base::PostTaskAndReplyWithResult(
- content::BrowserThread::GetBlockingPool(),
- FROM_HERE,
+ base::PostTaskWithTraitsAndReplyWithResult(
+ FROM_HERE, base::TaskTraits().MayBlock().WithPriority(
+ base::TaskPriority::BACKGROUND),
base::Bind(&chromeos::version_loader::GetARCVersion),
base::Bind(&VersionHandlerChromeOS::OnARCVersion,
weak_factory_.GetWeakPtr()));
« no previous file with comments | « no previous file | chromeos/system/version_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698