OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CHROMEOS_NETWORK_POLICY_APPLICATOR_H_ | 5 #ifndef CHROMEOS_NETWORK_POLICY_APPLICATOR_H_ |
6 #define CHROMEOS_NETWORK_POLICY_APPLICATOR_H_ | 6 #define CHROMEOS_NETWORK_POLICY_APPLICATOR_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <set> | 10 #include <set> |
(...skipping 29 matching lines...) Expand all Loading... |
40 const base::DictionaryValue& new_properties) = 0; | 40 const base::DictionaryValue& new_properties) = 0; |
41 | 41 |
42 // Called after all policies for |profile| were applied. At this point, the | 42 // Called after all policies for |profile| were applied. At this point, the |
43 // list of networks should be updated. | 43 // list of networks should be updated. |
44 virtual void OnPoliciesApplied(const NetworkProfile& profile) = 0; | 44 virtual void OnPoliciesApplied(const NetworkProfile& profile) = 0; |
45 | 45 |
46 private: | 46 private: |
47 DISALLOW_ASSIGN(ConfigurationHandler); | 47 DISALLOW_ASSIGN(ConfigurationHandler); |
48 }; | 48 }; |
49 | 49 |
50 typedef std::map<std::string, const base::DictionaryValue*> GuidToPolicyMap; | 50 using GuidToPolicyMap = |
| 51 std::map<std::string, std::unique_ptr<base::DictionaryValue>>; |
51 | 52 |
52 // |handler| must outlive this object. | 53 // |handler| must outlive this object. |
53 // |modified_policies| must not be NULL and will be empty afterwards. | 54 // |modified_policies| must not be NULL and will be empty afterwards. |
54 PolicyApplicator(const NetworkProfile& profile, | 55 PolicyApplicator(const NetworkProfile& profile, |
55 const GuidToPolicyMap& all_policies, | 56 const GuidToPolicyMap& all_policies, |
56 const base::DictionaryValue& global_network_config, | 57 const base::DictionaryValue& global_network_config, |
57 ConfigurationHandler* handler, | 58 ConfigurationHandler* handler, |
58 std::set<std::string>* modified_policies); | 59 std::set<std::string>* modified_policies); |
59 | 60 |
60 ~PolicyApplicator(); | 61 ~PolicyApplicator(); |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 base::DictionaryValue global_network_config_; | 110 base::DictionaryValue global_network_config_; |
110 std::vector<std::unique_ptr<base::DictionaryValue>> new_shill_configurations_; | 111 std::vector<std::unique_ptr<base::DictionaryValue>> new_shill_configurations_; |
111 base::WeakPtrFactory<PolicyApplicator> weak_ptr_factory_; | 112 base::WeakPtrFactory<PolicyApplicator> weak_ptr_factory_; |
112 | 113 |
113 DISALLOW_COPY_AND_ASSIGN(PolicyApplicator); | 114 DISALLOW_COPY_AND_ASSIGN(PolicyApplicator); |
114 }; | 115 }; |
115 | 116 |
116 } // namespace chromeos | 117 } // namespace chromeos |
117 | 118 |
118 #endif // CHROMEOS_NETWORK_POLICY_APPLICATOR_H_ | 119 #endif // CHROMEOS_NETWORK_POLICY_APPLICATOR_H_ |
OLD | NEW |