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

Unified Diff: components/policy/core/common/cloud/cloud_policy_constants.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: components/policy/core/common/cloud/cloud_policy_constants.h
diff --git a/components/policy/core/common/cloud/cloud_policy_constants.h b/components/policy/core/common/cloud/cloud_policy_constants.h
index b43d6bcf35cf35e3b4d9e227fbc8479aa68cd56d..7062c0602b1aa218911758919b75535b3d9eb8dd 100644
--- a/components/policy/core/common/cloud/cloud_policy_constants.h
+++ b/components/policy/core/common/cloud/cloud_policy_constants.h
@@ -10,6 +10,10 @@
#include "components/policy/policy_export.h"
+namespace enterprise_management {
+class PolicyData;
+}
+
namespace policy {
// Constants related to the device management protocol.
@@ -131,6 +135,20 @@ typedef std::pair<std::string, std::string> PolicyNamespaceKey;
// http://crbug.com/248527
POLICY_EXPORT const char* GetChromeUserPolicyType();
+// An enum that indicates if a device that is local owned, enterprise-managed,
Mattias Nissler (ping if slow) 2014/11/28 09:21:18 suggestion: s/that is local owned,/has a local own
bartfab (slow) 2014/11/28 13:56:54 I think that naming will still be wrong. Consumer
davidyu 2014/11/29 01:50:13 I think it's hard to have a precise name while kee
davidyu 2014/11/29 01:50:13 Done.
+// or consumer-managed.
+enum ManagementMode {
+ MANAGEMENT_MODE_LOCAL = 0,
Mattias Nissler (ping if slow) 2014/11/28 09:21:18 for consistency, can we rename this to MANAGEMENT_
davidyu 2014/11/29 01:50:13 Done.
+ MANAGEMENT_MODE_ENTERPRISE = 1,
+ MANAGEMENT_MODE_CONSUMER = 2,
+};
+
+// If |management_mode| is set in |policy_data|, it simply returns it. For
bartfab (slow) 2014/11/28 13:56:53 Nit: s/it/this method/
davidyu 2014/11/29 01:50:14 Done.
+// legacy policy data which don't have |management_mode|, it checks if
bartfab (slow) 2014/11/28 13:56:54 Nit 1: s/policy data/|policy_data|/ Nit 2: s/don't
davidyu 2014/11/29 01:50:14 Done.
+// |request_token| is set and returns a mode for backward-compatiblity.
bartfab (slow) 2014/11/28 13:56:53 Nit: This comment goes into a lot of detail but th
davidyu 2014/11/29 01:50:13 Done.
+ManagementMode GetManagementMode(
+ const enterprise_management::PolicyData& policy_data);
+
} // namespace policy
#endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_CONSTANTS_H_

Powered by Google App Engine
This is Rietveld 408576698