Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / ash / system / user / config.cc
blob1ea6d32dc7ae6c5ff60893b08aa642f317231bdb
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ash/system/user/config.h"
7 #include "ash/session/session_state_delegate.h"
8 #include "ash/shell.h"
9 #include "ash/shell_delegate.h"
11 namespace ash {
12 namespace tray {
14 namespace {
16 // Returns true if session is blocked by e.g. the login screen.
17 bool IsUserSessionBlocked() {
18 return Shell::GetInstance()
19 ->session_state_delegate()
20 ->IsUserSessionBlocked();
23 } // namespace
25 bool IsMultiProfileSupportedAndUserActive() {
26 return Shell::GetInstance()->delegate()->IsMultiProfilesEnabled() &&
27 !IsUserSessionBlocked();
30 bool IsMultiAccountSupportedAndUserActive() {
31 return Shell::GetInstance()->delegate()->IsMultiAccountEnabled() &&
32 !IsUserSessionBlocked();
35 } // namespace tray
36 } // namespace ash