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 #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 | 14 |
15 namespace base { | 15 namespace base { |
16 class DictionaryValue; | 16 class DictionaryValue; |
17 class ListValue; | |
17 } | 18 } |
18 | 19 |
19 namespace chromeos { | 20 namespace chromeos { |
20 namespace onc { | 21 namespace onc { |
21 | 22 |
22 struct OncValueSignature; | 23 struct OncValueSignature; |
23 | 24 |
24 // A valid but empty (no networks and no certificates) and unencrypted | 25 // A valid but empty (no networks and no certificates) and unencrypted |
25 // configuration. | 26 // configuration. |
26 CHROMEOS_EXPORT extern const char kEmptyUnencryptedConfiguration[]; | 27 CHROMEOS_EXPORT extern const char kEmptyUnencryptedConfiguration[]; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
66 base::DictionaryValue* onc_object); | 67 base::DictionaryValue* onc_object); |
67 | 68 |
68 // Creates a copy of |onc_object| with all values of sensitive fields replaced | 69 // Creates a copy of |onc_object| with all values of sensitive fields replaced |
69 // by |mask|. To find sensitive fields, signature and field name are checked | 70 // by |mask|. To find sensitive fields, signature and field name are checked |
70 // with the function FieldIsCredential(). | 71 // with the function FieldIsCredential(). |
71 CHROMEOS_EXPORT scoped_ptr<base::DictionaryValue> MaskCredentialsInOncObject( | 72 CHROMEOS_EXPORT scoped_ptr<base::DictionaryValue> MaskCredentialsInOncObject( |
72 const OncValueSignature& signature, | 73 const OncValueSignature& signature, |
73 const base::DictionaryValue& onc_object, | 74 const base::DictionaryValue& onc_object, |
74 const std::string& mask); | 75 const std::string& mask); |
75 | 76 |
77 CHROMEOS_EXPORT bool ParseAndValidateOncForImport( | |
78 const std::string& onc_blob, | |
79 chromeos::onc::ONCSource onc_source, | |
80 const std::string& passphrase, | |
81 scoped_ptr<base::ListValue>* network_configs, | |
82 scoped_ptr<base::ListValue>* certificates); | |
stevenjb
2013/04/22 16:53:41
Is there a reason we need to pass a scoped_ptr<>*
pneubeck (no reviews)
2013/04/23 18:05:25
Done.
| |
83 | |
84 | |
Joao da Silva
2013/04/22 10:38:09
nit: remove extra newline
pneubeck (no reviews)
2013/04/23 18:05:25
Done.
| |
76 } // namespace onc | 85 } // namespace onc |
77 } // namespace chromeos | 86 } // namespace chromeos |
78 | 87 |
79 #endif // CHROMEOS_NETWORK_ONC_ONC_UTILS_H_ | 88 #endif // CHROMEOS_NETWORK_ONC_ONC_UTILS_H_ |
OLD | NEW |