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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 return third_party_vpn_provider_extension_id_; | 107 return third_party_vpn_provider_extension_id_; |
108 } | 108 } |
109 | 109 |
110 // Tether accessors and setters. | 110 // Tether accessors and setters. |
111 int battery_percentage() const { return battery_percentage_; } | 111 int battery_percentage() const { return battery_percentage_; } |
112 void set_battery_percentage(int battery_percentage) { | 112 void set_battery_percentage(int battery_percentage) { |
113 battery_percentage_ = battery_percentage; | 113 battery_percentage_ = battery_percentage; |
114 } | 114 } |
115 const std::string& carrier() const { return carrier_; } | 115 const std::string& carrier() const { return carrier_; } |
116 void set_carrier(const std::string& carrier) { carrier_ = carrier; } | 116 void set_carrier(const std::string& carrier) { carrier_ = carrier; } |
| 117 bool tether_has_connected_to_host() const { |
| 118 return tether_has_connected_to_host_; |
| 119 } |
| 120 void set_tether_has_connected_to_host(bool tether_has_connected_to_host) { |
| 121 tether_has_connected_to_host_ = tether_has_connected_to_host; |
| 122 } |
117 const std::string& tether_guid() const { return tether_guid_; } | 123 const std::string& tether_guid() const { return tether_guid_; } |
118 void set_tether_guid(const std::string& guid) { tether_guid_ = guid; } | 124 void set_tether_guid(const std::string& guid) { tether_guid_ = guid; } |
119 | 125 |
120 // Returns true if the network securty is WEP_8021x (Dynamic WEP) | 126 // Returns true if the network securty is WEP_8021x (Dynamic WEP) |
121 bool IsDynamicWep() const; | 127 bool IsDynamicWep() const; |
122 | 128 |
123 // Returns true if |connection_state_| is a connected/connecting state. | 129 // Returns true if |connection_state_| is a connected/connecting state. |
124 bool IsConnectedState() const; | 130 bool IsConnectedState() const; |
125 bool IsConnectingState() const; | 131 bool IsConnectingState() const; |
126 | 132 |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 bool cellular_out_of_credits_ = false; | 228 bool cellular_out_of_credits_ = false; |
223 | 229 |
224 // VPN properties, used to construct the display name and to show the correct | 230 // VPN properties, used to construct the display name and to show the correct |
225 // configuration dialog. | 231 // configuration dialog. |
226 std::string vpn_provider_type_; | 232 std::string vpn_provider_type_; |
227 std::string third_party_vpn_provider_extension_id_; | 233 std::string third_party_vpn_provider_extension_id_; |
228 | 234 |
229 // Tether properties. | 235 // Tether properties. |
230 std::string carrier_; | 236 std::string carrier_; |
231 int battery_percentage_; | 237 int battery_percentage_; |
| 238 // Whether the current device has already connected to the tether host device |
| 239 // providing the hotspot corresponding to this NetworkState. |
| 240 // Note: this means that the current device has already connected to the |
| 241 // tether host, but it does not necessarily mean that the current device has |
| 242 // connected to the Tether network corresponding to this NetworkState. |
| 243 bool tether_has_connected_to_host_; |
232 | 244 |
233 // TODO(pneubeck): Remove this once (Managed)NetworkConfigurationHandler | 245 // TODO(pneubeck): Remove this once (Managed)NetworkConfigurationHandler |
234 // provides proxy configuration. crbug.com/241775 | 246 // provides proxy configuration. crbug.com/241775 |
235 base::DictionaryValue proxy_config_; | 247 base::DictionaryValue proxy_config_; |
236 | 248 |
237 DISALLOW_COPY_AND_ASSIGN(NetworkState); | 249 DISALLOW_COPY_AND_ASSIGN(NetworkState); |
238 }; | 250 }; |
239 | 251 |
240 } // namespace chromeos | 252 } // namespace chromeos |
241 | 253 |
242 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_ | 254 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_ |
OLD | NEW |