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

Unified Diff: crypto/nss_util.cc

Issue 2033193002: Remove use of deprecated MessageLoop methods in crypto. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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: crypto/nss_util.cc
diff --git a/crypto/nss_util.cc b/crypto/nss_util.cc
index 359f78fb87a89b172245fb6f127344547efb5dc0..08c3137a8c1803537009d83f4fffd882488a2e6d 100644
--- a/crypto/nss_util.cc
+++ b/crypto/nss_util.cc
@@ -15,6 +15,9 @@
#include <memory>
#include <utility>
+#include "base/location.h"
+#include "base/single_thread_task_runner.h"
+#include "base/threading/thread_task_runner_handle.h"
#include "crypto/nss_util_internal.h"
#if defined(OS_OPENBSD)
@@ -39,7 +42,6 @@
#include "base/files/file_util.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
-#include "base/message_loop/message_loop.h"
#include "base/native_library.h"
#include "base/path_service.h"
#include "base/stl_util.h"
@@ -357,8 +359,8 @@ class NSSInitSingleton {
DCHECK(!initializing_tpm_token_);
// If EnableTPMTokenForNSS hasn't been called, return false.
if (!tpm_token_enabled_for_nss_) {
- base::MessageLoop::current()->PostTask(FROM_HERE,
- base::Bind(callback, false));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(callback, false));
return;
}
@@ -366,8 +368,8 @@ class NSSInitSingleton {
// Note that only |tpm_slot_| is checked, since |chaps_module_| could be
// NULL in tests while |tpm_slot_| has been set to the test DB.
if (tpm_slot_) {
- base::MessageLoop::current()->PostTask(FROM_HERE,
- base::Bind(callback, true));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE,
+ base::Bind(callback, true));
return;
}
@@ -389,8 +391,8 @@ class NSSInitSingleton {
)) {
initializing_tpm_token_ = true;
} else {
- base::MessageLoop::current()->PostTask(FROM_HERE,
- base::Bind(callback, false));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(callback, false));
}
}
@@ -598,7 +600,7 @@ class NSSInitSingleton {
if (username_hash.empty()) {
DVLOG(2) << "empty username_hash";
if (!callback.is_null()) {
- base::MessageLoop::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::Bind(callback, base::Passed(ScopedPK11Slot())));
}
return ScopedPK11Slot();
« 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