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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 | 203 |
204 bool FieldExistsAndHasNoValidValue(const base::DictionaryValue& object, | 204 bool FieldExistsAndHasNoValidValue(const base::DictionaryValue& object, |
205 const std::string &field_name, | 205 const std::string &field_name, |
206 const char** valid_values); | 206 const char** valid_values); |
207 | 207 |
208 bool FieldExistsAndIsNotInRange(const base::DictionaryValue& object, | 208 bool FieldExistsAndIsNotInRange(const base::DictionaryValue& object, |
209 const std::string &field_name, | 209 const std::string &field_name, |
210 int lower_bound, | 210 int lower_bound, |
211 int upper_bound); | 211 int upper_bound); |
212 | 212 |
| 213 bool FieldExistsAndIsEmpty(const base::DictionaryValue& object, |
| 214 const std::string& field_name); |
| 215 |
213 bool RequireField(const base::DictionaryValue& dict, const std::string& key); | 216 bool RequireField(const base::DictionaryValue& dict, const std::string& key); |
214 | 217 |
215 bool CertPatternInDevicePolicy(const std::string& cert_type); | 218 bool CertPatternInDevicePolicy(const std::string& cert_type); |
216 | 219 |
217 std::string WarningHeader(); | 220 std::string WarningHeader(); |
218 std::string ErrorHeader(); | 221 std::string ErrorHeader(); |
219 std::string MessageHeader(bool is_error); | 222 std::string MessageHeader(bool is_error); |
220 | 223 |
221 const bool error_on_unknown_field_; | 224 const bool error_on_unknown_field_; |
222 const bool error_on_wrong_recommended_; | 225 const bool error_on_wrong_recommended_; |
(...skipping 10 matching lines...) Expand all Loading... |
233 // function ValidateAndRepairObject. | 236 // function ValidateAndRepairObject. |
234 bool error_or_warning_found_; | 237 bool error_or_warning_found_; |
235 | 238 |
236 DISALLOW_COPY_AND_ASSIGN(Validator); | 239 DISALLOW_COPY_AND_ASSIGN(Validator); |
237 }; | 240 }; |
238 | 241 |
239 } // namespace onc | 242 } // namespace onc |
240 } // namespace chromeos | 243 } // namespace chromeos |
241 | 244 |
242 #endif // CHROMEOS_NETWORK_ONC_ONC_VALIDATOR_H_ | 245 #endif // CHROMEOS_NETWORK_ONC_ONC_VALIDATOR_H_ |
OLD | NEW |