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

Unified Diff: chrome/browser/chromeos/policy/policy_util.h

Issue 742513006: Add ManagementMode enum and GetManagementMode(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
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_
« no previous file with comments | « chrome/browser/chromeos/policy/device_local_account_policy_service.cc ('k') | chrome/browser/chromeos/policy/policy_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698