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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 1021613002: Fail gracefully if the active profile can't be found in the ProfileInfoCache (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 1d362a634301b4178ce2a3d3f6b57a56dcf1a639..fb5034032e2085bdb551bd929c5420f4eb78b692 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -374,9 +374,11 @@ Profile* CreatePrimaryProfile(const content::MainFunctionParams& parameters,
g_browser_process->profile_manager()->GetProfileInfoCache();
size_t profile_index = cache.GetIndexOfProfileWithPath(profile_path);
- if (cache.ProfileIsSigninRequiredAtIndex(profile_index))
+ if (profile_index != std::string::npos &&
+ cache.ProfileIsSigninRequiredAtIndex(profile_index)) {
profile = g_browser_process->profile_manager()->GetProfile(
ProfileManager::GetGuestProfilePath());
+ }
}
#endif // defined(OS_CHROMEOS) || defined(OS_ANDROID)
if (profile) {
« 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