| Index: chrome/browser/profiles/profile_manager.cc
|
| diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
|
| index 686e3025bf084cab2548364a9e2071f5b20296e1..2992720711a8b9b6562efd128966109856a1817f 100644
|
| --- a/chrome/browser/profiles/profile_manager.cc
|
| +++ b/chrome/browser/profiles/profile_manager.cc
|
| @@ -650,8 +650,11 @@ void ProfileManager::ScheduleProfileForDeletion(
|
| PrefService* local_state = g_browser_process->local_state();
|
| ProfileInfoCache& cache = GetProfileInfoCache();
|
|
|
| - if (profile_dir.BaseName().MaybeAsASCII() ==
|
| - local_state->GetString(prefs::kProfileLastUsed)) {
|
| + const std::string last_used_profile =
|
| + local_state->GetString(prefs::kProfileLastUsed);
|
| +
|
| + if (last_used_profile == profile_dir.BaseName().MaybeAsASCII() ||
|
| + last_used_profile == GetGuestProfilePath().BaseName().MaybeAsASCII()) {
|
| // Update the last used profile pref before closing browser windows. This
|
| // way the correct last used profile is set for any notification observers.
|
| base::FilePath last_non_supervised_profile_path;
|
|
|