Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6472)

Unified Diff: chrome/browser/profiles/profile_manager.h

Issue 16072014: Don't open the 'stats for nerds' in a non-incognito window when incognito is forced. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: renamed getter, left a comment at GetLastUsedProfile Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698