| Index: chrome/browser/profiles/profile_manager.cc
|
| diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
|
| index a806af70d3029a5be74572ed8082190a21aa40b9..75644422434ef83258d4013d6d5fd201c8de7d73 100644
|
| --- a/chrome/browser/profiles/profile_manager.cc
|
| +++ b/chrome/browser/profiles/profile_manager.cc
|
| @@ -21,6 +21,7 @@
|
| #include "chrome/browser/bookmarks/bookmark_model_factory.h"
|
| #include "chrome/browser/browser_process.h"
|
| #include "chrome/browser/content_settings/host_content_settings_map.h"
|
| +#include "chrome/browser/prefs/incognito_mode_prefs.h"
|
| #include "chrome/browser/prefs/scoped_user_pref_update.h"
|
| #include "chrome/browser/profiles/bookmark_model_loaded_observer.h"
|
| #include "chrome/browser/profiles/profile_destroyer.h"
|
| @@ -272,6 +273,16 @@ Profile* ProfileManager::GetLastUsedProfile() {
|
| }
|
|
|
| // static
|
| +Profile* ProfileManager::GetLastUsedProfileAllowedByPolicy() {
|
| + Profile* profile = GetLastUsedProfile();
|
| + if (IncognitoModePrefs::GetAvailability(profile->GetPrefs()) ==
|
| + IncognitoModePrefs::FORCED) {
|
| + return profile->GetOffTheRecordProfile();
|
| + }
|
| + return profile;
|
| +}
|
| +
|
| +// static
|
| std::vector<Profile*> ProfileManager::GetLastOpenedProfiles() {
|
| ProfileManager* profile_manager = g_browser_process->profile_manager();
|
| return profile_manager->GetLastOpenedProfiles(
|
|
|