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

Unified Diff: chrome/browser/profiles/profile_manager.cc

Issue 171523004: Stop using the old-style profile names when using --new-profile-management (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moved new tests behind no-android/no-cros ifdef Created 6 years, 10 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
« no previous file with comments | « chrome/browser/profiles/profile_info_cache.cc ('k') | chrome/browser/profiles/profile_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_manager.cc
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
index f14f5ca8714e6609cc79cbc4bb0dc1d05d89f136..f60ced7f095ae533043748ec68448019f21fb309 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -721,7 +721,10 @@ void ProfileManager::InitProfileUserPrefs(Profile* profile) {
} else if (profile->GetPath() ==
profiles::GetDefaultProfileDir(cache.GetUserDataDir())) {
avatar_index = 0;
- profile_name = l10n_util::GetStringUTF8(IDS_DEFAULT_PROFILE_NAME);
+ // The --new-profile-management flag no longer uses the "First User" name.
+ profile_name = switches::IsNewProfileManagement() ?
+ base::UTF16ToUTF8(cache.ChooseNameForNewProfile(avatar_index)) :
+ l10n_util::GetStringUTF8(IDS_DEFAULT_PROFILE_NAME);
} else {
avatar_index = cache.ChooseAvatarIconIndexForNewProfile();
profile_name =
« no previous file with comments | « chrome/browser/profiles/profile_info_cache.cc ('k') | chrome/browser/profiles/profile_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698