Index: chrome/browser/chromeos/policy/policy_util.h |
diff --git a/chrome/browser/chromeos/policy/policy_util.h b/chrome/browser/chromeos/policy/policy_util.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..27e562fd5cd927d5496e5a0a7227d0d3dd120aef |
--- /dev/null |
+++ b/chrome/browser/chromeos/policy/policy_util.h |
@@ -0,0 +1,34 @@ |
+// 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. |
+ |
+#ifndef CHROME_BROWSER_CHROMEOS_POLICY_POLICY_UTIL_H_ |
+#define CHROME_BROWSER_CHROMEOS_POLICY_POLICY_UTIL_H_ |
+ |
+#include "base/macros.h" |
+ |
+namespace enterprise_management { |
+class PolicyData; |
+} |
+ |
+namespace policy { |
+ |
+class PolicyUtil { |
Mattias Nissler (ping if slow)
2014/11/26 13:52:42
We should just make helper function outside a clas
davidyu
2014/11/27 04:00:35
Done.
|
+ public: |
+ // Returns true if the device is consumer-managed, enterprise-managed, or |
+ // local owned, respectively. Only one, and exactly one of these will return |
+ // true. |
+ static bool IsConsumerManaged( |
Mattias Nissler (ping if slow)
2014/11/26 13:52:42
Can we make an enum and have a single GetManagemen
davidyu
2014/11/27 04:00:34
Done.
|
+ const enterprise_management::PolicyData& policy_data); |
+ static bool IsEnterpriseManaged( |
+ const enterprise_management::PolicyData& policy_data); |
+ static bool IsLocalOwned( |
+ const enterprise_management::PolicyData& policy_data); |
+ |
+ private: |
+ DISALLOW_IMPLICIT_CONSTRUCTORS(PolicyUtil); |
+}; |
+ |
+} // namespace policy |
+ |
+#endif // CHROME_BROWSER_CHROMEOS_POLICY_POLICY_UTIL_H_ |