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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
110 // parsed. | 110 // parsed. |
111 static bool GetUIDataFromValue(const base::Value& value, NetworkUIData* out); | 111 static bool GetUIDataFromValue(const base::Value& value, NetworkUIData* out); |
112 | 112 |
113 // Generates a name from properties."Wifi.HexSSID" if present, otherwise | 113 // Generates a name from properties."Wifi.HexSSID" if present, otherwise |
114 // validates properties.Name and returns a valid utf8 version. | 114 // validates properties.Name and returns a valid utf8 version. |
115 static std::string GetNameFromProperties( | 115 static std::string GetNameFromProperties( |
116 const std::string& service_path, | 116 const std::string& service_path, |
117 const base::DictionaryValue& properties); | 117 const base::DictionaryValue& properties); |
118 | 118 |
119 private: | 119 private: |
120 friend class MobileActivatorTest; | |
armansito
2013/08/14 00:49:51
I see the convenience of making this a friend but
stevenjb
2013/08/14 02:28:31
I personally prefer using 'friend' for tests and k
gauravsh
2013/08/14 21:42:29
In this particular case, it's needed to manually s
| |
120 friend class NetworkStateHandler; | 121 friend class NetworkStateHandler; |
121 friend class NetworkChangeNotifierChromeosUpdateTest; | 122 friend class NetworkChangeNotifierChromeosUpdateTest; |
122 | 123 |
123 // Updates |name_| from WiFi.HexSSID if provided, and validates |name_|. | 124 // Updates |name_| from WiFi.HexSSID if provided, and validates |name_|. |
124 // Returns true if |name_| changes. | 125 // Returns true if |name_| changes. |
125 bool UpdateName(const base::DictionaryValue& properties); | 126 bool UpdateName(const base::DictionaryValue& properties); |
126 | 127 |
127 // TODO(gauravsh): Audit the list of properties that we are caching. We should | 128 // TODO(gauravsh): Audit the list of properties that we are caching. We should |
128 // only be doing this for commonly accessed properties. crbug.com/252553 | 129 // only be doing this for commonly accessed properties. crbug.com/252553 |
129 // Common Network Service properties | 130 // Common Network Service properties |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
167 // Whether a deprecated CaCertNSS property of this network is set. Required | 168 // Whether a deprecated CaCertNSS property of this network is set. Required |
168 // for migration to PEM. | 169 // for migration to PEM. |
169 bool has_ca_cert_nss_; | 170 bool has_ca_cert_nss_; |
170 | 171 |
171 DISALLOW_COPY_AND_ASSIGN(NetworkState); | 172 DISALLOW_COPY_AND_ASSIGN(NetworkState); |
172 }; | 173 }; |
173 | 174 |
174 } // namespace chromeos | 175 } // namespace chromeos |
175 | 176 |
176 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_ | 177 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_ |
OLD | NEW |