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