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

Unified Diff: chrome/browser/profiles/profiles_state.cc

Issue 2616423002: Added IsPublicSession utility function to profiles_state (Closed)
Patch Set: Moved to profiles_state Created 3 years, 11 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 | « chrome/browser/profiles/profiles_state.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profiles_state.cc
diff --git a/chrome/browser/profiles/profiles_state.cc b/chrome/browser/profiles/profiles_state.cc
index 268c5dfd1e58ed89c7d660ffc8dd45e4f23cba87..005c922adf028df6b252cb0a7e880f8e8b5a3d5d 100644
--- a/chrome/browser/profiles/profiles_state.cc
+++ b/chrome/browser/profiles/profiles_state.cc
@@ -34,6 +34,10 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/text_elider.h"
+#if defined(OS_CHROMEOS)
+#include "chromeos/login/login_state.h"
+#endif
+
namespace profiles {
bool IsMultipleProfilesEnabled() {
@@ -279,4 +283,13 @@ bool AreAllNonChildNonSupervisedProfilesLocked() {
return at_least_one_regular_profile_present;
}
+bool IsPublicSession() {
+#if defined(OS_CHROMEOS)
+ if (chromeos::LoginState::IsInitialized()) {
+ return chromeos::LoginState::Get()->IsPublicSessionUser();
+ }
+#endif
+ return false;
+}
+
} // namespace profiles
« no previous file with comments | « chrome/browser/profiles/profiles_state.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698