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

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

Issue 759663004: ONC: add support for non-utf-8 SSIDs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed issues Created 6 years 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
« no previous file with comments | « chromeos/network/onc/onc_utils.cc ('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 <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 const std::vector<const char*>& valid_values); 175 const std::vector<const char*>& valid_values);
176 176
177 bool FieldExistsAndIsNotInRange(const base::DictionaryValue& object, 177 bool FieldExistsAndIsNotInRange(const base::DictionaryValue& object,
178 const std::string &field_name, 178 const std::string &field_name,
179 int lower_bound, 179 int lower_bound,
180 int upper_bound); 180 int upper_bound);
181 181
182 bool FieldExistsAndIsEmpty(const base::DictionaryValue& object, 182 bool FieldExistsAndIsEmpty(const base::DictionaryValue& object,
183 const std::string& field_name); 183 const std::string& field_name);
184 184
185 bool IsSSIDOrHexSSIDValid(const base::DictionaryValue& object);
186
185 // Returns true if |key| is a key of |dict|. Otherwise, returns false and, 187 // Returns true if |key| is a key of |dict|. Otherwise, returns false and,
186 // depending on |error_on_missing_field_|, logs a message and sets 188 // depending on |error_on_missing_field_|, logs a message and sets
187 // |error_or_warning_found_|. 189 // |error_or_warning_found_|.
188 bool RequireField(const base::DictionaryValue& dict, const std::string& key); 190 bool RequireField(const base::DictionaryValue& dict, const std::string& key);
189 191
190 // Returns true if the GUID is unique or if the GUID is not a string 192 // Returns true if the GUID is unique or if the GUID is not a string
191 // and false otherwise. The function also adds the GUID to a set in 193 // and false otherwise. The function also adds the GUID to a set in
192 // order to identify duplicates. 194 // order to identify duplicates.
193 bool CheckGuidIsUniqueAndAddToSet(const base::DictionaryValue& dict, 195 bool CheckGuidIsUniqueAndAddToSet(const base::DictionaryValue& dict,
194 const std::string& kGUID, 196 const std::string& kGUID,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 // function ValidateAndRepairObject. 229 // function ValidateAndRepairObject.
228 bool error_or_warning_found_; 230 bool error_or_warning_found_;
229 231
230 DISALLOW_COPY_AND_ASSIGN(Validator); 232 DISALLOW_COPY_AND_ASSIGN(Validator);
231 }; 233 };
232 234
233 } // namespace onc 235 } // namespace onc
234 } // namespace chromeos 236 } // namespace chromeos
235 237
236 #endif // CHROMEOS_NETWORK_ONC_ONC_VALIDATOR_H_ 238 #endif // CHROMEOS_NETWORK_ONC_ONC_VALIDATOR_H_
OLDNEW
« no previous file with comments | « chromeos/network/onc/onc_utils.cc ('k') | chromeos/network/onc/onc_validator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698