OLD | NEW |
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 #ifndef CHROMEOS_NETWORK_ONC_ONC_VALIDATOR_H_ | 5 #ifndef CHROMEOS_NETWORK_ONC_ONC_VALIDATOR_H_ |
6 #define CHROMEOS_NETWORK_ONC_ONC_VALIDATOR_H_ | 6 #define CHROMEOS_NETWORK_ONC_ONC_VALIDATOR_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 // |error_or_warning_found_|. | 200 // |error_or_warning_found_|. |
201 bool RequireField(const base::DictionaryValue& dict, const std::string& key); | 201 bool RequireField(const base::DictionaryValue& dict, const std::string& key); |
202 | 202 |
203 // Returns true if the GUID is unique or if the GUID is not a string | 203 // Returns true if the GUID is unique or if the GUID is not a string |
204 // and false otherwise. The function also adds the GUID to a set in | 204 // and false otherwise. The function also adds the GUID to a set in |
205 // order to identify duplicates. | 205 // order to identify duplicates. |
206 bool CheckGuidIsUniqueAndAddToSet(const base::DictionaryValue& dict, | 206 bool CheckGuidIsUniqueAndAddToSet(const base::DictionaryValue& dict, |
207 const std::string& kGUID, | 207 const std::string& kGUID, |
208 std::set<std::string> *guids); | 208 std::set<std::string> *guids); |
209 | 209 |
210 // Prohibit certificate patterns for device policy ONC so that an unmanaged | |
211 // user won't have a certificate presented for them involuntarily. | |
212 bool IsCertPatternInDevicePolicy(const std::string& cert_type); | |
213 | |
214 // Prohibit global network configuration in user ONC imports. | 210 // Prohibit global network configuration in user ONC imports. |
215 bool IsGlobalNetworkConfigInUserImport( | 211 bool IsGlobalNetworkConfigInUserImport( |
216 const base::DictionaryValue& onc_object); | 212 const base::DictionaryValue& onc_object); |
217 | 213 |
218 std::string MessageHeader(); | 214 std::string MessageHeader(); |
219 | 215 |
220 const bool error_on_unknown_field_; | 216 const bool error_on_unknown_field_; |
221 const bool error_on_wrong_recommended_; | 217 const bool error_on_wrong_recommended_; |
222 const bool error_on_missing_field_; | 218 const bool error_on_missing_field_; |
223 const bool managed_onc_; | 219 const bool managed_onc_; |
(...skipping 16 matching lines...) Expand all Loading... |
240 // function ValidateAndRepairObject. | 236 // function ValidateAndRepairObject. |
241 bool error_or_warning_found_; | 237 bool error_or_warning_found_; |
242 | 238 |
243 DISALLOW_COPY_AND_ASSIGN(Validator); | 239 DISALLOW_COPY_AND_ASSIGN(Validator); |
244 }; | 240 }; |
245 | 241 |
246 } // namespace onc | 242 } // namespace onc |
247 } // namespace chromeos | 243 } // namespace chromeos |
248 | 244 |
249 #endif // CHROMEOS_NETWORK_ONC_ONC_VALIDATOR_H_ | 245 #endif // CHROMEOS_NETWORK_ONC_ONC_VALIDATOR_H_ |
OLD | NEW |