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

Unified Diff: chrome/browser/chromeos/profiles/profile_list_chromeos_unittest.cc

Issue 1425093004: Revert of 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: Created 5 years, 2 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/profiles/profile_list_chromeos_unittest.cc
diff --git a/chrome/browser/chromeos/profiles/profile_list_chromeos_unittest.cc b/chrome/browser/chromeos/profiles/profile_list_chromeos_unittest.cc
index c5c751ae7cf721ba0256da049efbd71c9c3232b8..200eb1e5ce45236c59463d630d2fc3251df6a0e9 100644
--- a/chrome/browser/chromeos/profiles/profile_list_chromeos_unittest.cc
+++ b/chrome/browser/chromeos/profiles/profile_list_chromeos_unittest.cc
@@ -72,15 +72,14 @@
void AddProfile(base::string16 name, bool log_in) {
std::string email_string = base::UTF16ToASCII(name) + "@example.com";
- const AccountId account_id(AccountId::FromUserEmail(email_string));
// Add a user to the fake user manager.
- GetFakeChromeUserManager()->AddUser(account_id);
+ GetFakeChromeUserManager()->AddUser(email_string);
if (log_in)
- GetFakeChromeUserManager()->LoginUser(account_id);
+ GetFakeChromeUserManager()->LoginUser(email_string);
// Create a profile for the user.
- manager()->CreateTestingProfile(account_id.GetUserEmail());
+ manager()->CreateTestingProfile(email_string);
}
AvatarMenu* GetAvatarMenu() {
@@ -100,8 +99,7 @@
void ActiveUserChanged(const base::string16& name) {
std::string email_string = base::UTF16ToASCII(name) + "@example.com";
- const AccountId account_id(AccountId::FromUserEmail(email_string));
- GetFakeChromeUserManager()->SwitchActiveUser(account_id);
+ GetFakeChromeUserManager()->SwitchActiveUser(email_string);
}
TestingProfileManager* manager() { return &manager_; }
@@ -169,8 +167,7 @@
cache->GetUserDataDir().AppendASCII("p2"), supervised_name, std::string(),
base::string16(), 0, "TEST_ID");
- GetFakeChromeUserManager()->AddUser(
- AccountId::FromUserEmail(base::UTF16ToASCII(supervised_name)));
+ GetFakeChromeUserManager()->AddUser(base::UTF16ToASCII(supervised_name));
AvatarMenu* menu = GetAvatarMenu();
ASSERT_EQ(1U, menu->GetNumberOfItems());
@@ -246,8 +243,7 @@
// Change name of the first profile, to trigger resorting of the profiles:
// now the first menu item should be named "beta", and the second be "gamma".
GetFakeChromeUserManager()->SaveUserDisplayName(
- AccountId::FromUserEmail(base::UTF16ToASCII(name1) + "@example.com"),
- newname1);
+ base::UTF16ToASCII(name1) + "@example.com", newname1);
manager()->profile_info_cache()->SetNameOfProfileAtIndex(0, newname1);
EXPECT_EQ(1, change_count());

Powered by Google App Engine
This is Rietveld 408576698