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

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

Issue 2828713002: Enable client certificate patterns in device ONC policy (Closed)
Patch Set: Addressed comments - more DCHECKs, use PostTask..WithReply in client_cert_resolver.cc. Created 3 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
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 <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
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
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_
OLDNEW
« no previous file with comments | « chromeos/network/network_connection_handler_unittest.cc ('k') | chromeos/network/onc/onc_validator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698