Chromium Code Reviews| 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 has_connected_as_tether_client() const { | |
| 118 return has_connected_as_tether_client_; | |
| 119 } | |
| 120 void set_has_connected_as_tether_client(bool has_connected_as_tether_client) { | |
| 121 has_connected_as_tether_client_ = has_connected_as_tether_client; | |
| 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 bool has_connected_as_tether_client_; | |
|
stevenjb
2017/04/27 19:28:53
This should be documented because the name is kind
Kyle Horimoto
2017/04/27 19:40:23
Added explanation. The reason why I chose a slight
stevenjb
2017/04/27 19:45:52
How about tether_has_connected_to_host?
Kyle Horimoto
2017/04/27 19:51:49
Done.
| |
| 232 | 239 |
| 233 // TODO(pneubeck): Remove this once (Managed)NetworkConfigurationHandler | 240 // TODO(pneubeck): Remove this once (Managed)NetworkConfigurationHandler |
| 234 // provides proxy configuration. crbug.com/241775 | 241 // provides proxy configuration. crbug.com/241775 |
| 235 base::DictionaryValue proxy_config_; | 242 base::DictionaryValue proxy_config_; |
| 236 | 243 |
| 237 DISALLOW_COPY_AND_ASSIGN(NetworkState); | 244 DISALLOW_COPY_AND_ASSIGN(NetworkState); |
| 238 }; | 245 }; |
| 239 | 246 |
| 240 } // namespace chromeos | 247 } // namespace chromeos |
| 241 | 248 |
| 242 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_ | 249 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_ |
| OLD | NEW |