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

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: Rebased. 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
« no previous file with comments | « components/user_manager/remove_user_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cdfcb72212d9420b666af4646ad0bee7969a23a8..bdeb43857cdb2fef8cd57478ece2778186e3d51f 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) {
« no previous file with comments | « components/user_manager/remove_user_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698