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

Unified Diff: components/user_manager/user_manager_base.cc

Issue 1470633002: ChromeOS: Fix removeUser button on signin screen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@462823--Chrome-OS-handles-deletion-of-Gmail-account-poorly--Fix-GetKnownUserAccountId
Patch Set: Removed debug message. Created 5 years, 1 month 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/user_manager/user_manager_base.cc
diff --git a/components/user_manager/user_manager_base.cc b/components/user_manager/user_manager_base.cc
index e992f1fff83b7d11eb2fb957f0b97e3c223b098b..41dadfab47b6b4fd9995a0a9d696fcfd02fb9e45 100644
--- a/components/user_manager/user_manager_base.cc
+++ b/components/user_manager/user_manager_base.cc
@@ -99,12 +99,12 @@ const char kReauthReasonKey[] = "reauth_reason";
const int kLogoutToLoginDelayMaxSec = 1800;
// Callback that is called after user removal is complete.
-void OnRemoveUserComplete(const std::string& user_email,
+void OnRemoveUserComplete(const AccountId& account_id,
bool success,
cryptohome::MountError return_code) {
// Log the error, but there's not much we can do.
if (!success) {
- LOG(ERROR) << "Removal of cryptohome for " << user_email
+ LOG(ERROR) << "Removal of cryptohome for " << account_id.Serialize()
<< " failed, return code: " << return_code;
}
}
@@ -353,14 +353,13 @@ void UserManagerBase::RemoveUserInternal(const AccountId& account_id,
void UserManagerBase::RemoveNonOwnerUserInternal(const AccountId& account_id,
RemoveUserDelegate* delegate) {
if (delegate)
- delegate->OnBeforeUserRemoved(account_id.GetUserEmail());
+ delegate->OnBeforeUserRemoved(account_id);
RemoveUserFromList(account_id);
cryptohome::AsyncMethodCaller::GetInstance()->AsyncRemove(
- account_id.GetUserEmail(),
- base::Bind(&OnRemoveUserComplete, account_id.GetUserEmail()));
+ account_id.GetUserEmail(), base::Bind(&OnRemoveUserComplete, account_id));
if (delegate)
- delegate->OnUserRemoved(account_id.GetUserEmail());
+ delegate->OnUserRemoved(account_id);
}
void UserManagerBase::RemoveUserFromList(const AccountId& account_id) {

Powered by Google App Engine
This is Rietveld 408576698