| 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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 // Placeholder to insert in place of the filtered setting. | 299 // Placeholder to insert in place of the filtered setting. |
| 300 const char kPlaceholder[] = "********"; | 300 const char kPlaceholder[] = "********"; |
| 301 | 301 |
| 302 toplevel_dict = chromeos::onc::MaskCredentialsInOncObject( | 302 toplevel_dict = chromeos::onc::MaskCredentialsInOncObject( |
| 303 chromeos::onc::kToplevelConfigurationSignature, | 303 chromeos::onc::kToplevelConfigurationSignature, |
| 304 *toplevel_dict, | 304 *toplevel_dict, |
| 305 kPlaceholder); | 305 kPlaceholder); |
| 306 | 306 |
| 307 base::JSONWriter::WriteWithOptions( | 307 base::JSONWriter::WriteWithOptions( |
| 308 *toplevel_dict, base::JSONWriter::OPTIONS_PRETTY_PRINT, &json_string); | 308 *toplevel_dict, base::JSONWriter::OPTIONS_PRETTY_PRINT, &json_string); |
| 309 return base::WrapUnique(new base::StringValue(json_string)); | 309 return base::MakeUnique<base::StringValue>(json_string); |
| 310 } | 310 } |
| 311 | 311 |
| 312 PinnedLauncherAppsPolicyHandler::PinnedLauncherAppsPolicyHandler() | 312 PinnedLauncherAppsPolicyHandler::PinnedLauncherAppsPolicyHandler() |
| 313 : ExtensionListPolicyHandler(key::kPinnedLauncherApps, | 313 : ExtensionListPolicyHandler(key::kPinnedLauncherApps, |
| 314 prefs::kPolicyPinnedLauncherApps, | 314 prefs::kPolicyPinnedLauncherApps, |
| 315 false) {} | 315 false) {} |
| 316 | 316 |
| 317 PinnedLauncherAppsPolicyHandler::~PinnedLauncherAppsPolicyHandler() {} | 317 PinnedLauncherAppsPolicyHandler::~PinnedLauncherAppsPolicyHandler() {} |
| 318 | 318 |
| 319 void PinnedLauncherAppsPolicyHandler::ApplyPolicySettings( | 319 void PinnedLauncherAppsPolicyHandler::ApplyPolicySettings( |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 | 479 |
| 480 value = GetValue(dict, kScreenLockDelayAC); | 480 value = GetValue(dict, kScreenLockDelayAC); |
| 481 if (value) | 481 if (value) |
| 482 prefs->SetValue(prefs::kPowerAcScreenLockDelayMs, std::move(value)); | 482 prefs->SetValue(prefs::kPowerAcScreenLockDelayMs, std::move(value)); |
| 483 value = GetValue(dict, kScreenLockDelayBattery); | 483 value = GetValue(dict, kScreenLockDelayBattery); |
| 484 if (value) | 484 if (value) |
| 485 prefs->SetValue(prefs::kPowerBatteryScreenLockDelayMs, std::move(value)); | 485 prefs->SetValue(prefs::kPowerBatteryScreenLockDelayMs, std::move(value)); |
| 486 } | 486 } |
| 487 | 487 |
| 488 } // namespace policy | 488 } // namespace policy |
| OLD | NEW |