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

Side by Side Diff: chromeos/network/onc/onc_validator.h

Issue 13957012: Adding a NetworkProfileHandler used by ManagedNetworkConfigurationHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 7 months 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 | Annotate | Revision Log
« no previous file with comments | « chromeos/network/network_profile_observer.h ('k') | chromeos/network/onc/onc_validator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
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, 213 bool FieldExistsAndIsEmpty(const base::DictionaryValue& object,
214 const std::string& field_name); 214 const std::string& field_name);
215 215
216 bool RequireField(const base::DictionaryValue& dict, const std::string& key); 216 bool RequireField(const base::DictionaryValue& dict, const std::string& key);
217 217
218 bool CertPatternInDevicePolicy(const std::string& cert_type); 218 bool CertPatternInDevicePolicy(const std::string& cert_type);
219 219
220 std::string WarningHeader(); 220 std::string MessageHeader();
221 std::string ErrorHeader();
222 std::string MessageHeader(bool is_error);
223 221
224 const bool error_on_unknown_field_; 222 const bool error_on_unknown_field_;
225 const bool error_on_wrong_recommended_; 223 const bool error_on_wrong_recommended_;
226 const bool error_on_missing_field_; 224 const bool error_on_missing_field_;
227 const bool managed_onc_; 225 const bool managed_onc_;
228 226
229 ONCSource onc_source_; 227 ONCSource onc_source_;
230 228
231 // The path of field names and indices to the current value. Indices 229 // The path of field names and indices to the current value. Indices
232 // are stored as strings in decimal notation. 230 // are stored as strings in decimal notation.
233 std::vector<std::string> path_; 231 std::vector<std::string> path_;
234 232
235 // Tracks if an error or warning occurred within validation initiated by 233 // Tracks if an error or warning occurred within validation initiated by
236 // function ValidateAndRepairObject. 234 // function ValidateAndRepairObject.
237 bool error_or_warning_found_; 235 bool error_or_warning_found_;
238 236
239 DISALLOW_COPY_AND_ASSIGN(Validator); 237 DISALLOW_COPY_AND_ASSIGN(Validator);
240 }; 238 };
241 239
242 } // namespace onc 240 } // namespace onc
243 } // namespace chromeos 241 } // namespace chromeos
244 242
245 #endif // CHROMEOS_NETWORK_ONC_ONC_VALIDATOR_H_ 243 #endif // CHROMEOS_NETWORK_ONC_ONC_VALIDATOR_H_
OLDNEW
« no previous file with comments | « chromeos/network/network_profile_observer.h ('k') | chromeos/network/onc/onc_validator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698