blob: 39f9f159012a84d4800d090c3060f7d6b7f10655 [file] [log] [blame]
Nicolas Ouellet-payeur82eb65b2018-11-05 16:49:271// Copyright 2018 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.
4
5#include "chrome/browser/ui/managed_ui.h"
6
7#include "base/feature_list.h"
8#include "chrome/browser/browser_process.h"
9#include "chrome/browser/browser_process_platform_part.h"
10#include "chrome/browser/policy/chrome_browser_policy_connector.h"
11#include "chrome/browser/policy/profile_policy_connector.h"
12#include "chrome/browser/policy/profile_policy_connector_factory.h"
13#include "chrome/browser/profiles/profile.h"
14#include "chrome/common/chrome_features.h"
15
16#if defined(OS_CHROMEOS)
Nicolas Ouellet-payeur81bdcc52019-01-24 21:20:4217#include "chrome/browser/chromeos/login/demo_mode/demo_session.h"
Nicolas Ouellet-payeur82eb65b2018-11-05 16:49:2718#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
19#include "chrome/browser/chromeos/profiles/profile_helper.h"
20#include "components/user_manager/user_manager.h"
21#endif
22
23namespace chrome {
24
25bool ShouldDisplayManagedUi(Profile* profile) {
26 if (!base::FeatureList::IsEnabled(features::kShowManagedUi))
27 return false;
28
Nicolas Ouellet-payeur81bdcc52019-01-24 21:20:4229#if defined(OS_CHROMEOS)