| 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 <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 const PolicyMap& policies, | 317 const PolicyMap& policies, |
| 318 PrefValueMap* prefs) { | 318 PrefValueMap* prefs) { |
| 319 PolicyErrorMap errors; | 319 PolicyErrorMap errors; |
| 320 const base::Value* policy_value = policies.GetValue(policy_name()); | 320 const base::Value* policy_value = policies.GetValue(policy_name()); |
| 321 const base::ListValue* policy_list = NULL; | 321 const base::ListValue* policy_list = NULL; |
| 322 if (policy_value && policy_value->GetAsList(&policy_list) && policy_list) { | 322 if (policy_value && policy_value->GetAsList(&policy_list) && policy_list) { |
| 323 std::unique_ptr<base::ListValue> pinned_apps_list(new base::ListValue()); | 323 std::unique_ptr<base::ListValue> pinned_apps_list(new base::ListValue()); |
| 324 for (base::ListValue::const_iterator entry(policy_list->begin()); | 324 for (base::ListValue::const_iterator entry(policy_list->begin()); |
| 325 entry != policy_list->end(); ++entry) { | 325 entry != policy_list->end(); ++entry) { |
| 326 std::string id; | 326 std::string id; |
| 327 if ((*entry)->GetAsString(&id)) { | 327 if (entry->GetAsString(&id)) { |
| 328 auto app_dict = base::MakeUnique<base::DictionaryValue>(); | 328 auto app_dict = base::MakeUnique<base::DictionaryValue>(); |
| 329 app_dict->SetString(ash::launcher::kPinnedAppsPrefAppIDPath, id); | 329 app_dict->SetString(ash::launcher::kPinnedAppsPrefAppIDPath, id); |
| 330 pinned_apps_list->Append(std::move(app_dict)); | 330 pinned_apps_list->Append(std::move(app_dict)); |
| 331 } | 331 } |
| 332 } | 332 } |
| 333 prefs->SetValue(pref_path(), std::move(pinned_apps_list)); | 333 prefs->SetValue(pref_path(), std::move(pinned_apps_list)); |
| 334 } | 334 } |
| 335 } | 335 } |
| 336 | 336 |
| 337 ScreenMagnifierPolicyHandler::ScreenMagnifierPolicyHandler() | 337 ScreenMagnifierPolicyHandler::ScreenMagnifierPolicyHandler() |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 | 476 |
| 477 value = GetValue(dict, kScreenLockDelayAC); | 477 value = GetValue(dict, kScreenLockDelayAC); |
| 478 if (value) | 478 if (value) |
| 479 prefs->SetValue(prefs::kPowerAcScreenLockDelayMs, std::move(value)); | 479 prefs->SetValue(prefs::kPowerAcScreenLockDelayMs, std::move(value)); |
| 480 value = GetValue(dict, kScreenLockDelayBattery); | 480 value = GetValue(dict, kScreenLockDelayBattery); |
| 481 if (value) | 481 if (value) |
| 482 prefs->SetValue(prefs::kPowerBatteryScreenLockDelayMs, std::move(value)); | 482 prefs->SetValue(prefs::kPowerBatteryScreenLockDelayMs, std::move(value)); |
| 483 } | 483 } |
| 484 | 484 |
| 485 } // namespace policy | 485 } // namespace policy |
| OLD | NEW |