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 // Returns whether the current device has already connected to the tether host | |
118 // device providing the hotspot corresponding to this NetworkState. | |
119 // Note: this means that the current device has already connected to the | |
120 // tether host, but it does not necessarily mean that the current device has | |
121 // connected to the Tether network corresponding to this NetworkState. | |
stevenjb
2017/04/27 19:45:52
Comment should be above the member.
Kyle Horimoto
2017/04/27 19:51:50
Done.
| |
122 bool has_connected_as_tether_client() const { | |
123 return has_connected_as_tether_client_; | |
124 } | |
125 void set_has_connected_as_tether_client(bool has_connected_as_tether_client) { | |
126 has_connected_as_tether_client_ = has_connected_as_tether_client; | |
127 } | |
117 const std::string& tether_guid() const { return tether_guid_; } | 128 const std::string& tether_guid() const { return tether_guid_; } |
118 void set_tether_guid(const std::string& guid) { tether_guid_ = guid; } | 129 void set_tether_guid(const std::string& guid) { tether_guid_ = guid; } |
119 | 130 |
120 // Returns true if the network securty is WEP_8021x (Dynamic WEP) | 131 // Returns true if the network securty is WEP_8021x (Dynamic WEP) |
121 bool IsDynamicWep() const; | 132 bool IsDynamicWep() const; |
122 | 133 |
123 // Returns true if |connection_state_| is a connected/connecting state. | 134 // Returns true if |connection_state_| is a connected/connecting state. |
124 bool IsConnectedState() const; | 135 bool IsConnectedState() const; |
125 bool IsConnectingState() const; | 136 bool IsConnectingState() const; |
126 | 137 |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
222 bool cellular_out_of_credits_ = false; | 233 bool cellular_out_of_credits_ = false; |
223 | 234 |
224 // VPN properties, used to construct the display name and to show the correct | 235 // VPN properties, used to construct the display name and to show the correct |
225 // configuration dialog. | 236 // configuration dialog. |
226 std::string vpn_provider_type_; | 237 std::string vpn_provider_type_; |
227 std::string third_party_vpn_provider_extension_id_; | 238 std::string third_party_vpn_provider_extension_id_; |
228 | 239 |
229 // Tether properties. | 240 // Tether properties. |
230 std::string carrier_; | 241 std::string carrier_; |
231 int battery_percentage_; | 242 int battery_percentage_; |
243 bool has_connected_as_tether_client_; | |
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 |