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

Unified Diff: chrome/browser/password_manager/password_manager_util_win.cc

Issue 2527123004: Use TaskScheduler instead of WorkerPool in password_manager_util_win.cc. (Closed)
Patch Set: add withwait() Created 4 years 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/password_manager/password_manager_util_win.cc
diff --git a/chrome/browser/password_manager/password_manager_util_win.cc b/chrome/browser/password_manager/password_manager_util_win.cc
index af02107ae1277968ffbb3c00d8117e792e3fc6af..7071a4f4db1c9c53f73c48086ec8b3364091d09b 100644
--- a/chrome/browser/password_manager/password_manager_util_win.cc
+++ b/chrome/browser/password_manager/password_manager_util_win.cc
@@ -23,7 +23,7 @@
#include "base/bind_helpers.h"
#include "base/metrics/histogram_macros.h"
#include "base/strings/utf_string_conversions.h"
-#include "base/threading/worker_pool.h"
+#include "base/task_scheduler/post_task.h"
#include "base/time/time.h"
#include "base/win/windows_version.h"
#include "chrome/browser/browser_process.h"
@@ -207,16 +207,13 @@ void GetOsPasswordStatus() {
new OsPasswordStatus(PASSWORD_STATUS_UNKNOWN));
PasswordCheckPrefs* prefs_weak = prefs.get();
OsPasswordStatus* status_weak = status.get();
- bool posted = base::WorkerPool::PostTaskAndReply(
- FROM_HERE,
+ base::PostTaskWithTraitsAndReply(
+ FROM_HERE, base::TaskTraits()
+ .WithPriority(base::TaskPriority::BACKGROUND)
+ .WithWait(),
base::Bind(&GetOsPasswordStatusInternal, prefs_weak, status_weak),
base::Bind(&ReplyOsPasswordStatus, base::Passed(&prefs),
- base::Passed(&status)),
- true);
- if (!posted) {
- UMA_HISTOGRAM_ENUMERATION("PasswordManager.OsPasswordStatus",
- PASSWORD_STATUS_UNKNOWN, MAX_PASSWORD_STATUS);
- }
+ base::Passed(&status)));
}
} // namespace
« 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