| Index: chrome/browser/profiles/profile_manager.cc
|
| diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
|
| index 60eeafb6d7a743f2a621e20906fb0ebbf00e0d40..68f1a1c4e83ff7a87fd324f7ffb238405f255b15 100644
|
| --- a/chrome/browser/profiles/profile_manager.cc
|
| +++ b/chrome/browser/profiles/profile_manager.cc
|
| @@ -614,14 +614,18 @@ std::vector<Profile*> ProfileManager::GetLastOpenedProfiles(
|
| std::unique_ptr<base::ListValue> profile_list(
|
| local_state->GetList(prefs::kProfilesLastActive)->DeepCopy());
|
| base::ListValue::const_iterator it;
|
| - std::string profile;
|
| for (it = profile_list->begin(); it != profile_list->end(); ++it) {
|
| - if (!(*it)->GetAsString(&profile) || profile.empty() ||
|
| - profile == base::FilePath(chrome::kSystemProfileDir).AsUTF8Unsafe()) {
|
| + std::string profile_path;
|
| + if (!(*it)->GetAsString(&profile_path) ||
|
| + profile_path.empty() ||
|
| + profile_path ==
|
| + base::FilePath(chrome::kSystemProfileDir).AsUTF8Unsafe()) {
|
| 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_path));
|
| + if (profile)
|
| + to_return.push_back(profile);
|
| }
|
| }
|
| return to_return;
|
| @@ -1334,7 +1338,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);
|
| DCHECK(result);
|
|
|