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..1353c66bf917b4899e6dea3f27e81acdea7e039b 100644 |
--- a/chrome/browser/profiles/profiles_state.cc |
+++ b/chrome/browser/profiles/profiles_state.cc |
@@ -215,9 +215,10 @@ bool SetActiveProfileToGuestIfLocked() { |
bool has_entry = |
g_browser_process->profile_manager()->GetProfileAttributesStorage(). |
GetProfileAttributesWithPath(active_profile_path, &entry); |
- DCHECK(has_entry); |
- if (!entry->IsSigninRequired()) |
+ // |has_entry| is possible to be false if a profile is specified in the |
+ // --profile-directory switch. |
Peter Kasting
2016/07/01 00:53:23
Nit: "|has_entry| may be false when the user speci
WC Leung
2016/07/07 17:01:53
Done.
|
+ if (has_entry && !entry->IsSigninRequired()) |
return false; |
SetLastUsedProfile(guest_path.BaseName().MaybeAsASCII()); |