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

Unified Diff: chrome/browser/chromeos/login/supervised/supervised_user_authentication.cc

Issue 2834343003: Use TaskScheduler instead of blocking pool in supervised_user_authentication.cc. (Closed)
Patch Set: fix-build-error Created 3 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/supervised/supervised_user_authentication.cc
diff --git a/chrome/browser/chromeos/login/supervised/supervised_user_authentication.cc b/chrome/browser/chromeos/login/supervised/supervised_user_authentication.cc
index 4399cbc33f173a36dd2ba34a9d2b277c8094d83b..bdb6953b248fc9980efab0dfa57af96336cb1b0c 100644
--- a/chrome/browser/chromeos/login/supervised/supervised_user_authentication.cc
+++ b/chrome/browser/chromeos/login/supervised/supervised_user_authentication.cc
@@ -10,7 +10,7 @@
#include "base/metrics/histogram_macros.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
-#include "base/threading/sequenced_worker_pool.h"
+#include "base/task_scheduler/post_task.h"
#include "chrome/browser/chromeos/login/supervised/supervised_user_constants.h"
#include "chrome/browser/chromeos/login/users/supervised_user_manager.h"
#include "chrome/browser/chromeos/profiles/profile_helper.h"
@@ -18,7 +18,6 @@
#include "chromeos/login/auth/key.h"
#include "components/user_manager/user.h"
#include "components/user_manager/user_manager.h"
-#include "content/public/browser/browser_thread.h"
#include "crypto/hmac.h"
#include "crypto/random.h"
#include "crypto/symmetric_key.h"
@@ -288,13 +287,16 @@ void SupervisedUserAuthentication::LoadPasswordUpdateData(
AccountId::FromUserEmail(user_id));
base::FilePath profile_path =
ProfileHelper::GetProfilePathByUserIdHash(user->username_hash());
- PostTaskAndReplyWithResult(
- content::BrowserThread::GetBlockingPool()
- ->GetTaskRunnerWithShutdownBehavior(
- base::SequencedWorkerPool::CONTINUE_ON_SHUTDOWN)
- .get(),
- FROM_HERE, base::Bind(&LoadPasswordData, profile_path),
- base::Bind(&OnPasswordDataLoaded, success_callback, failure_callback));
+ PostTaskWithTraitsAndReplyWithResult(
+ FROM_HERE,
+ base::TaskTraits()
+ .MayBlock()
+ .WithPriority(base::TaskPriority::BACKGROUND)
+ .WithShutdownBehavior(
+ base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN),
+ base::BindOnce(&LoadPasswordData, profile_path),
+ base::BindOnce(&OnPasswordDataLoaded, success_callback,
+ failure_callback));
}
std::string SupervisedUserAuthentication::BuildPasswordSignature(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698