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

Unified Diff: chromeos/network/onc/onc_validator.h

Issue 166903002: Identify and repair ONC files with duplicate GUIDs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Issue_23567011
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chromeos/network/onc/onc_validator.cc » ('j') | chromeos/network/onc/onc_validator.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/onc/onc_validator.h
diff --git a/chromeos/network/onc/onc_validator.h b/chromeos/network/onc/onc_validator.h
index 8d8efeeb47b125d97457cee2d639580b78a23a0c..47dd0698718817305d4b8a4bb3ee3b3d66674575 100644
--- a/chromeos/network/onc/onc_validator.h
+++ b/chromeos/network/onc/onc_validator.h
@@ -5,6 +5,7 @@
#ifndef CHROMEOS_NETWORK_ONC_ONC_VALIDATOR_H_
#define CHROMEOS_NETWORK_ONC_ONC_VALIDATOR_H_
+#include <set>
#include <string>
#include <vector>
@@ -174,6 +175,10 @@ class CHROMEOS_EXPORT Validator : public Mapper {
bool RequireField(const base::DictionaryValue& dict, const std::string& key);
+ bool VerifyGuidUniqueAndAddToHash(const base::DictionaryValue& dict,
pneubeck (no reviews) 2014/02/17 10:11:36 Hash -> Set ? Add a comment that explains when it
kaliamoorthi 2014/02/17 15:06:49 Done.
+ const std::string& kGUID,
+ std::set<std::string> *guids);
+
// Prohibit certificate patterns for device policy ONC so that an unmanaged
// user won't have a certificate presented for them involuntarily.
bool IsCertPatternInDevicePolicy(const std::string& cert_type);
@@ -195,6 +200,9 @@ class CHROMEOS_EXPORT Validator : public Mapper {
// are stored as strings in decimal notation.
std::vector<std::string> path_;
+ std::set<std::string> network_guids_;
pneubeck (no reviews) 2014/02/17 10:11:36 add comments like: Accumulates all network GUIDs
kaliamoorthi 2014/02/17 15:06:49 Done.
+ std::set<std::string> certificate_guids_;
+
// Tracks if an error or warning occurred within validation initiated by
// function ValidateAndRepairObject.
bool error_or_warning_found_;
« no previous file with comments | « no previous file | chromeos/network/onc/onc_validator.cc » ('j') | chromeos/network/onc/onc_validator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698