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

Unified Diff: components/policy/core/common/cloud/cloud_policy_constants.cc

Issue 769703003: SetManagementSettings() is moved to OwnerSettingsServiceChromeOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes. Created 6 years 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.cc
diff --git a/components/policy/core/common/cloud/cloud_policy_constants.cc b/components/policy/core/common/cloud/cloud_policy_constants.cc
index a5a3d1e0849cd8de07b1141b87fb6d890871b5ad..9c6832622cc92bb0540ba796434ff2f5d0ec2a9c 100644
--- a/components/policy/core/common/cloud/cloud_policy_constants.cc
+++ b/components/policy/core/common/cloud/cloud_policy_constants.cc
@@ -106,6 +106,26 @@ const char* GetChromeUserPolicyType() {
return dm_protocol::kChromeUserPolicyType;
}
+void SetManagementMode(em::PolicyData& policy_data, ManagementMode mode) {
+ switch (mode) {
+ case MANAGEMENT_MODE_LOCAL_OWNER:
+ policy_data.set_management_mode(em::PolicyData::LOCAL_OWNER);
+ return;
+
+ case MANAGEMENT_MODE_ENTERPRISE_MANAGED:
+ policy_data.set_management_mode(em::PolicyData::ENTERPRISE_MANAGED);
+ return;
+
+ case MANAGEMENT_MODE_CONSUMER_MANAGED:
+ policy_data.set_management_mode(em::PolicyData::CONSUMER_MANAGED);
+ return;
+
+ default:
Mattias Nissler (ping if slow) 2014/12/04 13:05:46 I would prefer moving the NOTREACHED after the swi
ygorshenin1 2014/12/05 09:31:48 Done.
+ NOTREACHED();
+ return;
+ }
+}
+
ManagementMode GetManagementMode(const em::PolicyData& policy_data) {
if (policy_data.has_management_mode()) {
switch (policy_data.management_mode()) {

Powered by Google App Engine
This is Rietveld 408576698