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_DO_NOT_ESCAPE | | 164 base::JSONWriter::OPTIONS_PRETTY_PRINT, |
165 base::JSONWriter::OPTIONS_PRETTY_PRINT, | |
166 &json_string); | 165 &json_string); |
167 return base::Value::CreateStringValue(json_string); | 166 return base::Value::CreateStringValue(json_string); |
168 } | 167 } |
169 | 168 |
170 PinnedLauncherAppsPolicyHandler::PinnedLauncherAppsPolicyHandler() | 169 PinnedLauncherAppsPolicyHandler::PinnedLauncherAppsPolicyHandler() |
171 : ExtensionListPolicyHandler(key::kPinnedLauncherApps, | 170 : ExtensionListPolicyHandler(key::kPinnedLauncherApps, |
172 prefs::kPinnedLauncherApps, | 171 prefs::kPinnedLauncherApps, |
173 false) {} | 172 false) {} |
174 | 173 |
175 PinnedLauncherAppsPolicyHandler::~PinnedLauncherAppsPolicyHandler() {} | 174 PinnedLauncherAppsPolicyHandler::~PinnedLauncherAppsPolicyHandler() {} |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 const base::Value* value = policies.GetValue(policy_name()); | 259 const base::Value* value = policies.GetValue(policy_name()); |
261 if (value && EnsureInRange(value, NULL, NULL)) { | 260 if (value && EnsureInRange(value, NULL, NULL)) { |
262 if (!prefs->GetValue(prefs::kPowerAcIdleAction, NULL)) | 261 if (!prefs->GetValue(prefs::kPowerAcIdleAction, NULL)) |
263 prefs->SetValue(prefs::kPowerAcIdleAction, value->DeepCopy()); | 262 prefs->SetValue(prefs::kPowerAcIdleAction, value->DeepCopy()); |
264 if (!prefs->GetValue(prefs::kPowerBatteryIdleAction, NULL)) | 263 if (!prefs->GetValue(prefs::kPowerBatteryIdleAction, NULL)) |
265 prefs->SetValue(prefs::kPowerBatteryIdleAction, value->DeepCopy()); | 264 prefs->SetValue(prefs::kPowerBatteryIdleAction, value->DeepCopy()); |
266 } | 265 } |
267 } | 266 } |
268 | 267 |
269 } // namespace policy | 268 } // namespace policy |
OLD | NEW |