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

Unified Diff: components/ownership/owner_settings_service.cc

Issue 2037843002: Remove use of deprecated MessageLoop methods in components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change precache Created 4 years, 6 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
Index: components/ownership/owner_settings_service.cc
diff --git a/components/ownership/owner_settings_service.cc b/components/ownership/owner_settings_service.cc
index e760cb5a87d79eae5417a2e2490201d8e899b446..93956dc06874cf6b4b262773838952815c7a1774 100644
--- a/components/ownership/owner_settings_service.cc
+++ b/components/ownership/owner_settings_service.cc
@@ -12,9 +12,10 @@
#include "base/callback.h"
#include "base/location.h"
#include "base/logging.h"
-#include "base/message_loop/message_loop.h"
+#include "base/single_thread_task_runner.h"
#include "base/task_runner.h"
#include "base/task_runner_util.h"
+#include "base/threading/thread_task_runner_handle.h"
#include "base/values.h"
#include "components/ownership/owner_key_util.h"
#include "crypto/scoped_nss_types.h"
@@ -93,8 +94,8 @@ bool OwnerSettingsService::IsOwner() {
void OwnerSettingsService::IsOwnerAsync(const IsOwnerCallback& callback) {
DCHECK(thread_checker_.CalledOnValidThread());
if (private_key_.get()) {
- base::MessageLoop::current()->PostTask(FROM_HERE,
- base::Bind(callback, IsOwner()));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(callback, IsOwner()));
} else {
pending_is_owner_callbacks_.push_back(callback);
}
« no previous file with comments | « components/mus/public/cpp/tests/window_server_test_base.cc ('k') | components/pairing/fake_controller_pairing_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698