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

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

Issue 1165323004: We should use UserID object to identify users instead of username. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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: chrome/browser/chromeos/login/users/fake_chrome_user_manager.cc
diff --git a/chrome/browser/chromeos/login/users/fake_chrome_user_manager.cc b/chrome/browser/chromeos/login/users/fake_chrome_user_manager.cc
index 299058ba1812ff09fa0f0b401ce70bd6a5a3d5d9..3cf877b8fa36d7575eb36989323dd2299a118fea 100644
--- a/chrome/browser/chromeos/login/users/fake_chrome_user_manager.cc
+++ b/chrome/browser/chromeos/login/users/fake_chrome_user_manager.cc
@@ -111,25 +111,25 @@ void FakeChromeUserManager::ResetUserFlow(const std::string& email) {
}
}
-void FakeChromeUserManager::SwitchActiveUser(const std::string& email) {
- active_user_id_ = email;
+void FakeChromeUserManager::SwitchActiveUser(const UserID& user_id /*email*/) {
Denis Kuznetsov (DE-MUC) 2015/06/10 16:50:45 drop commented part
+ active_user_id_ = user_id;
ProfileHelper::Get()->ActiveUserHashChanged(
- ProfileHelper::GetUserIdHashByUserIdForTesting(email));
+ ProfileHelper::GetUserIdHashByUserIdForTesting(user_id.GetUserEmail()));
if (!users_.empty() && !active_user_id_.empty()) {
for (user_manager::User* user : users_)
- user->set_is_active(user->email() == active_user_id_);
+ user->set_is_active(user->user_id() == active_user_id_);
}
}
-const std::string& FakeChromeUserManager::GetOwnerEmail() const {
- return owner_email_;
+const user_manager::UserID& FakeChromeUserManager::GetOwnerID() const {
+ return owner_id_;
}
void FakeChromeUserManager::SessionStarted() {
}
void FakeChromeUserManager::RemoveUser(
- const std::string& email,
+ const UserID& user_id,
user_manager::RemoveUserDelegate* delegate) {
}

Powered by Google App Engine
This is Rietveld 408576698