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

Unified Diff: chrome/browser/chromeos/login/users/chrome_user_manager_impl.cc

Issue 2033753002: Remove use of deprecated MessageLoop methods in chrome/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: manual change 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 | « chrome/browser/chromeos/login/user_flow.cc ('k') | chrome/browser/chromeos/login/wizard_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/users/chrome_user_manager_impl.cc
diff --git a/chrome/browser/chromeos/login/users/chrome_user_manager_impl.cc b/chrome/browser/chromeos/login/users/chrome_user_manager_impl.cc
index 4ae35adb25f22decd023a7077eada1fa79ff480b..9567cab13ef12ecf9420c9edd99b7e1b5f1b6ea3 100644
--- a/chrome/browser/chromeos/login/users/chrome_user_manager_impl.cc
+++ b/chrome/browser/chromeos/login/users/chrome_user_manager_impl.cc
@@ -16,9 +16,11 @@
#include "base/command_line.h"
#include "base/compiler_specific.h"
#include "base/format_macros.h"
+#include "base/location.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "base/metrics/histogram.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
@@ -188,7 +190,7 @@ ChromeUserManagerImpl::ChromeUserManagerImpl()
// Since we're in ctor postpone any actions till this is fully created.
if (base::MessageLoop::current()) {
- base::MessageLoop::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::Bind(&ChromeUserManagerImpl::RetrieveTrustedDevicePolicies,
weak_factory_.GetWeakPtr()));
@@ -473,11 +475,10 @@ void ChromeUserManagerImpl::Observe(
// ProfileManager::GetProfile before the profile gets registered
// in ProfileManager. It happens in case of sync profile load when
// NOTIFICATION_PROFILE_CREATED is called synchronously.
- base::MessageLoop::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::Bind(&ChromeUserManagerImpl::SwitchActiveUser,
- weak_factory_.GetWeakPtr(),
- GetPendingUserSwitchID()));
+ weak_factory_.GetWeakPtr(), GetPendingUserSwitchID()));
SetPendingUserSwitchId(EmptyAccountId());
}
break;
« no previous file with comments | « chrome/browser/chromeos/login/user_flow.cc ('k') | chrome/browser/chromeos/login/wizard_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698