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_HANDLER_H_ | 5 #ifndef CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_ |
6 #define CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_ | 6 #define CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 // When the properties are received, NetworkPropertiesUpdated will be | 184 // When the properties are received, NetworkPropertiesUpdated will be |
185 // signaled for each member of |observers_|, regardless of whether any | 185 // signaled for each member of |observers_|, regardless of whether any |
186 // properties actually changed. | 186 // properties actually changed. |
187 bool RequestUpdateForNetwork(const std::string& service_path); | 187 bool RequestUpdateForNetwork(const std::string& service_path); |
188 | 188 |
189 // Request an update for all existing NetworkState entries, e.g. after | 189 // Request an update for all existing NetworkState entries, e.g. after |
190 // loading an ONC configuration file that may have updated one or more | 190 // loading an ONC configuration file that may have updated one or more |
191 // existing networks. | 191 // existing networks. |
192 void RequestUpdateForAllNetworks(); | 192 void RequestUpdateForAllNetworks(); |
193 | 193 |
194 // Set the user initiated connecting network. | |
195 void SetConnectingNetwork(const std::string& service_path); | |
196 | |
197 // Set the list of devices on which portal check is enabled. | 194 // Set the list of devices on which portal check is enabled. |
198 void SetCheckPortalList(const std::string& check_portal_list); | 195 void SetCheckPortalList(const std::string& check_portal_list); |
199 | 196 |
200 const std::string& connecting_network() const { return connecting_network_; } | |
201 const std::string& check_portal_list() const { return check_portal_list_; } | 197 const std::string& check_portal_list() const { return check_portal_list_; } |
202 | 198 |
203 // Generates a DictionaryValue of all NetworkState properties. Currently | 199 // Generates a DictionaryValue of all NetworkState properties. Currently |
204 // provided for debugging purposes only. | 200 // provided for debugging purposes only. |
205 void GetNetworkStatePropertiesForTest( | 201 void GetNetworkStatePropertiesForTest( |
206 base::DictionaryValue* dictionary) const; | 202 base::DictionaryValue* dictionary) const; |
207 | 203 |
208 // Construct and initialize an instance for testing. | 204 // Construct and initialize an instance for testing. |
209 static NetworkStateHandler* InitializeForTest(); | 205 static NetworkStateHandler* InitializeForTest(); |
210 | 206 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 // Manager.ServiceCompleteList, but only entries with a non-empty Profile | 321 // Manager.ServiceCompleteList, but only entries with a non-empty Profile |
326 // property are returned in GetFavoriteList(). | 322 // property are returned in GetFavoriteList(). |
327 ManagedStateList favorite_list_; | 323 ManagedStateList favorite_list_; |
328 | 324 |
329 // List of managed device states | 325 // List of managed device states |
330 ManagedStateList device_list_; | 326 ManagedStateList device_list_; |
331 | 327 |
332 // Keeps track of the default network for notifying observers when it changes. | 328 // Keeps track of the default network for notifying observers when it changes. |
333 std::string default_network_path_; | 329 std::string default_network_path_; |
334 | 330 |
335 // Convenience member to track the user initiated connecting network. Set | |
336 // externally when a connection is requested and cleared here when the state | |
337 // changes to something other than Connecting (after observers are notified). | |
338 // TODO(stevenjb): Move this to NetworkConfigurationHandler. | |
339 std::string connecting_network_; | |
340 | |
341 // List of interfaces on which portal check is enabled. | 331 // List of interfaces on which portal check is enabled. |
342 std::string check_portal_list_; | 332 std::string check_portal_list_; |
343 | 333 |
344 // Callbacks to run when a scan for the technology type completes. | 334 // Callbacks to run when a scan for the technology type completes. |
345 ScanCompleteCallbackMap scan_complete_callbacks_; | 335 ScanCompleteCallbackMap scan_complete_callbacks_; |
346 | 336 |
347 DISALLOW_COPY_AND_ASSIGN(NetworkStateHandler); | 337 DISALLOW_COPY_AND_ASSIGN(NetworkStateHandler); |
348 }; | 338 }; |
349 | 339 |
350 } // namespace chromeos | 340 } // namespace chromeos |
351 | 341 |
352 #endif // CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_ | 342 #endif // CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_ |
OLD | NEW |