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

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: clean up JS code 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 8587b3962f5c802b8a7080e4f814c55717a5aaa9..4d6d4ff679443753caf9e7225a6afeba151a9295 100644
--- a/chrome/browser/profiles/avatar_menu_model.cc
+++ b/chrome/browser/profiles/avatar_menu_model.cc
@@ -40,22 +40,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";
@@ -146,15 +130,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