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

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: Respond to comments, copy base/test/* from CL 2061593002 again. 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
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());

Powered by Google App Engine
This is Rietveld 408576698