Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: chrome/browser/chromeos/policy/configuration_policy_handler_chromeos.cc

Issue 1131113004: Convert JsonWriter::Write to taking a const ref for the in-param (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another rebase Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 return NULL; 291 return NULL;
292 292
293 // Placeholder to insert in place of the filtered setting. 293 // Placeholder to insert in place of the filtered setting.
294 const char kPlaceholder[] = "********"; 294 const char kPlaceholder[] = "********";
295 295
296 toplevel_dict = chromeos::onc::MaskCredentialsInOncObject( 296 toplevel_dict = chromeos::onc::MaskCredentialsInOncObject(
297 chromeos::onc::kToplevelConfigurationSignature, 297 chromeos::onc::kToplevelConfigurationSignature,
298 *toplevel_dict, 298 *toplevel_dict,
299 kPlaceholder); 299 kPlaceholder);
300 300
301 base::JSONWriter::WriteWithOptions(toplevel_dict.get(), 301 base::JSONWriter::WriteWithOptions(
302 base::JSONWriter::OPTIONS_PRETTY_PRINT, 302 *toplevel_dict, base::JSONWriter::OPTIONS_PRETTY_PRINT, &json_string);
303 &json_string);
304 return new base::StringValue(json_string); 303 return new base::StringValue(json_string);
305 } 304 }
306 305
307 PinnedLauncherAppsPolicyHandler::PinnedLauncherAppsPolicyHandler() 306 PinnedLauncherAppsPolicyHandler::PinnedLauncherAppsPolicyHandler()
308 : ExtensionListPolicyHandler(key::kPinnedLauncherApps, 307 : ExtensionListPolicyHandler(key::kPinnedLauncherApps,
309 prefs::kPinnedLauncherApps, 308 prefs::kPinnedLauncherApps,
310 false) {} 309 false) {}
311 310
312 PinnedLauncherAppsPolicyHandler::~PinnedLauncherAppsPolicyHandler() {} 311 PinnedLauncherAppsPolicyHandler::~PinnedLauncherAppsPolicyHandler() {}
313 312
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 473
475 value = GetValue(dict, kScreenLockDelayAC); 474 value = GetValue(dict, kScreenLockDelayAC);
476 if (value) 475 if (value)
477 prefs->SetValue(prefs::kPowerAcScreenLockDelayMs, value.release()); 476 prefs->SetValue(prefs::kPowerAcScreenLockDelayMs, value.release());
478 value = GetValue(dict, kScreenLockDelayBattery); 477 value = GetValue(dict, kScreenLockDelayBattery);
479 if (value) 478 if (value)
480 prefs->SetValue(prefs::kPowerBatteryScreenLockDelayMs, value.release()); 479 prefs->SetValue(prefs::kPowerBatteryScreenLockDelayMs, value.release());
481 } 480 }
482 481
483 } // namespace policy 482 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698