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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 // parsed. | 109 // parsed. |
110 static bool GetUIDataFromValue(const base::Value& value, NetworkUIData* out); | 110 static bool GetUIDataFromValue(const base::Value& value, NetworkUIData* out); |
111 | 111 |
112 // Generates a name from properties."Wifi.HexSSID" if present, otherwise | 112 // Generates a name from properties."Wifi.HexSSID" if present, otherwise |
113 // validates properties.Name and returns a valid utf8 version. | 113 // validates properties.Name and returns a valid utf8 version. |
114 static std::string GetNameFromProperties( | 114 static std::string GetNameFromProperties( |
115 const std::string& service_path, | 115 const std::string& service_path, |
116 const base::DictionaryValue& properties); | 116 const base::DictionaryValue& properties); |
117 | 117 |
118 private: | 118 private: |
| 119 friend class MobileActivatorTest; |
119 friend class NetworkStateHandler; | 120 friend class NetworkStateHandler; |
120 friend class NetworkChangeNotifierChromeosUpdateTest; | 121 friend class NetworkChangeNotifierChromeosUpdateTest; |
121 | 122 |
122 // Updates |name_| from WiFi.HexSSID if provided, and validates |name_|. | 123 // Updates |name_| from WiFi.HexSSID if provided, and validates |name_|. |
123 // Returns true if |name_| changes. | 124 // Returns true if |name_| changes. |
124 bool UpdateName(const base::DictionaryValue& properties); | 125 bool UpdateName(const base::DictionaryValue& properties); |
125 | 126 |
126 // TODO(gauravsh): Audit the list of properties that we are caching. We should | 127 // TODO(gauravsh): Audit the list of properties that we are caching. We should |
127 // only be doing this for commonly accessed properties. crbug.com/252553 | 128 // only be doing this for commonly accessed properties. crbug.com/252553 |
128 // Common Network Service properties | 129 // Common Network Service properties |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 // Whether a deprecated CaCertNSS property of this network is set. Required | 166 // Whether a deprecated CaCertNSS property of this network is set. Required |
166 // for migration to PEM. | 167 // for migration to PEM. |
167 bool has_ca_cert_nss_; | 168 bool has_ca_cert_nss_; |
168 | 169 |
169 DISALLOW_COPY_AND_ASSIGN(NetworkState); | 170 DISALLOW_COPY_AND_ASSIGN(NetworkState); |
170 }; | 171 }; |
171 | 172 |
172 } // namespace chromeos | 173 } // namespace chromeos |
173 | 174 |
174 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_ | 175 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_ |
OLD | NEW |