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

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

Issue 11299236: This moves the ONC parsing code into chromeos/network/onc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unit tests Created 8 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 | Annotate | Revision Log
« no previous file with comments | « chromeos/network/onc/onc_validator.h ('k') | chromeos/network/onc/onc_validator_unittest.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 #include "chrome/browser/chromeos/network_settings/onc_validator.h" 5 #include "chromeos/network/onc/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/onc_constants.h"
14 #include "chrome/browser/chromeos/network_settings/onc_signature.h" 14 #include "chromeos/network/onc/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
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
OLDNEW
« no previous file with comments | « chromeos/network/onc/onc_validator.h ('k') | chromeos/network/onc/onc_validator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698