From 6b30e882803f34879eaf0b17f7d15bb8b3cfddb1 Mon Sep 17 00:00:00 2001 From: mlerman Date: Tue, 9 Sep 2014 06:10:49 -0700 Subject: Never open guest pre-NewAvatarMenu BUG=410228 Review URL: https://codereview.chromium.org/547663002 Cr-Commit-Position: refs/heads/master@{#293929} --- chrome/browser/chrome_browser_main.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'chrome/browser/chrome_browser_main.cc') diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc index 14ab8a4..ea7aea6 100644 --- a/chrome/browser/chrome_browser_main.cc +++ b/chrome/browser/chrome_browser_main.cc @@ -344,6 +344,13 @@ Profile* CreatePrimaryProfile(const content::MainFunctionParams& parameters, #else base::FilePath profile_path = GetStartupProfilePath(user_data_dir, parsed_command_line); + + // Without NewAvatarMenu, replace guest with any existing profile. + if (!switches::IsNewAvatarMenu() && + profile_path == ProfileManager::GetGuestProfilePath()) { + profile_path = g_browser_process->profile_manager()->GetProfileInfoCache(). + GetPathOfProfileAtIndex(0); + } profile = g_browser_process->profile_manager()->GetProfile( profile_path); -- cgit v1.1