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_MANAGED_NETWORK_CONFIGURATION_HANDLER_IMPL_H_ | 5 #ifndef CHROMEOS_NETWORK_MANAGED_NETWORK_CONFIGURATION_HANDLER_IMPL_H_ |
6 #define CHROMEOS_NETWORK_MANAGED_NETWORK_CONFIGURATION_HANDLER_IMPL_H_ | 6 #define CHROMEOS_NETWORK_MANAGED_NETWORK_CONFIGURATION_HANDLER_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <set> | 10 #include <set> |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 onc::ONCSource* onc_source) const override; | 88 onc::ONCSource* onc_source) const override; |
89 | 89 |
90 const GuidToPolicyMap* GetNetworkConfigsFromPolicy( | 90 const GuidToPolicyMap* GetNetworkConfigsFromPolicy( |
91 const std::string& userhash) const override; | 91 const std::string& userhash) const override; |
92 | 92 |
93 const base::DictionaryValue* GetGlobalConfigFromPolicy( | 93 const base::DictionaryValue* GetGlobalConfigFromPolicy( |
94 const std::string& userhash) const override; | 94 const std::string& userhash) const override; |
95 | 95 |
96 const base::DictionaryValue* FindPolicyByGuidAndProfile( | 96 const base::DictionaryValue* FindPolicyByGuidAndProfile( |
97 const std::string& guid, | 97 const std::string& guid, |
98 const std::string& profile_path) const override; | 98 const std::string& profile_path, |
| 99 onc::ONCSource* onc_source) const override; |
99 | 100 |
100 // NetworkProfileObserver overrides | 101 // NetworkProfileObserver overrides |
101 void OnProfileAdded(const NetworkProfile& profile) override; | 102 void OnProfileAdded(const NetworkProfile& profile) override; |
102 void OnProfileRemoved(const NetworkProfile& profile) override; | 103 void OnProfileRemoved(const NetworkProfile& profile) override; |
103 | 104 |
104 // PolicyApplicator::ConfigurationHandler overrides | 105 // PolicyApplicator::ConfigurationHandler overrides |
105 void CreateConfigurationFromPolicy( | 106 void CreateConfigurationFromPolicy( |
106 const base::DictionaryValue& shill_properties) override; | 107 const base::DictionaryValue& shill_properties) override; |
107 | 108 |
108 void UpdateExistingConfigurationWithPropertiesFromPolicy( | 109 void UpdateExistingConfigurationWithPropertiesFromPolicy( |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 const std::string& service_path, | 149 const std::string& service_path, |
149 std::unique_ptr<base::DictionaryValue> shill_properties); | 150 std::unique_ptr<base::DictionaryValue> shill_properties); |
150 | 151 |
151 // Sends the response to the caller of GetProperties. | 152 // Sends the response to the caller of GetProperties. |
152 void SendProperties(const std::string& userhash, | 153 void SendProperties(const std::string& userhash, |
153 const network_handler::DictionaryResultCallback& callback, | 154 const network_handler::DictionaryResultCallback& callback, |
154 const network_handler::ErrorCallback& error_callback, | 155 const network_handler::ErrorCallback& error_callback, |
155 const std::string& service_path, | 156 const std::string& service_path, |
156 std::unique_ptr<base::DictionaryValue> shill_properties); | 157 std::unique_ptr<base::DictionaryValue> shill_properties); |
157 | 158 |
| 159 // Returns the Policies for the given |userhash|, or the device policies if |
| 160 // |userhash| is empty. |
158 const Policies* GetPoliciesForUser(const std::string& userhash) const; | 161 const Policies* GetPoliciesForUser(const std::string& userhash) const; |
| 162 // Returns the Policies for the given network |profile|. These could be either |
| 163 // user or device policies. |
159 const Policies* GetPoliciesForProfile(const NetworkProfile& profile) const; | 164 const Policies* GetPoliciesForProfile(const NetworkProfile& profile) const; |
160 | 165 |
161 void OnPolicyAppliedToNetwork(const std::string& service_path, | 166 void OnPolicyAppliedToNetwork(const std::string& service_path, |
162 const std::string& guid); | 167 const std::string& guid); |
163 | 168 |
164 // Helper method to append associated Device properties to |properties|. | 169 // Helper method to append associated Device properties to |properties|. |
165 void GetDeviceStateProperties(const std::string& service_path, | 170 void GetDeviceStateProperties(const std::string& service_path, |
166 base::DictionaryValue* properties); | 171 base::DictionaryValue* properties); |
167 | 172 |
168 // Callback for NetworkConfigurationHandler::GetProperties requests from | 173 // Callback for NetworkConfigurationHandler::GetProperties requests from |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 // For Shill client callbacks | 233 // For Shill client callbacks |
229 base::WeakPtrFactory<ManagedNetworkConfigurationHandlerImpl> | 234 base::WeakPtrFactory<ManagedNetworkConfigurationHandlerImpl> |
230 weak_ptr_factory_; | 235 weak_ptr_factory_; |
231 | 236 |
232 DISALLOW_COPY_AND_ASSIGN(ManagedNetworkConfigurationHandlerImpl); | 237 DISALLOW_COPY_AND_ASSIGN(ManagedNetworkConfigurationHandlerImpl); |
233 }; | 238 }; |
234 | 239 |
235 } // namespace chromeos | 240 } // namespace chromeos |
236 | 241 |
237 #endif // CHROMEOS_NETWORK_MANAGED_NETWORK_CONFIGURATION_HANDLER_IMPL_H_ | 242 #endif // CHROMEOS_NETWORK_MANAGED_NETWORK_CONFIGURATION_HANDLER_IMPL_H_ |
OLD | NEW |