| 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/policy/configuration_policy_handler_list.h" | 5 #include "chrome/browser/policy/configuration_policy_handler_list.h" |
| 6 | 6 |
| 7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "chrome/browser/policy/configuration_policy_handler.h" | 9 #include "chrome/browser/policy/configuration_policy_handler.h" |
| 10 #include "chrome/browser/policy/policy_error_map.h" | 10 #include "chrome/browser/policy/policy_error_map.h" |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 prefs::kEnableMemoryInfo, | 286 prefs::kEnableMemoryInfo, |
| 287 Value::TYPE_BOOLEAN }, | 287 Value::TYPE_BOOLEAN }, |
| 288 | 288 |
| 289 #if defined(OS_CHROMEOS) | 289 #if defined(OS_CHROMEOS) |
| 290 { key::kChromeOsLockOnIdleSuspend, | 290 { key::kChromeOsLockOnIdleSuspend, |
| 291 prefs::kEnableScreenLock, | 291 prefs::kEnableScreenLock, |
| 292 Value::TYPE_BOOLEAN }, | 292 Value::TYPE_BOOLEAN }, |
| 293 { key::kChromeOsReleaseChannel, | 293 { key::kChromeOsReleaseChannel, |
| 294 prefs::kChromeOsReleaseChannel, | 294 prefs::kChromeOsReleaseChannel, |
| 295 Value::TYPE_STRING }, | 295 Value::TYPE_STRING }, |
| 296 { key::kReportDeviceVersionInfo, |
| 297 prefs::kReportDeviceVersionInfo, |
| 298 Value::TYPE_BOOLEAN }, |
| 299 { key::kReportDeviceActivityTimes, |
| 300 prefs::kReportDeviceActivityTimes, |
| 301 Value::TYPE_BOOLEAN }, |
| 296 #endif // defined(OS_CHROMEOS) | 302 #endif // defined(OS_CHROMEOS) |
| 297 }; | 303 }; |
| 298 | 304 |
| 299 } // namespace | 305 } // namespace |
| 300 | 306 |
| 301 ConfigurationPolicyHandlerList::ConfigurationPolicyHandlerList() { | 307 ConfigurationPolicyHandlerList::ConfigurationPolicyHandlerList() { |
| 302 for (size_t i = 0; i < arraysize(kSimplePolicyMap); ++i) { | 308 for (size_t i = 0; i < arraysize(kSimplePolicyMap); ++i) { |
| 303 handlers_.push_back( | 309 handlers_.push_back( |
| 304 new SimplePolicyHandler(kSimplePolicyMap[i].policy_name, | 310 new SimplePolicyHandler(kSimplePolicyMap[i].policy_name, |
| 305 kSimplePolicyMap[i].preference_path, | 311 kSimplePolicyMap[i].preference_path, |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 } | 364 } |
| 359 | 365 |
| 360 void ConfigurationPolicyHandlerList::PrepareForDisplaying( | 366 void ConfigurationPolicyHandlerList::PrepareForDisplaying( |
| 361 PolicyMap* policies) const { | 367 PolicyMap* policies) const { |
| 362 std::vector<ConfigurationPolicyHandler*>::const_iterator handler; | 368 std::vector<ConfigurationPolicyHandler*>::const_iterator handler; |
| 363 for (handler = handlers_.begin(); handler != handlers_.end(); ++handler) | 369 for (handler = handlers_.begin(); handler != handlers_.end(); ++handler) |
| 364 (*handler)->PrepareForDisplaying(policies); | 370 (*handler)->PrepareForDisplaying(policies); |
| 365 } | 371 } |
| 366 | 372 |
| 367 } // namespace policy | 373 } // namespace policy |
| OLD | NEW |