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

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

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_utils_unittest.cc ('k') | chromeos/network/onc/onc_validator.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 #ifndef CHROME_BROWSER_CHROMEOS_NETWORK_SETTINGS_ONC_VALIDATOR_H_ 5 #ifndef CHROMEOS_NETWORK_ONC_ONC_VALIDATOR_H_
6 #define CHROME_BROWSER_CHROMEOS_NETWORK_SETTINGS_ONC_VALIDATOR_H_ 6 #define CHROMEOS_NETWORK_ONC_ONC_VALIDATOR_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/browser/chromeos/network_settings/onc_mapper.h" 9 #include "chromeos/chromeos_export.h"
10 #include "chromeos/network/onc/onc_mapper.h"
10 11
11 namespace base { 12 namespace base {
12 class Value; 13 class Value;
13 class DictionaryValue; 14 class DictionaryValue;
14 } 15 }
15 16
16 namespace chromeos { 17 namespace chromeos {
17 namespace onc { 18 namespace onc {
18 19
19 struct OncValueSignature; 20 struct OncValueSignature;
20 21
21 class Validator : public Mapper { 22 class CHROMEOS_EXPORT Validator : public Mapper {
22 public: 23 public:
23 // Creates a Validator that searches for the following invalid cases: 24 // Creates a Validator that searches for the following invalid cases:
24 // - a field name is found that is not part of the signature 25 // - a field name is found that is not part of the signature
25 // (controlled by |error_on_unknown_field|) 26 // (controlled by |error_on_unknown_field|)
26 // 27 //
27 // - a kRecommended array contains a field name that is not part of the 28 // - a kRecommended array contains a field name that is not part of the
28 // enclosing object's signature or if that field is dictionary typed 29 // enclosing object's signature or if that field is dictionary typed
29 // (controlled by |error_on_wrong_recommended|) 30 // (controlled by |error_on_wrong_recommended|)
30 // 31 //
31 // - |managed_onc| is false and a field with name kRecommended is found 32 // - |managed_onc| is false and a field with name kRecommended is found
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 const bool error_on_wrong_recommended_; 143 const bool error_on_wrong_recommended_;
143 const bool error_on_missing_field_; 144 const bool error_on_missing_field_;
144 const bool managed_onc_; 145 const bool managed_onc_;
145 146
146 DISALLOW_COPY_AND_ASSIGN(Validator); 147 DISALLOW_COPY_AND_ASSIGN(Validator);
147 }; 148 };
148 149
149 } // namespace onc 150 } // namespace onc
150 } // namespace chromeos 151 } // namespace chromeos
151 152
152 #endif // CHROME_BROWSER_CHROMEOS_NETWORK_SETTINGS_ONC_VALIDATOR_H_ 153 #endif // CHROMEOS_NETWORK_ONC_ONC_VALIDATOR_H_
OLDNEW
« no previous file with comments | « chromeos/network/onc/onc_utils_unittest.cc ('k') | chromeos/network/onc/onc_validator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698