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/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/prefs/pref_value_map.h" | 10 #include "base/prefs/pref_value_map.h" |
(...skipping 10 matching lines...) Expand all Loading... | |
21 #include "chrome/browser/policy/policy_map.h" | 21 #include "chrome/browser/policy/policy_map.h" |
22 #include "chrome/browser/policy/url_blacklist_policy_handler.h" | 22 #include "chrome/browser/policy/url_blacklist_policy_handler.h" |
23 #include "chrome/browser/profiles/incognito_mode_policy_handler.h" | 23 #include "chrome/browser/profiles/incognito_mode_policy_handler.h" |
24 #include "chrome/browser/search_engines/default_search_policy_handler.h" | 24 #include "chrome/browser/search_engines/default_search_policy_handler.h" |
25 #include "chrome/browser/sessions/restore_on_startup_policy_handler.h" | 25 #include "chrome/browser/sessions/restore_on_startup_policy_handler.h" |
26 #include "chrome/browser/sync/sync_policy_handler.h" | 26 #include "chrome/browser/sync/sync_policy_handler.h" |
27 #include "chrome/common/pref_names.h" | 27 #include "chrome/common/pref_names.h" |
28 #include "components/policy/core/common/policy_pref_names.h" | 28 #include "components/policy/core/common/policy_pref_names.h" |
29 #include "extensions/common/manifest.h" | 29 #include "extensions/common/manifest.h" |
30 #include "grit/generated_resources.h" | 30 #include "grit/generated_resources.h" |
31 #include "policy/policy_constants.h" | 31 #include "policy/policy_constants.h" |
bartfab (slow)
2013/11/05 18:18:33
Nit: policy/policy_constants.h now implicitly pull
Joao da Silva
2013/11/07 20:27:27
This file doesn't use the Callback interface
| |
32 | 32 |
33 #if defined(OS_CHROMEOS) | 33 #if defined(OS_CHROMEOS) |
34 #include "ash/magnifier/magnifier_constants.h" | 34 #include "ash/magnifier/magnifier_constants.h" |
35 #include "chrome/browser/chromeos/policy/configuration_policy_handler_chromeos.h " | 35 #include "chrome/browser/chromeos/policy/configuration_policy_handler_chromeos.h " |
36 #include "chromeos/dbus/power_policy_controller.h" | 36 #include "chromeos/dbus/power_policy_controller.h" |
37 #endif // defined(OS_CHROMEOS) | 37 #endif // defined(OS_CHROMEOS) |
38 | 38 |
39 #if defined(OS_ANDROID) | 39 #if defined(OS_ANDROID) |
40 #include "chrome/browser/policy/configuration_policy_handler_android.h" | 40 #include "chrome/browser/policy/configuration_policy_handler_android.h" |
41 #endif // defined(OS_ANDROID) | 41 #endif // defined(OS_ANDROID) |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
484 | 484 |
485 std::vector<ConfigurationPolicyHandler*>::const_iterator handler; | 485 std::vector<ConfigurationPolicyHandler*>::const_iterator handler; |
486 for (handler = handlers_.begin(); handler != handlers_.end(); ++handler) { | 486 for (handler = handlers_.begin(); handler != handlers_.end(); ++handler) { |
487 if ((*handler)->CheckPolicySettings(policies, errors) && prefs) | 487 if ((*handler)->CheckPolicySettings(policies, errors) && prefs) |
488 (*handler)->ApplyPolicySettings(policies, prefs); | 488 (*handler)->ApplyPolicySettings(policies, prefs); |
489 } | 489 } |
490 | 490 |
491 for (PolicyMap::const_iterator it = policies.begin(); | 491 for (PolicyMap::const_iterator it = policies.begin(); |
492 it != policies.end(); | 492 it != policies.end(); |
493 ++it) { | 493 ++it) { |
494 if (IsDeprecatedPolicy(it->first)) | 494 const PolicyDetails* details = GetChromePolicyDetails(it->first); |
495 if (details && details->is_deprecated) | |
495 errors->AddError(it->first, IDS_POLICY_DEPRECATED); | 496 errors->AddError(it->first, IDS_POLICY_DEPRECATED); |
496 } | 497 } |
497 } | 498 } |
498 | 499 |
499 void ConfigurationPolicyHandlerList::PrepareForDisplaying( | 500 void ConfigurationPolicyHandlerList::PrepareForDisplaying( |
500 PolicyMap* policies) const { | 501 PolicyMap* policies) const { |
501 std::vector<ConfigurationPolicyHandler*>::const_iterator handler; | 502 std::vector<ConfigurationPolicyHandler*>::const_iterator handler; |
502 for (handler = handlers_.begin(); handler != handlers_.end(); ++handler) | 503 for (handler = handlers_.begin(); handler != handlers_.end(); ++handler) |
503 (*handler)->PrepareForDisplaying(policies); | 504 (*handler)->PrepareForDisplaying(policies); |
504 } | 505 } |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
690 | 691 |
691 #if defined(OS_ANDROID) | 692 #if defined(OS_ANDROID) |
692 handlers->AddHandler(make_scoped_ptr<ConfigurationPolicyHandler>( | 693 handlers->AddHandler(make_scoped_ptr<ConfigurationPolicyHandler>( |
693 new ManagedBookmarksPolicyHandler())); | 694 new ManagedBookmarksPolicyHandler())); |
694 #endif | 695 #endif |
695 return handlers.Pass(); | 696 return handlers.Pass(); |
696 } | 697 } |
697 #endif // !defined(OS_IOS) | 698 #endif // !defined(OS_IOS) |
698 | 699 |
699 } // namespace policy | 700 } // namespace policy |
OLD | NEW |