| Index: chrome/browser/profiles/profile_manager.cc
|
| diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
|
| index 9a0ed359e027b479444f1de4e679df58d4132974..9d4f882604b9870bf97427240334de621b0b5ebe 100644
|
| --- a/chrome/browser/profiles/profile_manager.cc
|
| +++ b/chrome/browser/profiles/profile_manager.cc
|
| @@ -354,16 +354,20 @@ Profile* ProfileManager::GetLastUsedProfile() {
|
| // static
|
| Profile* ProfileManager::GetLastUsedProfileAllowedByPolicy() {
|
| Profile* profile = GetLastUsedProfile();
|
| - if (profile->IsGuestSession() ||
|
| - profile->IsSystemProfile() ||
|
| - IncognitoModePrefs::GetAvailability(profile->GetPrefs()) ==
|
| - IncognitoModePrefs::FORCED) {
|
| + if (IncognitoModeForced(profile))
|
| return profile->GetOffTheRecordProfile();
|
| - }
|
| return profile;
|
| }
|
|
|
| // static
|
| +bool ProfileManager::IncognitoModeForced(Profile* profile) {
|
| + return profile->IsGuestSession() ||
|
| + profile->IsSystemProfile() ||
|
| + IncognitoModePrefs::GetAvailability(profile->GetPrefs()) ==
|
| + IncognitoModePrefs::FORCED;
|
| +}
|
| +
|
| +// static
|
| std::vector<Profile*> ProfileManager::GetLastOpenedProfiles() {
|
| ProfileManager* profile_manager = g_browser_process->profile_manager();
|
| return profile_manager->GetLastOpenedProfiles(
|
|
|