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

Unified Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc

Issue 442043002: ProfileManager doesn't depend on "--login-profile" switch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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/ui/ash/launcher/chrome_launcher_controller_unittest.cc
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc
index 7f94b7b8f7d31d4c11213f55542754c869c78713..6228be117466cee774567462984f6b9c3d5cb2c5 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc
@@ -80,9 +80,6 @@ const char* gmail_url = "https://mail.google.com/mail/u";
const char* kGmailLaunchURL = "https://mail.google.com/mail/ca";
#if defined(OS_CHROMEOS)
-// As defined in /chromeos/dbus/cryptohome_client.cc.
-const char kUserIdHashSuffix[] = "-hash";
-
// An extension prefix.
const char kCrxAppPrefix[] = "_crx_";
#endif
@@ -827,22 +824,14 @@ class MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerTest
session_delegate()->AddUser(email_string);
GetFakeUserManager()->AddUser(email_string);
- GetFakeUserManager()->UserLoggedIn(
- email_string,
- email_string + kUserIdHashSuffix,
- false);
-
- std::string profile_name =
- chrome::kProfileDirPrefix + email_string + kUserIdHashSuffix;
- TestingProfile* profile = profile_manager()->CreateTestingProfile(
- profile_name,
- scoped_ptr<PrefServiceSyncable>(),
- ASCIIToUTF16(email_string), 0, std::string(),
- TestingProfile::TestingFactories());
- profile->set_profile_name(email_string);
+ GetFakeUserManager()->LoginUser(email_string);
+
+ TestingProfile* profile =
+ profile_manager()->CreateTestingProfile(email_string);
EXPECT_TRUE(profile);
+
// Remember the profile name so that we can destroy it upon destruction.
- created_profiles_[profile] = profile_name;
+ created_profiles_[profile] = email_string;
if (chrome::MultiUserWindowManager::GetInstance())
chrome::MultiUserWindowManager::GetInstance()->AddUser(profile);
if (launcher_controller_)

Powered by Google App Engine
This is Rietveld 408576698