Chromium Code Reviews| 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..dfe1b645bd5b0340faaed56bdbbbe2382b8a850f 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; |
| @@ -1338,7 +1340,6 @@ Profile* ProfileManager::CreateAndInitializeProfile( |
| // which would make Bad Things happen if we returned it. |
| CHECK(!GetProfileByPathInternal(profile_dir)); |
| Profile* profile = CreateProfileHelper(profile_dir); |
| - DCHECK(profile); |
| if (profile) { |
| bool result = AddProfile(profile); |
|
Peter Kasting
2016/05/31 19:12:30
Nit: You don't need to do this in this change, but
WC Leung
2016/06/01 18:56:55
You're right. Anyway the code here is having an ag
|
| DCHECK(result); |