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

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

Issue 1348903007: Revert of Add source column to chrome://policy showing the origins of policies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 void NetworkConfigurationPolicyHandler::PrepareForDisplaying( 259 void NetworkConfigurationPolicyHandler::PrepareForDisplaying(
260 PolicyMap* policies) const { 260 PolicyMap* policies) const {
261 const PolicyMap::Entry* entry = policies->Get(policy_name()); 261 const PolicyMap::Entry* entry = policies->Get(policy_name());
262 if (!entry) 262 if (!entry)
263 return; 263 return;
264 base::Value* sanitized_config = SanitizeNetworkConfig(entry->value); 264 base::Value* sanitized_config = SanitizeNetworkConfig(entry->value);
265 if (!sanitized_config) 265 if (!sanitized_config)
266 sanitized_config = base::Value::CreateNullValue().release(); 266 sanitized_config = base::Value::CreateNullValue().release();
267 267
268 policies->Set(policy_name(), entry->level, entry->scope, 268 policies->Set(policy_name(), entry->level, entry->scope,
269 entry->source, sanitized_config, nullptr); 269 sanitized_config, NULL);
270 } 270 }
271 271
272 NetworkConfigurationPolicyHandler::NetworkConfigurationPolicyHandler( 272 NetworkConfigurationPolicyHandler::NetworkConfigurationPolicyHandler(
273 const char* policy_name, 273 const char* policy_name,
274 onc::ONCSource onc_source, 274 onc::ONCSource onc_source,
275 const char* pref_path) 275 const char* pref_path)
276 : TypeCheckingPolicyHandler(policy_name, base::Value::TYPE_STRING), 276 : TypeCheckingPolicyHandler(policy_name, base::Value::TYPE_STRING),
277 onc_source_(onc_source), 277 onc_source_(onc_source),
278 pref_path_(pref_path) { 278 pref_path_(pref_path) {
279 } 279 }
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 472
473 value = GetValue(dict, kScreenLockDelayAC); 473 value = GetValue(dict, kScreenLockDelayAC);
474 if (value) 474 if (value)
475 prefs->SetValue(prefs::kPowerAcScreenLockDelayMs, value.Pass()); 475 prefs->SetValue(prefs::kPowerAcScreenLockDelayMs, value.Pass());
476 value = GetValue(dict, kScreenLockDelayBattery); 476 value = GetValue(dict, kScreenLockDelayBattery);
477 if (value) 477 if (value)
478 prefs->SetValue(prefs::kPowerBatteryScreenLockDelayMs, value.Pass()); 478 prefs->SetValue(prefs::kPowerBatteryScreenLockDelayMs, value.Pass());
479 } 479 }
480 480
481 } // namespace policy 481 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698