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

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

Issue 2021253002: Skip profiles in GetLastOpenedProfiles that fail to initialize (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/profile_manager.cc
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
index 93a514c661c5c7ff8c884352d77100a423ca809f..871ed9daab73ae9bd4913531ca2221e6bc841e4b 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -622,7 +622,9 @@ std::vector<Profile*> ProfileManager::GetLastOpenedProfiles(
LOG(WARNING) << "Invalid entry in " << prefs::kProfilesLastActive;
continue;
}
- to_return.push_back(GetProfile(user_data_dir.AppendASCII(profile)));
+ Profile* profile = GetProfile(user_data_dir.AppendASCII(profile));
+ if (profile)
+ to_return.push_back(profile);
}
}
return to_return;

Powered by Google App Engine
This is Rietveld 408576698