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

Side by Side Diff: chrome/browser/chromeos/arc/policy/arc_policy_util.cc

Issue 2448013002: Extract utilities for policy check from ArcAuthService. (Closed)
Patch Set: Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/chromeos/arc/policy/arc_policy_util.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 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/chromeos/arc/policy/arc_policy_util.h"
6
7 #include "base/command_line.h"
8 #include "chrome/browser/policy/profile_policy_connector.h"
9 #include "chrome/browser/policy/profile_policy_connector_factory.h"
10 #include "chrome/browser/profiles/profile.h"
11 #include "chromeos/chromeos_switches.h"
12
13 namespace arc {
14 namespace policy_util {
15
16 bool IsAccountManaged(Profile* profile) {
17 return policy::ProfilePolicyConnectorFactory::GetForBrowserContext(profile)
18 ->IsManaged();
19 }
20
21 bool IsArcDisabledForEnterprise() {
22 return base::CommandLine::ForCurrentProcess()->HasSwitch(
23 chromeos::switches::kEnterpriseDisableArc);
24 }
25
26 } // namespace policy_util
27 } // namespace arc
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/arc/policy/arc_policy_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698