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

Unified Diff: ash/system/user/config.cc

Issue 210903003: Implemented system tray UI for new account management. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge conflicts resolved. Created 6 years, 8 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 | « ash/system/user/config.h ('k') | ash/system/user/rounded_image_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/user/config.cc
diff --git a/ash/system/user/config.cc b/ash/system/user/config.cc
new file mode 100644
index 0000000000000000000000000000000000000000..d704393e328d9f7c3cc57c85dad859ac9ace4c4d
--- /dev/null
+++ b/ash/system/user/config.cc
@@ -0,0 +1,36 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ash/system/user/config.h"
+
+#include "ash/session_state_delegate.h"
+#include "ash/shell.h"
+#include "ash/shell_delegate.h"
+
+namespace ash {
+namespace tray {
+
+namespace {
+
+// Returns true if session is blocked by e.g. the login screen.
+bool IsUserSessionBlocked() {
+ return Shell::GetInstance()
+ ->session_state_delegate()
+ ->IsUserSessionBlocked();
+}
+
+} // namespace
+
+bool IsMultiProfileSupportedAndUserActive() {
+ return Shell::GetInstance()->delegate()->IsMultiProfilesEnabled() &&
+ !IsUserSessionBlocked();
+}
+
+bool IsMultiAccountSupportedAndUserActive() {
+ return Shell::GetInstance()->delegate()->IsMultiAccountEnabled() &&
+ !IsUserSessionBlocked();
+}
+
+} // namespace tray
+} // namespace ash
« no previous file with comments | « ash/system/user/config.h ('k') | ash/system/user/rounded_image_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698