Index: chrome/browser/profiles/profile_window.cc |
diff --git a/chrome/browser/profiles/profile_window.cc b/chrome/browser/profiles/profile_window.cc |
index 3146e5acc1491d402816f342ac9789b3bb6a9072..84a36f52c008f5ad465de386ba1f7a85616b5c19 100644 |
--- a/chrome/browser/profiles/profile_window.cc |
+++ b/chrome/browser/profiles/profile_window.cc |
@@ -8,10 +8,12 @@ |
#include "base/files/file_path.h" |
#include "base/prefs/pref_service.h" |
#include "base/strings/string_number_conversions.h" |
+#include "base/strings/utf_string_conversions.h" |
#include "chrome/browser/about_flags.h" |
#include "chrome/browser/browser_process.h" |
#include "chrome/browser/pref_service_flags_storage.h" |
#include "chrome/browser/profiles/profile.h" |
+#include "chrome/browser/profiles/profile_avatar_icon_util.h" |
#include "chrome/browser/profiles/profile_manager.h" |
#include "chrome/browser/ui/browser.h" |
#include "chrome/browser/ui/browser_dialogs.h" |
@@ -223,9 +225,14 @@ void SwitchToGuestProfile(chrome::HostDesktopType desktop_type, |
void CreateAndSwitchToNewProfile(chrome::HostDesktopType desktop_type, |
ProfileSwitchingDoneCallback callback, |
ProfileMetrics::ProfileAdd metric) { |
+ ProfileInfoCache& cache = |
+ g_browser_process->profile_manager()->GetProfileInfoCache(); |
+ |
+ int placeholder_avatar_index = profiles::GetPlaceholderAvatarIndex(); |
ProfileManager::CreateMultiProfileAsync( |
- base::string16(), |
- base::string16(), |
+ cache.ChooseNameForNewProfile(placeholder_avatar_index), |
+ base::UTF8ToUTF16(profiles::GetDefaultAvatarIconUrl( |
+ placeholder_avatar_index)), |
base::Bind(&OpenBrowserWindowForProfile, |
callback, |
true, |