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

Unified Diff: chrome/browser/chromeos/login/login_manager_test.cc

Issue 1412813003: This CL replaces user_manager::UserID with AccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@468875--Chrome-OS-handles-deletion-of-Gmail-account-poorly--Create-AccountID-structure-part2--user_names
Patch Set: Fix Win GN build. 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 | « chrome/browser/chromeos/login/login_browsertest.cc ('k') | chrome/browser/chromeos/login/reauth_stats.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/login_manager_test.cc
diff --git a/chrome/browser/chromeos/login/login_manager_test.cc b/chrome/browser/chromeos/login/login_manager_test.cc
index d2430746a00b38003e6b0a3e0a04e220eb77469f..5266a31674707ca945042e2d948b0a455cbf7b67 100644
--- a/chrome/browser/chromeos/login/login_manager_test.cc
+++ b/chrome/browser/chromeos/login/login_manager_test.cc
@@ -48,7 +48,8 @@ const char kTestUserinfoToken2[] = "fake-userinfo-token-2";
const char kTestRefreshToken2[] = "fake-refresh-token-2";
UserContext CreateUserContext(const std::string& user_id) {
- UserContext user_context(user_id);
+ UserContext user_context(AccountId::FromUserEmailGaiaId(
+ user_id, LoginManagerTest::GetGaiaIDForUserID(user_id)));
user_context.SetGaiaID(LoginManagerTest::GetGaiaIDForUserID(user_id));
user_context.SetKey(Key("password"));
if (user_id == LoginManagerTest::kEnterpriseUser1) {
@@ -168,7 +169,7 @@ bool LoginManagerTest::TryToLogin(const UserContext& user_context) {
return false;
if (const user_manager::User* active_user =
user_manager::UserManager::Get()->GetActiveUser())
- return active_user->email() == user_context.GetUserID();
+ return active_user->GetAccountId() == user_context.GetAccountId();
return false;
}
@@ -189,7 +190,7 @@ bool LoginManagerTest::AddUserToSession(const UserContext& user_context) {
for (user_manager::UserList::const_iterator it = logged_users.begin();
it != logged_users.end();
++it) {
- if ((*it)->email() == user_context.GetUserID())
+ if ((*it)->GetAccountId() == user_context.GetAccountId())
return true;
}
return false;
« no previous file with comments | « chrome/browser/chromeos/login/login_browsertest.cc ('k') | chrome/browser/chromeos/login/reauth_stats.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698