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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 app_dict->SetString(ash::kPinnedAppsPrefAppIDPath, id); | 332 app_dict->SetString(ash::kPinnedAppsPrefAppIDPath, id); |
333 pinned_apps_list->Append(app_dict); | 333 pinned_apps_list->Append(app_dict); |
334 } | 334 } |
335 } | 335 } |
336 prefs->SetValue(pref_path(), std::move(pinned_apps_list)); | 336 prefs->SetValue(pref_path(), std::move(pinned_apps_list)); |
337 } | 337 } |
338 } | 338 } |
339 | 339 |
340 ScreenMagnifierPolicyHandler::ScreenMagnifierPolicyHandler() | 340 ScreenMagnifierPolicyHandler::ScreenMagnifierPolicyHandler() |
341 : IntRangePolicyHandlerBase(key::kScreenMagnifierType, | 341 : IntRangePolicyHandlerBase(key::kScreenMagnifierType, |
342 0, ui::MAGNIFIER_FULL, false) { | 342 0, |
343 } | 343 ash::MAGNIFIER_FULL, |
| 344 false) {} |
344 | 345 |
345 ScreenMagnifierPolicyHandler::~ScreenMagnifierPolicyHandler() { | 346 ScreenMagnifierPolicyHandler::~ScreenMagnifierPolicyHandler() { |
346 } | 347 } |
347 | 348 |
348 void ScreenMagnifierPolicyHandler::ApplyPolicySettings( | 349 void ScreenMagnifierPolicyHandler::ApplyPolicySettings( |
349 const PolicyMap& policies, | 350 const PolicyMap& policies, |
350 PrefValueMap* prefs) { | 351 PrefValueMap* prefs) { |
351 const base::Value* value = policies.GetValue(policy_name()); | 352 const base::Value* value = policies.GetValue(policy_name()); |
352 int value_in_range; | 353 int value_in_range; |
353 if (value && EnsureInRange(value, &value_in_range, NULL)) { | 354 if (value && EnsureInRange(value, &value_in_range, NULL)) { |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 | 479 |
479 value = GetValue(dict, kScreenLockDelayAC); | 480 value = GetValue(dict, kScreenLockDelayAC); |
480 if (value) | 481 if (value) |
481 prefs->SetValue(prefs::kPowerAcScreenLockDelayMs, std::move(value)); | 482 prefs->SetValue(prefs::kPowerAcScreenLockDelayMs, std::move(value)); |
482 value = GetValue(dict, kScreenLockDelayBattery); | 483 value = GetValue(dict, kScreenLockDelayBattery); |
483 if (value) | 484 if (value) |
484 prefs->SetValue(prefs::kPowerBatteryScreenLockDelayMs, std::move(value)); | 485 prefs->SetValue(prefs::kPowerBatteryScreenLockDelayMs, std::move(value)); |
485 } | 486 } |
486 | 487 |
487 } // namespace policy | 488 } // namespace policy |
OLD | NEW |