Index: chrome/browser/profiles/profile_manager.h |
diff --git a/chrome/browser/profiles/profile_manager.h b/chrome/browser/profiles/profile_manager.h |
index ef2b0a2685cd98fb628245e3d1a0943c5620eee8..1c18983a4b7fba8e5051bbd03c941d59c62517cd 100644 |
--- a/chrome/browser/profiles/profile_manager.h |
+++ b/chrome/browser/profiles/profile_manager.h |
@@ -109,8 +109,15 @@ class ProfileManager : public base::NonThreadSafe, |
Profile* GetLastUsedProfile(const base::FilePath& user_data_dir); |
// Same as instance method but provides the default user_data_dir as well. |
+ // If the Profile is going to be used to open a new window then consider using |
+ // GetLastUsedProfileAllowedByPolicy() instead. |
static Profile* GetLastUsedProfile(); |
+ // Same as GetLastUsedProfile() but returns the incognito Profile if |
+ // incognito mode is forced. This should be used if the last used Profile |
+ // will be used to open new browser windows. |
+ static Profile* GetLastUsedProfileAllowedByPolicy(); |
+ |
// Get the path of the last used profile, or if that's undefined, the default |
// profile. |
base::FilePath GetLastUsedProfileDir(const base::FilePath& user_data_dir); |