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

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

Issue 2047483003: Add fallback behavior if the last used profile cannot initialize (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bug-614753-fix
Patch Set: Fix a mistake in a comment. (Didn't check Atom reflow output, sorry :-( ) Created 4 years, 5 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 | « chrome/browser/profiles/profiles_state.h ('k') | chrome/browser/ui/profile_error_dialog.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profiles_state.cc
diff --git a/chrome/browser/profiles/profiles_state.cc b/chrome/browser/profiles/profiles_state.cc
index e3acad3245bcec2402530d7f62da5aba6b7dbbf0..3cfa03ca464408ba6dd74ad84cc9d0210f1580ad 100644
--- a/chrome/browser/profiles/profiles_state.cc
+++ b/chrome/browser/profiles/profiles_state.cc
@@ -215,9 +215,9 @@ bool SetActiveProfileToGuestIfLocked() {
bool has_entry =
g_browser_process->profile_manager()->GetProfileAttributesStorage().
GetProfileAttributesWithPath(active_profile_path, &entry);
- DCHECK(has_entry);
- if (!entry->IsSigninRequired())
+ // |has_entry| may be false if a profile is specified on the command line.
+ if (has_entry && !entry->IsSigninRequired())
return false;
SetLastUsedProfile(guest_path.BaseName().MaybeAsASCII());
« no previous file with comments | « chrome/browser/profiles/profiles_state.h ('k') | chrome/browser/ui/profile_error_dialog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698