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

Side by Side Diff: chromeos/network/managed_network_configuration_handler_impl.h

Issue 1431563005: Handle prohibited technologies in device policy ONC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 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 <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 const base::DictionaryValue& new_properties) override; 105 const base::DictionaryValue& new_properties) override;
106 106
107 void OnPoliciesApplied(const NetworkProfile& profile) override; 107 void OnPoliciesApplied(const NetworkProfile& profile) override;
108 108
109 private: 109 private:
110 friend class AutoConnectHandlerTest; 110 friend class AutoConnectHandlerTest;
111 friend class ClientCertResolverTest; 111 friend class ClientCertResolverTest;
112 friend class ManagedNetworkConfigurationHandlerTest; 112 friend class ManagedNetworkConfigurationHandlerTest;
113 friend class NetworkConnectionHandlerTest; 113 friend class NetworkConnectionHandlerTest;
114 friend class NetworkHandler; 114 friend class NetworkHandler;
115 friend class ProhibitedTechnologiesHandlerTest;
115 116
116 struct Policies; 117 struct Policies;
117 typedef base::Callback<void(const std::string& service_path, 118 typedef base::Callback<void(const std::string& service_path,
118 scoped_ptr<base::DictionaryValue> properties)> 119 scoped_ptr<base::DictionaryValue> properties)>
119 GetDevicePropertiesCallback; 120 GetDevicePropertiesCallback;
120 typedef std::map<std::string, linked_ptr<Policies> > UserToPoliciesMap; 121 typedef std::map<std::string, linked_ptr<Policies> > UserToPoliciesMap;
121 typedef std::map<std::string, linked_ptr<PolicyApplicator>> 122 typedef std::map<std::string, linked_ptr<PolicyApplicator>>
122 UserToPolicyApplicatorMap; 123 UserToPolicyApplicatorMap;
123 typedef std::map<std::string, std::set<std::string>> 124 typedef std::map<std::string, std::set<std::string>>
124 UserToModifiedPoliciesMap; 125 UserToModifiedPoliciesMap;
125 126
126 ManagedNetworkConfigurationHandlerImpl(); 127 ManagedNetworkConfigurationHandlerImpl();
127 128
128 // Handlers may be NULL in tests so long as they do not execute any paths 129 // Handlers may be NULL in tests so long as they do not execute any paths
129 // that require the handlers. 130 // that require the handlers.
130 void Init(NetworkStateHandler* network_state_handler, 131 void Init(NetworkStateHandler* network_state_handler,
131 NetworkProfileHandler* network_profile_handler, 132 NetworkProfileHandler* network_profile_handler,
132 NetworkConfigurationHandler* network_configuration_handler, 133 NetworkConfigurationHandler* network_configuration_handler,
133 NetworkDeviceHandler* network_device_handler); 134 NetworkDeviceHandler* network_device_handler,
135 ProhibitedTechnologiesHandler* prohibitied_technologies_handler);
134 136
135 // Sends the response to the caller of GetManagedProperties. 137 // Sends the response to the caller of GetManagedProperties.
136 void SendManagedProperties( 138 void SendManagedProperties(
137 const std::string& userhash, 139 const std::string& userhash,
138 const network_handler::DictionaryResultCallback& callback, 140 const network_handler::DictionaryResultCallback& callback,
139 const network_handler::ErrorCallback& error_callback, 141 const network_handler::ErrorCallback& error_callback,
140 const std::string& service_path, 142 const std::string& service_path,
141 scoped_ptr<base::DictionaryValue> shill_properties); 143 scoped_ptr<base::DictionaryValue> shill_properties);
142 144
143 // Sends the response to the caller of GetProperties. 145 // Sends the response to the caller of GetProperties.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 std::set<std::string>* modified_policies); 196 std::set<std::string>* modified_policies);
195 197
196 // If present, the empty string maps to the device policy. 198 // If present, the empty string maps to the device policy.
197 UserToPoliciesMap policies_by_user_; 199 UserToPoliciesMap policies_by_user_;
198 200
199 // Local references to the associated handler instances. 201 // Local references to the associated handler instances.
200 NetworkStateHandler* network_state_handler_; 202 NetworkStateHandler* network_state_handler_;
201 NetworkProfileHandler* network_profile_handler_; 203 NetworkProfileHandler* network_profile_handler_;
202 NetworkConfigurationHandler* network_configuration_handler_; 204 NetworkConfigurationHandler* network_configuration_handler_;
203 NetworkDeviceHandler* network_device_handler_; 205 NetworkDeviceHandler* network_device_handler_;
206 ProhibitedTechnologiesHandler* prohibited_technologies_handler_;
204 207
205 // Owns the currently running PolicyApplicators. 208 // Owns the currently running PolicyApplicators.
206 UserToPolicyApplicatorMap policy_applicators_; 209 UserToPolicyApplicatorMap policy_applicators_;
207 210
208 // Per userhash (or empty string for device policy), contains the GUIDs of the 211 // Per userhash (or empty string for device policy), contains the GUIDs of the
209 // policies that were modified. 212 // policies that were modified.
210 // If this map contains a userhash as key, it means that a policy application 213 // If this map contains a userhash as key, it means that a policy application
211 // for this userhash is pending even if no policies were modified and the 214 // for this userhash is pending even if no policies were modified and the
212 // associated set of GUIDs is empty. 215 // associated set of GUIDs is empty.
213 UserToModifiedPoliciesMap queued_modified_policies_; 216 UserToModifiedPoliciesMap queued_modified_policies_;
214 217
215 base::ObserverList<NetworkPolicyObserver> observers_; 218 base::ObserverList<NetworkPolicyObserver> observers_;
216 219
217 // For Shill client callbacks 220 // For Shill client callbacks
218 base::WeakPtrFactory<ManagedNetworkConfigurationHandlerImpl> 221 base::WeakPtrFactory<ManagedNetworkConfigurationHandlerImpl>
219 weak_ptr_factory_; 222 weak_ptr_factory_;
220 223
221 DISALLOW_COPY_AND_ASSIGN(ManagedNetworkConfigurationHandlerImpl); 224 DISALLOW_COPY_AND_ASSIGN(ManagedNetworkConfigurationHandlerImpl);
222 }; 225 };
223 226
224 } // namespace chromeos 227 } // namespace chromeos
225 228
226 #endif // CHROMEOS_NETWORK_MANAGED_NETWORK_CONFIGURATION_HANDLER_IMPL_H_ 229 #endif // CHROMEOS_NETWORK_MANAGED_NETWORK_CONFIGURATION_HANDLER_IMPL_H_
OLDNEW
« no previous file with comments | « chromeos/network/client_cert_resolver_unittest.cc ('k') | chromeos/network/managed_network_configuration_handler_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698