| OLD | NEW | 
|    1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |    1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 
|    2 // Use of this source code is governed by a BSD-style license that can be |    2 // Use of this source code is governed by a BSD-style license that can be | 
|    3 // found in the LICENSE file. |    3 // found in the LICENSE file. | 
|    4  |    4  | 
|    5 #include "chrome/browser/chromeos/policy/device_policy_decoder_chromeos.h" |    5 #include "chrome/browser/chromeos/policy/device_policy_decoder_chromeos.h" | 
|    6  |    6  | 
|    7 #include <limits> |    7 #include <limits> | 
|    8  |    8  | 
|    9 #include "base/logging.h" |    9 #include "base/logging.h" | 
|   10 #include "base/values.h" |   10 #include "base/values.h" | 
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  170                     DecodeIntegerValue(container.auto_login_delay())); |  170                     DecodeIntegerValue(container.auto_login_delay())); | 
|  171     } |  171     } | 
|  172     if (container.has_enable_auto_login_bailout()) { |  172     if (container.has_enable_auto_login_bailout()) { | 
|  173       policies->Set(key::kDeviceLocalAccountAutoLoginBailoutEnabled, |  173       policies->Set(key::kDeviceLocalAccountAutoLoginBailoutEnabled, | 
|  174                     POLICY_LEVEL_MANDATORY, |  174                     POLICY_LEVEL_MANDATORY, | 
|  175                     POLICY_SCOPE_MACHINE, |  175                     POLICY_SCOPE_MACHINE, | 
|  176                     Value::CreateBooleanValue( |  176                     Value::CreateBooleanValue( | 
|  177                         container.enable_auto_login_bailout())); |  177                         container.enable_auto_login_bailout())); | 
|  178     } |  178     } | 
|  179   } |  179   } | 
 |  180  | 
 |  181   if (policy.has_supervised_users_settings()) { | 
 |  182     const em::SupervisedUsersSettingsProto& container = | 
 |  183         policy.supervised_users_settings(); | 
 |  184     if (container.has_supervised_users_enabled()) { | 
 |  185       Value* value = Value::CreateBooleanValue( | 
 |  186           container.supervised_users_enabled()); | 
 |  187       policies->Set(key::kSupervisedUsersEnabled, | 
 |  188                     POLICY_LEVEL_MANDATORY, | 
 |  189                     POLICY_SCOPE_MACHINE, | 
 |  190                     value); | 
 |  191     } | 
 |  192   } | 
|  180 } |  193 } | 
|  181  |  194  | 
|  182 void DecodeKioskPolicies(const em::ChromeDeviceSettingsProto& policy, |  195 void DecodeKioskPolicies(const em::ChromeDeviceSettingsProto& policy, | 
|  183                          PolicyMap* policies, |  196                          PolicyMap* policies, | 
|  184                          EnterpriseInstallAttributes* install_attributes) { |  197                          EnterpriseInstallAttributes* install_attributes) { | 
|  185   // No policies if this is not KIOSK. |  198   // No policies if this is not KIOSK. | 
|  186   if (install_attributes->GetMode() != DEVICE_MODE_RETAIL_KIOSK) |  199   if (install_attributes->GetMode() != DEVICE_MODE_RETAIL_KIOSK) | 
|  187     return; |  200     return; | 
|  188  |  201  | 
|  189   if (policy.has_forced_logout_timeouts()) { |  202   if (policy.has_forced_logout_timeouts()) { | 
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  575   DecodeLoginPolicies(policy, policies); |  588   DecodeLoginPolicies(policy, policies); | 
|  576   DecodeKioskPolicies(policy, policies, install_attributes); |  589   DecodeKioskPolicies(policy, policies, install_attributes); | 
|  577   DecodeNetworkPolicies(policy, policies, install_attributes); |  590   DecodeNetworkPolicies(policy, policies, install_attributes); | 
|  578   DecodeReportingPolicies(policy, policies); |  591   DecodeReportingPolicies(policy, policies); | 
|  579   DecodeAutoUpdatePolicies(policy, policies); |  592   DecodeAutoUpdatePolicies(policy, policies); | 
|  580   DecodeAccessibilityPolicies(policy, policies); |  593   DecodeAccessibilityPolicies(policy, policies); | 
|  581   DecodeGenericPolicies(policy, policies); |  594   DecodeGenericPolicies(policy, policies); | 
|  582 } |  595 } | 
|  583  |  596  | 
|  584 }  // namespace policy |  597 }  // namespace policy | 
| OLD | NEW |