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 <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/prefs/pref_value_map.h" | 9 #include "base/prefs/pref_value_map.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
367 Value::TYPE_BOOLEAN }, | 367 Value::TYPE_BOOLEAN }, |
368 { key::kTermsOfServiceURL, | 368 { key::kTermsOfServiceURL, |
369 prefs::kTermsOfServiceURL, | 369 prefs::kTermsOfServiceURL, |
370 Value::TYPE_STRING }, | 370 Value::TYPE_STRING }, |
371 { key::kShowAccessibilityOptionsInSystemTrayMenu, | 371 { key::kShowAccessibilityOptionsInSystemTrayMenu, |
372 prefs::kShouldAlwaysShowAccessibilityMenu, | 372 prefs::kShouldAlwaysShowAccessibilityMenu, |
373 Value::TYPE_BOOLEAN }, | 373 Value::TYPE_BOOLEAN }, |
374 { key::kRebootAfterUpdate, | 374 { key::kRebootAfterUpdate, |
375 prefs::kRebootAfterUpdate, | 375 prefs::kRebootAfterUpdate, |
376 Value::TYPE_BOOLEAN }, | 376 Value::TYPE_BOOLEAN }, |
377 { key::kAttestationEnabledForUser, | |
378 prefs::kAttestationEnabled, | |
379 Value::TYPE_BOOLEAN }, | |
377 #endif // defined(OS_CHROMEOS) | 380 #endif // defined(OS_CHROMEOS) |
378 | 381 |
379 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) | 382 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) |
380 { key::kBackgroundModeEnabled, | 383 { key::kBackgroundModeEnabled, |
381 prefs::kBackgroundModeEnabled, | 384 prefs::kBackgroundModeEnabled, |
382 Value::TYPE_BOOLEAN }, | 385 Value::TYPE_BOOLEAN }, |
383 #endif // !defined(OS_MACOSX) && !defined(OS_CHROMEOS) | 386 #endif // !defined(OS_MACOSX) && !defined(OS_CHROMEOS) |
384 }; | 387 }; |
385 | 388 |
386 // Mapping from extension type names to Manifest::Type. | 389 // Mapping from extension type names to Manifest::Type. |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
504 prefs::kPowerLidClosedAction, | 507 prefs::kPowerLidClosedAction, |
505 0, 3, false)); | 508 0, 3, false)); |
506 handlers_.push_back( | 509 handlers_.push_back( |
507 new IntPercentageToDoublePolicyHandler( | 510 new IntPercentageToDoublePolicyHandler( |
508 key::kPresentationIdleDelayScale, | 511 key::kPresentationIdleDelayScale, |
509 prefs::kPowerPresentationIdleDelayFactor, | 512 prefs::kPowerPresentationIdleDelayFactor, |
510 100, INT_MAX, true)); | 513 100, INT_MAX, true)); |
511 handlers_.push_back(new IntRangePolicyHandler(key::kUptimeLimit, | 514 handlers_.push_back(new IntRangePolicyHandler(key::kUptimeLimit, |
512 prefs::kUptimeLimit, | 515 prefs::kUptimeLimit, |
513 3600, INT_MAX, true)); | 516 3600, INT_MAX, true)); |
517 handlers_.push_back( | |
518 new ExtensionListPolicyHandler(key::kAttestationExtensionWhitelist, | |
519 prefs::kAttestationExtensionWhitelist, | |
520 false)); | |
Mattias Nissler (ping if slow)
2013/04/17 08:09:09
Please move to line 438 where the other extension-
davidyu
2013/04/17 08:24:19
Done.
| |
514 #endif // defined(OS_CHROMEOS) | 521 #endif // defined(OS_CHROMEOS) |
515 } | 522 } |
516 | 523 |
517 ConfigurationPolicyHandlerList::~ConfigurationPolicyHandlerList() { | 524 ConfigurationPolicyHandlerList::~ConfigurationPolicyHandlerList() { |
518 STLDeleteElements(&handlers_); | 525 STLDeleteElements(&handlers_); |
519 } | 526 } |
520 | 527 |
521 void ConfigurationPolicyHandlerList::ApplyPolicySettings( | 528 void ConfigurationPolicyHandlerList::ApplyPolicySettings( |
522 const PolicyMap& policies, | 529 const PolicyMap& policies, |
523 PrefValueMap* prefs, | 530 PrefValueMap* prefs, |
(...skipping 17 matching lines...) Expand all Loading... | |
541 } | 548 } |
542 | 549 |
543 void ConfigurationPolicyHandlerList::PrepareForDisplaying( | 550 void ConfigurationPolicyHandlerList::PrepareForDisplaying( |
544 PolicyMap* policies) const { | 551 PolicyMap* policies) const { |
545 std::vector<ConfigurationPolicyHandler*>::const_iterator handler; | 552 std::vector<ConfigurationPolicyHandler*>::const_iterator handler; |
546 for (handler = handlers_.begin(); handler != handlers_.end(); ++handler) | 553 for (handler = handlers_.begin(); handler != handlers_.end(); ++handler) |
547 (*handler)->PrepareForDisplaying(policies); | 554 (*handler)->PrepareForDisplaying(policies); |
548 } | 555 } |
549 | 556 |
550 } // namespace policy | 557 } // namespace policy |
OLD | NEW |