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

Unified 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, 2 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/chromeos/arc/policy/arc_policy_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/arc/policy/arc_policy_util.cc
diff --git a/chrome/browser/chromeos/arc/policy/arc_policy_util.cc b/chrome/browser/chromeos/arc/policy/arc_policy_util.cc
new file mode 100644
index 0000000000000000000000000000000000000000..a345b11cb3edddda736a0a0646b057c7b23e7570
--- /dev/null
+++ b/chrome/browser/chromeos/arc/policy/arc_policy_util.cc
@@ -0,0 +1,27 @@
+// Copyright 2016 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 "chrome/browser/chromeos/arc/policy/arc_policy_util.h"
+
+#include "base/command_line.h"
+#include "chrome/browser/policy/profile_policy_connector.h"
+#include "chrome/browser/policy/profile_policy_connector_factory.h"
+#include "chrome/browser/profiles/profile.h"
+#include "chromeos/chromeos_switches.h"
+
+namespace arc {
+namespace policy_util {
+
+bool IsAccountManaged(Profile* profile) {
+ return policy::ProfilePolicyConnectorFactory::GetForBrowserContext(profile)
+ ->IsManaged();
+}
+
+bool IsArcDisabledForEnterprise() {
+ return base::CommandLine::ForCurrentProcess()->HasSwitch(
+ chromeos::switches::kEnterpriseDisableArc);
+}
+
+} // namespace policy_util
+} // namespace arc
« 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