Chromium Code Reviews| 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 <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 76 const OncValueSignature& signature, | 76 const OncValueSignature& signature, |
| 77 const StringSubstitution& substitution, | 77 const StringSubstitution& substitution, |
| 78 base::DictionaryValue* onc_object); | 78 base::DictionaryValue* onc_object); |
| 79 | 79 |
| 80 // Replaces expandable fields in the networks of |network_configs|, which must | 80 // Replaces expandable fields in the networks of |network_configs|, which must |
| 81 // be a list of ONC NetworkConfigurations. See ExpandStringsInOncObject above. | 81 // be a list of ONC NetworkConfigurations. See ExpandStringsInOncObject above. |
| 82 CHROMEOS_EXPORT void ExpandStringsInNetworks( | 82 CHROMEOS_EXPORT void ExpandStringsInNetworks( |
| 83 const StringSubstitution& substitution, | 83 const StringSubstitution& substitution, |
| 84 base::ListValue* network_configs); | 84 base::ListValue* network_configs); |
| 85 | 85 |
| 86 // If the UTF-8 encoded SSID field is set, but HexSSID is not, this function | |
|
pneubeck (no reviews)
2014/11/26 10:15:34
The encoding _in_ the SSID field doesn't matter. T
cschuet (SLOW)
2014/11/27 11:03:58
Done.
| |
| 87 // converts the contents of the SSID field to a hex representation and assigns | |
| 88 // the value to HexSSID. | |
| 89 CHROMEOS_EXPORT void FillInHexSSIDField(base::DictionaryValue* wifi_fields); | |
| 90 | |
| 86 // Creates a copy of |onc_object| with all values of sensitive fields replaced | 91 // Creates a copy of |onc_object| with all values of sensitive fields replaced |
| 87 // by |mask|. To find sensitive fields, signature and field name are checked | 92 // by |mask|. To find sensitive fields, signature and field name are checked |
| 88 // with the function FieldIsCredential(). | 93 // with the function FieldIsCredential(). |
| 89 CHROMEOS_EXPORT scoped_ptr<base::DictionaryValue> MaskCredentialsInOncObject( | 94 CHROMEOS_EXPORT scoped_ptr<base::DictionaryValue> MaskCredentialsInOncObject( |
| 90 const OncValueSignature& signature, | 95 const OncValueSignature& signature, |
| 91 const base::DictionaryValue& onc_object, | 96 const base::DictionaryValue& onc_object, |
| 92 const std::string& mask); | 97 const std::string& mask); |
| 93 | 98 |
| 94 // Decrypts |onc_blob| with |passphrase| if necessary. Clears |network_configs|, | 99 // Decrypts |onc_blob| with |passphrase| if necessary. Clears |network_configs|, |
| 95 // |global_network_config| and |certificates| and fills them with the validated | 100 // |global_network_config| and |certificates| and fills them with the validated |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 131 const std::string& type); | 136 const std::string& type); |
| 132 | 137 |
| 133 // Returns true if |property_key| is a recommended value in the ONC dictionary. | 138 // Returns true if |property_key| is a recommended value in the ONC dictionary. |
| 134 CHROMEOS_EXPORT bool IsRecommendedValue(const base::DictionaryValue* onc, | 139 CHROMEOS_EXPORT bool IsRecommendedValue(const base::DictionaryValue* onc, |
| 135 const std::string& property_key); | 140 const std::string& property_key); |
| 136 | 141 |
| 137 } // namespace onc | 142 } // namespace onc |
| 138 } // namespace chromeos | 143 } // namespace chromeos |
| 139 | 144 |
| 140 #endif // CHROMEOS_NETWORK_ONC_ONC_UTILS_H_ | 145 #endif // CHROMEOS_NETWORK_ONC_ONC_UTILS_H_ |
| OLD | NEW |