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

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

Issue 2664753002: Remove base::StringValue (Closed)
Patch Set: Rebase Created 3 years, 9 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 <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 // Placeholder to insert in place of the filtered setting. 296 // Placeholder to insert in place of the filtered setting.
297 const char kPlaceholder[] = "********"; 297 const char kPlaceholder[] = "********";
298 298
299 toplevel_dict = chromeos::onc::MaskCredentialsInOncObject( 299 toplevel_dict = chromeos::onc::MaskCredentialsInOncObject(
300 chromeos::onc::kToplevelConfigurationSignature, 300 chromeos::onc::kToplevelConfigurationSignature,
301 *toplevel_dict, 301 *toplevel_dict,
302 kPlaceholder); 302 kPlaceholder);
303 303
304 base::JSONWriter::WriteWithOptions( 304 base::JSONWriter::WriteWithOptions(
305 *toplevel_dict, base::JSONWriter::OPTIONS_PRETTY_PRINT, &json_string); 305 *toplevel_dict, base::JSONWriter::OPTIONS_PRETTY_PRINT, &json_string);
306 return base::MakeUnique<base::StringValue>(json_string); 306 return base::MakeUnique<base::Value>(json_string);
307 } 307 }
308 308
309 PinnedLauncherAppsPolicyHandler::PinnedLauncherAppsPolicyHandler() 309 PinnedLauncherAppsPolicyHandler::PinnedLauncherAppsPolicyHandler()
310 : ExtensionListPolicyHandler(key::kPinnedLauncherApps, 310 : ExtensionListPolicyHandler(key::kPinnedLauncherApps,
311 prefs::kPolicyPinnedLauncherApps, 311 prefs::kPolicyPinnedLauncherApps,
312 false) {} 312 false) {}
313 313
314 PinnedLauncherAppsPolicyHandler::~PinnedLauncherAppsPolicyHandler() {} 314 PinnedLauncherAppsPolicyHandler::~PinnedLauncherAppsPolicyHandler() {}
315 315
316 void PinnedLauncherAppsPolicyHandler::ApplyPolicySettings( 316 void PinnedLauncherAppsPolicyHandler::ApplyPolicySettings(
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 476
477 value = GetValue(dict, kScreenLockDelayAC); 477 value = GetValue(dict, kScreenLockDelayAC);
478 if (value) 478 if (value)
479 prefs->SetValue(prefs::kPowerAcScreenLockDelayMs, std::move(value)); 479 prefs->SetValue(prefs::kPowerAcScreenLockDelayMs, std::move(value));
480 value = GetValue(dict, kScreenLockDelayBattery); 480 value = GetValue(dict, kScreenLockDelayBattery);
481 if (value) 481 if (value)
482 prefs->SetValue(prefs::kPowerBatteryScreenLockDelayMs, std::move(value)); 482 prefs->SetValue(prefs::kPowerBatteryScreenLockDelayMs, std::move(value));
483 } 483 }
484 484
485 } // namespace policy 485 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698