| 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 | 8 |
| 9 #include "ash/magnifier/magnifier_constants.h" | 9 #include "ash/magnifier/magnifier_constants.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 | 154 |
| 155 // Placeholder to insert in place of the filtered setting. | 155 // Placeholder to insert in place of the filtered setting. |
| 156 const char kPlaceholder[] = "********"; | 156 const char kPlaceholder[] = "********"; |
| 157 | 157 |
| 158 toplevel_dict = chromeos::onc::MaskCredentialsInOncObject( | 158 toplevel_dict = chromeos::onc::MaskCredentialsInOncObject( |
| 159 chromeos::onc::kToplevelConfigurationSignature, | 159 chromeos::onc::kToplevelConfigurationSignature, |
| 160 *toplevel_dict, | 160 *toplevel_dict, |
| 161 kPlaceholder); | 161 kPlaceholder); |
| 162 | 162 |
| 163 base::JSONWriter::WriteWithOptions(toplevel_dict.get(), | 163 base::JSONWriter::WriteWithOptions(toplevel_dict.get(), |
| 164 base::JSONWriter::OPTIONS_PRETTY_PRINT, | 164 base::JSONWriter::OPTIONS_DO_NOT_ESCAPE | |
| 165 base::JSONWriter::OPTIONS_PRETTY_PRINT, |
| 165 &json_string); | 166 &json_string); |
| 166 return base::Value::CreateStringValue(json_string); | 167 return base::Value::CreateStringValue(json_string); |
| 167 } | 168 } |
| 168 | 169 |
| 169 PinnedLauncherAppsPolicyHandler::PinnedLauncherAppsPolicyHandler() | 170 PinnedLauncherAppsPolicyHandler::PinnedLauncherAppsPolicyHandler() |
| 170 : ExtensionListPolicyHandler(key::kPinnedLauncherApps, | 171 : ExtensionListPolicyHandler(key::kPinnedLauncherApps, |
| 171 prefs::kPinnedLauncherApps, | 172 prefs::kPinnedLauncherApps, |
| 172 false) {} | 173 false) {} |
| 173 | 174 |
| 174 PinnedLauncherAppsPolicyHandler::~PinnedLauncherAppsPolicyHandler() {} | 175 PinnedLauncherAppsPolicyHandler::~PinnedLauncherAppsPolicyHandler() {} |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 const base::Value* value = policies.GetValue(policy_name()); | 260 const base::Value* value = policies.GetValue(policy_name()); |
| 260 if (value && EnsureInRange(value, NULL, NULL)) { | 261 if (value && EnsureInRange(value, NULL, NULL)) { |
| 261 if (!prefs->GetValue(prefs::kPowerAcIdleAction, NULL)) | 262 if (!prefs->GetValue(prefs::kPowerAcIdleAction, NULL)) |
| 262 prefs->SetValue(prefs::kPowerAcIdleAction, value->DeepCopy()); | 263 prefs->SetValue(prefs::kPowerAcIdleAction, value->DeepCopy()); |
| 263 if (!prefs->GetValue(prefs::kPowerBatteryIdleAction, NULL)) | 264 if (!prefs->GetValue(prefs::kPowerBatteryIdleAction, NULL)) |
| 264 prefs->SetValue(prefs::kPowerBatteryIdleAction, value->DeepCopy()); | 265 prefs->SetValue(prefs::kPowerBatteryIdleAction, value->DeepCopy()); |
| 265 } | 266 } |
| 266 } | 267 } |
| 267 | 268 |
| 268 } // namespace policy | 269 } // namespace policy |
| OLD | NEW |