| Index: chrome/browser/policy/configuration_policy_handler_list.cc
|
| diff --git a/chrome/browser/policy/configuration_policy_handler_list.cc b/chrome/browser/policy/configuration_policy_handler_list.cc
|
| deleted file mode 100644
|
| index 25413a74aeab14054514011808187cda8793d96a..0000000000000000000000000000000000000000
|
| --- a/chrome/browser/policy/configuration_policy_handler_list.cc
|
| +++ /dev/null
|
| @@ -1,59 +0,0 @@
|
| -// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| -// Use of this source code is governed by a BSD-style license that can be
|
| -// found in the LICENSE file.
|
| -
|
| -#include "chrome/browser/policy/configuration_policy_handler_list.h"
|
| -
|
| -#include "base/prefs/pref_value_map.h"
|
| -#include "base/stl_util.h"
|
| -#include "chrome/browser/policy/configuration_policy_handler.h"
|
| -#include "components/policy/core/browser/policy_error_map.h"
|
| -#include "components/policy/core/common/policy_map.h"
|
| -#include "grit/component_strings.h"
|
| -
|
| -namespace policy {
|
| -ConfigurationPolicyHandlerList::ConfigurationPolicyHandlerList(
|
| - const GetChromePolicyDetailsCallback& details_callback)
|
| - : details_callback_(details_callback) {}
|
| -
|
| -ConfigurationPolicyHandlerList::~ConfigurationPolicyHandlerList() {
|
| - STLDeleteElements(&handlers_);
|
| -}
|
| -
|
| -void ConfigurationPolicyHandlerList::AddHandler(
|
| - scoped_ptr<ConfigurationPolicyHandler> handler) {
|
| - handlers_.push_back(handler.release());
|
| -}
|
| -
|
| -void ConfigurationPolicyHandlerList::ApplyPolicySettings(
|
| - const PolicyMap& policies,
|
| - PrefValueMap* prefs,
|
| - PolicyErrorMap* errors) const {
|
| - PolicyErrorMap scoped_errors;
|
| - if (!errors)
|
| - errors = &scoped_errors;
|
| -
|
| - std::vector<ConfigurationPolicyHandler*>::const_iterator handler;
|
| - for (handler = handlers_.begin(); handler != handlers_.end(); ++handler) {
|
| - if ((*handler)->CheckPolicySettings(policies, errors) && prefs)
|
| - (*handler)->ApplyPolicySettings(policies, prefs);
|
| - }
|
| -
|
| - for (PolicyMap::const_iterator it = policies.begin();
|
| - it != policies.end();
|
| - ++it) {
|
| - const PolicyDetails* details =
|
| - details_callback_.is_null() ? NULL : details_callback_.Run(it->first);
|
| - if (details && details->is_deprecated)
|
| - errors->AddError(it->first, IDS_POLICY_DEPRECATED);
|
| - }
|
| -}
|
| -
|
| -void ConfigurationPolicyHandlerList::PrepareForDisplaying(
|
| - PolicyMap* policies) const {
|
| - std::vector<ConfigurationPolicyHandler*>::const_iterator handler;
|
| - for (handler = handlers_.begin(); handler != handlers_.end(); ++handler)
|
| - (*handler)->PrepareForDisplaying(policies);
|
| -}
|
| -
|
| -} // namespace policy
|
|
|