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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 547663002: Never open guest pre-NewAvatarMenu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update comment Created 6 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index 68ca846aac6ff574c20619110c15c973aa39e224..d167fcd9b2f3af4ce95b896f5a34d51103e872ca 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -342,6 +342,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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698