| 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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 prefs::kEnableMemoryInfo, | 289 prefs::kEnableMemoryInfo, |
| 290 Value::TYPE_BOOLEAN }, | 290 Value::TYPE_BOOLEAN }, |
| 291 | 291 |
| 292 #if defined(OS_CHROMEOS) | 292 #if defined(OS_CHROMEOS) |
| 293 { key::kChromeOsLockOnIdleSuspend, | 293 { key::kChromeOsLockOnIdleSuspend, |
| 294 prefs::kEnableScreenLock, | 294 prefs::kEnableScreenLock, |
| 295 Value::TYPE_BOOLEAN }, | 295 Value::TYPE_BOOLEAN }, |
| 296 { key::kChromeOsReleaseChannel, | 296 { key::kChromeOsReleaseChannel, |
| 297 prefs::kChromeOsReleaseChannel, | 297 prefs::kChromeOsReleaseChannel, |
| 298 Value::TYPE_STRING }, | 298 Value::TYPE_STRING }, |
| 299 { key::kReportDeviceVersionInfo, |
| 300 prefs::kReportDeviceVersionInfo, |
| 301 Value::TYPE_BOOLEAN }, |
| 302 { key::kReportDeviceActivityTimes, |
| 303 prefs::kReportDeviceActivityTimes, |
| 304 Value::TYPE_BOOLEAN }, |
| 299 #endif // defined(OS_CHROMEOS) | 305 #endif // defined(OS_CHROMEOS) |
| 300 }; | 306 }; |
| 301 | 307 |
| 302 } // namespace | 308 } // namespace |
| 303 | 309 |
| 304 ConfigurationPolicyHandlerList::ConfigurationPolicyHandlerList() { | 310 ConfigurationPolicyHandlerList::ConfigurationPolicyHandlerList() { |
| 305 for (size_t i = 0; i < arraysize(kSimplePolicyMap); ++i) { | 311 for (size_t i = 0; i < arraysize(kSimplePolicyMap); ++i) { |
| 306 handlers_.push_back( | 312 handlers_.push_back( |
| 307 new SimplePolicyHandler(kSimplePolicyMap[i].policy_name, | 313 new SimplePolicyHandler(kSimplePolicyMap[i].policy_name, |
| 308 kSimplePolicyMap[i].preference_path, | 314 kSimplePolicyMap[i].preference_path, |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 } | 367 } |
| 362 | 368 |
| 363 void ConfigurationPolicyHandlerList::PrepareForDisplaying( | 369 void ConfigurationPolicyHandlerList::PrepareForDisplaying( |
| 364 PolicyMap* policies) const { | 370 PolicyMap* policies) const { |
| 365 std::vector<ConfigurationPolicyHandler*>::const_iterator handler; | 371 std::vector<ConfigurationPolicyHandler*>::const_iterator handler; |
| 366 for (handler = handlers_.begin(); handler != handlers_.end(); ++handler) | 372 for (handler = handlers_.begin(); handler != handlers_.end(); ++handler) |
| 367 (*handler)->PrepareForDisplaying(policies); | 373 (*handler)->PrepareForDisplaying(policies); |
| 368 } | 374 } |
| 369 | 375 |
| 370 } // namespace policy | 376 } // namespace policy |
| OLD | NEW |