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

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: Failing test fixed. 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
« no previous file with comments | « components/policy/core/common/cloud/cloud_policy_constants.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..ef9fcfd659099c222cb19962ab9c370379c1aef4 100644
--- a/components/policy/core/common/cloud/cloud_policy_constants.cc
+++ b/components/policy/core/common/cloud/cloud_policy_constants.cc
@@ -106,6 +106,23 @@ 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;
+ }
+ NOTREACHED();
+}
+
ManagementMode GetManagementMode(const em::PolicyData& policy_data) {
if (policy_data.has_management_mode()) {
switch (policy_data.management_mode()) {
« no previous file with comments | « components/policy/core/common/cloud/cloud_policy_constants.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698