Chromium Code Reviews| 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/configuration_policy_handler_chromeos.h " | 5 #include "chrome/browser/chromeos/policy/configuration_policy_handler_chromeos.h " |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 217 // ONC policies are always unencrypted. | 217 // ONC policies are always unencrypted. |
| 218 chromeos::onc::Validator::Result validation_result; | 218 chromeos::onc::Validator::Result validation_result; |
| 219 root_dict = validator.ValidateAndRepairObject( | 219 root_dict = validator.ValidateAndRepairObject( |
| 220 &chromeos::onc::kToplevelConfigurationSignature, *root_dict, | 220 &chromeos::onc::kToplevelConfigurationSignature, *root_dict, |
| 221 &validation_result); | 221 &validation_result); |
| 222 if (validation_result == chromeos::onc::Validator::VALID_WITH_WARNINGS) | 222 if (validation_result == chromeos::onc::Validator::VALID_WITH_WARNINGS) |
| 223 errors->AddError(policy_name(), IDS_POLICY_NETWORK_CONFIG_IMPORT_PARTIAL); | 223 errors->AddError(policy_name(), IDS_POLICY_NETWORK_CONFIG_IMPORT_PARTIAL); |
| 224 else if (validation_result == chromeos::onc::Validator::INVALID) | 224 else if (validation_result == chromeos::onc::Validator::INVALID) |
| 225 errors->AddError(policy_name(), IDS_POLICY_NETWORK_CONFIG_IMPORT_FAILED); | 225 errors->AddError(policy_name(), IDS_POLICY_NETWORK_CONFIG_IMPORT_FAILED); |
| 226 | 226 |
| 227 // fill in HexSSID field from contents of SSID field if not set already | |
|
pneubeck (no reviews)
2014/11/27 14:49:02
ah. In this case, you don't have to fix the HexSSI
cschuet (SLOW)
2014/11/27 15:44:30
Done.
| |
| 228 chromeos::onc::FillInHexSSIDFieldsInOncObject( | |
| 229 chromeos::onc::kToplevelConfigurationSignature, root_dict.get()); | |
| 230 | |
| 227 // In any case, don't reject the policy as some networks or certificates | 231 // In any case, don't reject the policy as some networks or certificates |
| 228 // could still be applied. | 232 // could still be applied. |
| 229 } | 233 } |
| 230 | 234 |
| 231 return true; | 235 return true; |
| 232 } | 236 } |
| 233 | 237 |
| 234 void NetworkConfigurationPolicyHandler::ApplyPolicySettings( | 238 void NetworkConfigurationPolicyHandler::ApplyPolicySettings( |
| 235 const PolicyMap& policies, | 239 const PolicyMap& policies, |
| 236 PrefValueMap* prefs) { | 240 PrefValueMap* prefs) { |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 474 | 478 |
| 475 value = GetValue(dict, kScreenLockDelayAC); | 479 value = GetValue(dict, kScreenLockDelayAC); |
| 476 if (value) | 480 if (value) |
| 477 prefs->SetValue(prefs::kPowerAcScreenLockDelayMs, value.release()); | 481 prefs->SetValue(prefs::kPowerAcScreenLockDelayMs, value.release()); |
| 478 value = GetValue(dict, kScreenLockDelayBattery); | 482 value = GetValue(dict, kScreenLockDelayBattery); |
| 479 if (value) | 483 if (value) |
| 480 prefs->SetValue(prefs::kPowerBatteryScreenLockDelayMs, value.release()); | 484 prefs->SetValue(prefs::kPowerBatteryScreenLockDelayMs, value.release()); |
| 481 } | 485 } |
| 482 | 486 |
| 483 } // namespace policy | 487 } // namespace policy |
| OLD | NEW |