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 #include "chromeos/network/onc/onc_validator.h" | 5 #include "chromeos/network/onc/onc_validator.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 } else if (&signature == &kGlobalNetworkConfigurationSignature) { | 122 } else if (&signature == &kGlobalNetworkConfigurationSignature) { |
123 valid = ValidateGlobalNetworkConfiguration(repaired.get()); | 123 valid = ValidateGlobalNetworkConfiguration(repaired.get()); |
124 } else if (&signature == &kProxySettingsSignature) { | 124 } else if (&signature == &kProxySettingsSignature) { |
125 valid = ValidateProxySettings(repaired.get()); | 125 valid = ValidateProxySettings(repaired.get()); |
126 } else if (&signature == &kProxyLocationSignature) { | 126 } else if (&signature == &kProxyLocationSignature) { |
127 valid = ValidateProxyLocation(repaired.get()); | 127 valid = ValidateProxyLocation(repaired.get()); |
128 } else if (&signature == &kEAPSignature) { | 128 } else if (&signature == &kEAPSignature) { |
129 valid = ValidateEAP(repaired.get()); | 129 valid = ValidateEAP(repaired.get()); |
130 } else if (&signature == &kCertificateSignature) { | 130 } else if (&signature == &kCertificateSignature) { |
131 valid = ValidateCertificate(repaired.get()); | 131 valid = ValidateCertificate(repaired.get()); |
132 } else if (&signature == &kTetherSignature) { | 132 } else if (&signature == &kTetherWithStateSignature) { |
133 valid = ValidateTether(repaired.get()); | 133 valid = ValidateTether(repaired.get()); |
134 } | 134 } |
135 } | 135 } |
136 | 136 |
137 if (valid) | 137 if (valid) |
138 return repaired; | 138 return repaired; |
139 | 139 |
140 DCHECK(error_or_warning_found_); | 140 DCHECK(error_or_warning_found_); |
141 error_or_warning_found_ = *error = true; | 141 error_or_warning_found_ = *error = true; |
142 return std::unique_ptr<base::DictionaryValue>(); | 142 return std::unique_ptr<base::DictionaryValue>(); |
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1053 } | 1053 } |
1054 | 1054 |
1055 std::string Validator::MessageHeader() { | 1055 std::string Validator::MessageHeader() { |
1056 std::string path = path_.empty() ? "toplevel" : base::JoinString(path_, "."); | 1056 std::string path = path_.empty() ? "toplevel" : base::JoinString(path_, "."); |
1057 std::string message = "At " + path + ": "; | 1057 std::string message = "At " + path + ": "; |
1058 return message; | 1058 return message; |
1059 } | 1059 } |
1060 | 1060 |
1061 } // namespace onc | 1061 } // namespace onc |
1062 } // namespace chromeos | 1062 } // namespace chromeos |
OLD | NEW |