Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(378)

Side by Side Diff: components/policy/core/browser/configuration_policy_handler_list.cc

Issue 2231753002: components: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: One more call site Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "components/policy/core/browser/configuration_policy_handler_list.h" 5 #include "components/policy/core/browser/configuration_policy_handler_list.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "components/policy/core/browser/configuration_policy_handler.h" 8 #include "components/policy/core/browser/configuration_policy_handler.h"
9 #include "components/policy/core/browser/configuration_policy_handler_parameters .h" 9 #include "components/policy/core/browser/configuration_policy_handler_parameters .h"
10 #include "components/policy/core/browser/policy_error_map.h" 10 #include "components/policy/core/browser/policy_error_map.h"
11 #include "components/policy/core/common/policy_map.h" 11 #include "components/policy/core/common/policy_map.h"
12 #include "components/prefs/pref_value_map.h" 12 #include "components/prefs/pref_value_map.h"
13 #include "grit/components_strings.h" 13 #include "grit/components_strings.h"
14 14
15 namespace policy { 15 namespace policy {
16 ConfigurationPolicyHandlerList::ConfigurationPolicyHandlerList( 16 ConfigurationPolicyHandlerList::ConfigurationPolicyHandlerList(
17 const PopulatePolicyHandlerParametersCallback& parameters_callback, 17 const PopulatePolicyHandlerParametersCallback& parameters_callback,
18 const GetChromePolicyDetailsCallback& details_callback) 18 const GetChromePolicyDetailsCallback& details_callback)
19 : parameters_callback_(parameters_callback), 19 : parameters_callback_(parameters_callback),
20 details_callback_(details_callback) {} 20 details_callback_(details_callback) {}
21 21
22 ConfigurationPolicyHandlerList::~ConfigurationPolicyHandlerList() { 22 ConfigurationPolicyHandlerList::~ConfigurationPolicyHandlerList() {
23 STLDeleteElements(&handlers_); 23 base::STLDeleteElements(&handlers_);
24 } 24 }
25 25
26 void ConfigurationPolicyHandlerList::AddHandler( 26 void ConfigurationPolicyHandlerList::AddHandler(
27 std::unique_ptr<ConfigurationPolicyHandler> handler) { 27 std::unique_ptr<ConfigurationPolicyHandler> handler) {
28 handlers_.push_back(handler.release()); 28 handlers_.push_back(handler.release());
29 } 29 }
30 30
31 void ConfigurationPolicyHandlerList::ApplyPolicySettings( 31 void ConfigurationPolicyHandlerList::ApplyPolicySettings(
32 const PolicyMap& policies, 32 const PolicyMap& policies,
33 PrefValueMap* prefs, 33 PrefValueMap* prefs,
(...skipping 23 matching lines...) Expand all
57 } 57 }
58 58
59 void ConfigurationPolicyHandlerList::PrepareForDisplaying( 59 void ConfigurationPolicyHandlerList::PrepareForDisplaying(
60 PolicyMap* policies) const { 60 PolicyMap* policies) const {
61 std::vector<ConfigurationPolicyHandler*>::const_iterator handler; 61 std::vector<ConfigurationPolicyHandler*>::const_iterator handler;
62 for (handler = handlers_.begin(); handler != handlers_.end(); ++handler) 62 for (handler = handlers_.begin(); handler != handlers_.end(); ++handler)
63 (*handler)->PrepareForDisplaying(policies); 63 (*handler)->PrepareForDisplaying(policies);
64 } 64 }
65 65
66 } // namespace policy 66 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698