OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_MANAGED_NETWORK_CONFIGURATION_HANDLER_H_ | 5 #ifndef CHROMEOS_NETWORK_MANAGED_NETWORK_CONFIGURATION_HANDLER_H_ |
6 #define CHROMEOS_NETWORK_MANAGED_NETWORK_CONFIGURATION_HANDLER_H_ | 6 #define CHROMEOS_NETWORK_MANAGED_NETWORK_CONFIGURATION_HANDLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 friend class NetworkHandler; | 136 friend class NetworkHandler; |
137 friend class ManagedNetworkConfigurationHandlerTest; | 137 friend class ManagedNetworkConfigurationHandlerTest; |
138 class PolicyApplicator; | 138 class PolicyApplicator; |
139 | 139 |
140 ManagedNetworkConfigurationHandler(); | 140 ManagedNetworkConfigurationHandler(); |
141 | 141 |
142 void Init(NetworkStateHandler* network_state_handler, | 142 void Init(NetworkStateHandler* network_state_handler, |
143 NetworkProfileHandler* network_profile_handler, | 143 NetworkProfileHandler* network_profile_handler, |
144 NetworkConfigurationHandler* network_configuration_handler); | 144 NetworkConfigurationHandler* network_configuration_handler); |
145 | 145 |
146 | |
147 void GetManagedPropertiesCallback( | 146 void GetManagedPropertiesCallback( |
148 const network_handler::DictionaryResultCallback& callback, | 147 const network_handler::DictionaryResultCallback& callback, |
149 const network_handler::ErrorCallback& error_callback, | 148 const network_handler::ErrorCallback& error_callback, |
150 const std::string& service_path, | 149 const std::string& service_path, |
151 const base::DictionaryValue& shill_properties); | 150 const base::DictionaryValue& shill_properties); |
152 | 151 |
153 const GuidToPolicyMap* GetPoliciesForUser(const std::string& userhash) const; | 152 const GuidToPolicyMap* GetPoliciesForUser(const std::string& userhash) const; |
154 const GuidToPolicyMap* GetPoliciesForProfile( | 153 const GuidToPolicyMap* GetPoliciesForProfile( |
155 const NetworkProfile& profile) const; | 154 const NetworkProfile& profile) const; |
156 | 155 |
157 // The DictionaryValues of the nested maps are owned by this class and are | 156 // The DictionaryValues of the nested maps are owned by this class and are |
158 // explicitly deleted where necessary. If present, the empty string maps to | 157 // explicitly deleted where necessary. If present, the empty string maps to |
159 // the device policy. | 158 // the device policy. |
160 UserToPoliciesMap policies_by_user_; | 159 UserToPoliciesMap policies_by_user_; |
161 | 160 |
162 // Local references to the associated handler instances. | 161 // Local references to the associated handler instances. |
163 NetworkStateHandler* network_state_handler_; | 162 NetworkStateHandler* network_state_handler_; |
164 NetworkProfileHandler* network_profile_handler_; | 163 NetworkProfileHandler* network_profile_handler_; |
165 NetworkConfigurationHandler* network_configuration_handler_; | 164 NetworkConfigurationHandler* network_configuration_handler_; |
166 | 165 |
167 // For Shill client callbacks | 166 // For Shill client callbacks |
168 base::WeakPtrFactory<ManagedNetworkConfigurationHandler> weak_ptr_factory_; | 167 base::WeakPtrFactory<ManagedNetworkConfigurationHandler> weak_ptr_factory_; |
169 | 168 |
170 DISALLOW_COPY_AND_ASSIGN(ManagedNetworkConfigurationHandler); | 169 DISALLOW_COPY_AND_ASSIGN(ManagedNetworkConfigurationHandler); |
171 }; | 170 }; |
172 | 171 |
173 } // namespace chromeos | 172 } // namespace chromeos |
174 | 173 |
175 #endif // CHROMEOS_NETWORK_MANAGED_NETWORK_CONFIGURATION_HANDLER_H_ | 174 #endif // CHROMEOS_NETWORK_MANAGED_NETWORK_CONFIGURATION_HANDLER_H_ |
OLD | NEW |