| Index: chrome/browser/profiles/avatar_menu_model.cc
|
| diff --git a/chrome/browser/profiles/avatar_menu_model.cc b/chrome/browser/profiles/avatar_menu_model.cc
|
| index a7e535b10b11e4c6650b95cda46de75b90471dab..90828bdc686d1c7927435849d48e8b21a54689a9 100644
|
| --- a/chrome/browser/profiles/avatar_menu_model.cc
|
| +++ b/chrome/browser/profiles/avatar_menu_model.cc
|
| @@ -44,22 +44,6 @@ using content::BrowserThread;
|
|
|
| namespace {
|
|
|
| -void OnProfileCreated(bool always_create,
|
| - chrome::HostDesktopType desktop_type,
|
| - Profile* profile,
|
| - Profile::CreateStatus status) {
|
| - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| -
|
| - if (status == Profile::CREATE_STATUS_INITIALIZED) {
|
| - ProfileManager::FindOrCreateNewWindowForProfile(
|
| - profile,
|
| - chrome::startup::IS_NOT_PROCESS_STARTUP,
|
| - chrome::startup::IS_NOT_FIRST_RUN,
|
| - desktop_type,
|
| - always_create);
|
| - }
|
| -}
|
| -
|
| // Constants for the show profile switcher experiment
|
| const char kShowProfileSwitcherFieldTrialName[] = "ShowProfileSwitcher";
|
| const char kAlwaysShowSwitcherGroupName[] = "AlwaysShow";
|
| @@ -150,15 +134,7 @@ void AvatarMenuModel::SwitchToProfile(size_t index, bool always_create) {
|
| if (browser_)
|
| desktop_type = browser_->host_desktop_type();
|
|
|
| - g_browser_process->profile_manager()->CreateProfileAsync(
|
| - path,
|
| - base::Bind(&OnProfileCreated,
|
| - always_create,
|
| - desktop_type),
|
| - string16(),
|
| - string16(),
|
| - false);
|
| -
|
| + ProfileManager::SwitchToProfile(path, desktop_type, always_create);
|
| ProfileMetrics::LogProfileSwitchUser(ProfileMetrics::SWITCH_PROFILE_ICON);
|
| }
|
|
|
|
|