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_NETWORK_STATE_H_ | 5 #ifndef CHROMEOS_NETWORK_NETWORK_STATE_H_ |
6 #define CHROMEOS_NETWORK_NETWORK_STATE_H_ | 6 #define CHROMEOS_NETWORK_NETWORK_STATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 // key. | 102 // key. |
103 static std::string IPConfigProperty(const char* key); | 103 static std::string IPConfigProperty(const char* key); |
104 | 104 |
105 // Sets |out| to the UIData specified by |value|. Returns true if successfully | 105 // Sets |out| to the UIData specified by |value|. Returns true if successfully |
106 // parsed. | 106 // parsed. |
107 static bool GetUIDataFromValue(const base::Value& value, NetworkUIData* out); | 107 static bool GetUIDataFromValue(const base::Value& value, NetworkUIData* out); |
108 | 108 |
109 // Generates a name from properties."Wifi.HexSSID" if present, otherwise | 109 // Generates a name from properties."Wifi.HexSSID" if present, otherwise |
110 // validates properties.Name and returns a valid utf8 version. | 110 // validates properties.Name and returns a valid utf8 version. |
111 static std::string GetNameFromProperties( | 111 static std::string GetNameFromProperties( |
| 112 const std::string& service_path, |
112 const base::DictionaryValue& properties); | 113 const base::DictionaryValue& properties); |
113 | 114 |
114 private: | 115 private: |
115 friend class NetworkStateHandler; | 116 friend class NetworkStateHandler; |
116 friend class NetworkChangeNotifierChromeosUpdateTest; | 117 friend class NetworkChangeNotifierChromeosUpdateTest; |
117 | 118 |
118 // Updates |name_| from WiFi.HexSSID if provided, and validates |name_|. | 119 // Updates |name_| from WiFi.HexSSID if provided, and validates |name_|. |
119 // Returns true if |name_| changes. | 120 // Returns true if |name_| changes. |
120 bool UpdateName(const base::DictionaryValue& properties); | 121 bool UpdateName(const base::DictionaryValue& properties); |
121 | 122 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 // Whether a deprecated CaCertNSS property of this network is set. Required | 162 // Whether a deprecated CaCertNSS property of this network is set. Required |
162 // for migration to PEM. | 163 // for migration to PEM. |
163 bool has_ca_cert_nss_; | 164 bool has_ca_cert_nss_; |
164 | 165 |
165 DISALLOW_COPY_AND_ASSIGN(NetworkState); | 166 DISALLOW_COPY_AND_ASSIGN(NetworkState); |
166 }; | 167 }; |
167 | 168 |
168 } // namespace chromeos | 169 } // namespace chromeos |
169 | 170 |
170 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_ | 171 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_ |
OLD | NEW |