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

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

Issue 16104008: First try at a user management screen for the desktop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase and review comments Created 7 years, 6 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/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);
}

Powered by Google App Engine
This is Rietveld 408576698