| 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 "chrome/browser/chromeos/network_settings/onc_validator.h" | 5 #include "chromeos/network/onc_validator.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
| 12 #include "base/values.h" | 12 #include "base/values.h" |
| 13 #include "chrome/browser/chromeos/cros/onc_constants.h" | 13 #include "chromeos/network/onc_constants.h" |
| 14 #include "chrome/browser/chromeos/network_settings/onc_signature.h" | 14 #include "chromeos/network/onc_signature.h" |
| 15 | 15 |
| 16 namespace chromeos { | 16 namespace chromeos { |
| 17 namespace onc { | 17 namespace onc { |
| 18 | 18 |
| 19 Validator::Validator( | 19 Validator::Validator( |
| 20 bool error_on_unknown_field, | 20 bool error_on_unknown_field, |
| 21 bool error_on_wrong_recommended, | 21 bool error_on_wrong_recommended, |
| 22 bool error_on_missing_field, | 22 bool error_on_missing_field, |
| 23 bool managed_onc) | 23 bool managed_onc) |
| 24 : error_on_unknown_field_(error_on_unknown_field), | 24 : error_on_unknown_field_(error_on_unknown_field), |
| (...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 allRequiredExist &= RequireField(*result, kPKCS12); | 553 allRequiredExist &= RequireField(*result, kPKCS12); |
| 554 else if (type == kServer || type == kAuthority) | 554 else if (type == kServer || type == kAuthority) |
| 555 allRequiredExist &= RequireField(*result, kX509); | 555 allRequiredExist &= RequireField(*result, kX509); |
| 556 } | 556 } |
| 557 | 557 |
| 558 return !error_on_missing_field_ || allRequiredExist; | 558 return !error_on_missing_field_ || allRequiredExist; |
| 559 } | 559 } |
| 560 | 560 |
| 561 } // namespace onc | 561 } // namespace onc |
| 562 } // namespace chromeos | 562 } // namespace chromeos |
| OLD | NEW |