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

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

Issue 12676017: Adding policy support to the new network configuration stack. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed clang errors. Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chromeos/network/onc/onc_translation_tables.cc ('k') | chromeos/network/onc/onc_utils.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 CHROMEOS_NETWORK_ONC_ONC_UTILS_H_ 5 #ifndef CHROMEOS_NETWORK_ONC_ONC_UTILS_H_
6 #define CHROMEOS_NETWORK_ONC_ONC_UTILS_H_ 6 #define CHROMEOS_NETWORK_ONC_ONC_UTILS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "chromeos/chromeos_export.h" 12 #include "chromeos/chromeos_export.h"
13 #include "chromeos/network/onc/onc_constants.h" 13 #include "chromeos/network/onc/onc_constants.h"
14 #include "chromeos/network/onc/onc_signature.h"
15 14
16 namespace base { 15 namespace base {
17 class DictionaryValue; 16 class DictionaryValue;
18 } 17 }
19 18
20 namespace chromeos { 19 namespace chromeos {
21 namespace onc { 20 namespace onc {
22 21
22 struct OncValueSignature;
23
23 // A valid but empty (no networks and no certificates) and unencrypted 24 // A valid but empty (no networks and no certificates) and unencrypted
24 // configuration. 25 // configuration.
25 CHROMEOS_EXPORT extern const char kEmptyUnencryptedConfiguration[]; 26 CHROMEOS_EXPORT extern const char kEmptyUnencryptedConfiguration[];
26 27
27 // Parses |json| according to the JSON format. If |json| is a JSON formatted 28 // Parses |json| according to the JSON format. If |json| is a JSON formatted
28 // dictionary, the function returns the dictionary as a DictionaryValue. 29 // dictionary, the function returns the dictionary as a DictionaryValue.
29 // Otherwise returns NULL. 30 // Otherwise returns NULL.
30 CHROMEOS_EXPORT scoped_ptr<base::DictionaryValue> ReadDictionaryFromJson( 31 CHROMEOS_EXPORT scoped_ptr<base::DictionaryValue> ReadDictionaryFromJson(
31 const std::string& json); 32 const std::string& json);
32 33
(...skipping 28 matching lines...) Expand all
61 // expanded. The replacement strings are obtained from |substitution|. 62 // expanded. The replacement strings are obtained from |substitution|.
62 CHROMEOS_EXPORT void ExpandStringsInOncObject( 63 CHROMEOS_EXPORT void ExpandStringsInOncObject(
63 const OncValueSignature& signature, 64 const OncValueSignature& signature,
64 const StringSubstitution& substitution, 65 const StringSubstitution& substitution,
65 base::DictionaryValue* onc_object); 66 base::DictionaryValue* onc_object);
66 67
67 // Creates a copy of |onc_object| with all values of sensitive fields replaced 68 // Creates a copy of |onc_object| with all values of sensitive fields replaced
68 // by |mask|. To find sensitive fields, signature and field name are checked 69 // by |mask|. To find sensitive fields, signature and field name are checked
69 // with the function FieldIsCredential(). 70 // with the function FieldIsCredential().
70 CHROMEOS_EXPORT scoped_ptr<base::DictionaryValue> MaskCredentialsInOncObject( 71 CHROMEOS_EXPORT scoped_ptr<base::DictionaryValue> MaskCredentialsInOncObject(
71 const onc::OncValueSignature& signature, 72 const OncValueSignature& signature,
72 const base::DictionaryValue& onc_object, 73 const base::DictionaryValue& onc_object,
73 const std::string& mask); 74 const std::string& mask);
74 75
75 } // namespace onc 76 } // namespace onc
76 } // namespace chromeos 77 } // namespace chromeos
77 78
78 #endif // CHROMEOS_NETWORK_ONC_ONC_UTILS_H_ 79 #endif // CHROMEOS_NETWORK_ONC_ONC_UTILS_H_
OLDNEW
« no previous file with comments | « chromeos/network/onc/onc_translation_tables.cc ('k') | chromeos/network/onc/onc_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698