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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 105 const std::string& vpn_provider_type() const { return vpn_provider_type_; } | 105 const std::string& vpn_provider_type() const { return vpn_provider_type_; } |
| 106 const std::string& third_party_vpn_provider_extension_id() const { | 106 const std::string& third_party_vpn_provider_extension_id() const { |
| 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& tethering_state() const { return tethering_state_; } | |
| 116 void set_tethering_state(std::string tethering_state) { | |
| 117 tethering_state_ = tethering_state; | |
| 118 } | |
|
stevenjb
2017/06/01 16:03:36
1. We shouldn't need a setter for this.
2. "tether
weidongg
2017/06/01 18:14:29
Aha, that's much cleaner. Thanks. BTW, does it mea
stevenjb
2017/06/01 20:03:00
They are different things. You can still connect t
| |
| 115 const std::string& carrier() const { return carrier_; } | 119 const std::string& carrier() const { return carrier_; } |
| 116 void set_carrier(const std::string& carrier) { carrier_ = carrier; } | 120 void set_carrier(const std::string& carrier) { carrier_ = carrier; } |
| 117 bool tether_has_connected_to_host() const { | 121 bool tether_has_connected_to_host() const { |
| 118 return tether_has_connected_to_host_; | 122 return tether_has_connected_to_host_; |
| 119 } | 123 } |
| 120 void set_tether_has_connected_to_host(bool tether_has_connected_to_host) { | 124 void set_tether_has_connected_to_host(bool tether_has_connected_to_host) { |
| 121 tether_has_connected_to_host_ = tether_has_connected_to_host; | 125 tether_has_connected_to_host_ = tether_has_connected_to_host; |
| 122 } | 126 } |
| 123 const std::string& tether_guid() const { return tether_guid_; } | 127 const std::string& tether_guid() const { return tether_guid_; } |
| 124 void set_tether_guid(const std::string& guid) { tether_guid_ = guid; } | 128 void set_tether_guid(const std::string& guid) { tether_guid_ = guid; } |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 228 bool cellular_out_of_credits_ = false; | 232 bool cellular_out_of_credits_ = false; |
| 229 | 233 |
| 230 // VPN properties, used to construct the display name and to show the correct | 234 // VPN properties, used to construct the display name and to show the correct |
| 231 // configuration dialog. | 235 // configuration dialog. |
| 232 std::string vpn_provider_type_; | 236 std::string vpn_provider_type_; |
| 233 std::string third_party_vpn_provider_extension_id_; | 237 std::string third_party_vpn_provider_extension_id_; |
| 234 | 238 |
| 235 // Tether properties. | 239 // Tether properties. |
| 236 std::string carrier_; | 240 std::string carrier_; |
| 237 int battery_percentage_; | 241 int battery_percentage_; |
| 242 std::string tethering_state_; | |
|
stevenjb
2017/06/01 16:03:36
Blank line here (but also move this after line 232
weidongg
2017/06/01 18:14:29
Done.
| |
| 238 // Whether the current device has already connected to the tether host device | 243 // Whether the current device has already connected to the tether host device |
| 239 // providing the hotspot corresponding to this NetworkState. | 244 // providing the hotspot corresponding to this NetworkState. |
| 240 // Note: this means that the current device has already connected to the | 245 // 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 | 246 // tether host, but it does not necessarily mean that the current device has |
| 242 // connected to the Tether network corresponding to this NetworkState. | 247 // connected to the Tether network corresponding to this NetworkState. |
| 243 bool tether_has_connected_to_host_; | 248 bool tether_has_connected_to_host_; |
| 244 | 249 |
| 245 // TODO(pneubeck): Remove this once (Managed)NetworkConfigurationHandler | 250 // TODO(pneubeck): Remove this once (Managed)NetworkConfigurationHandler |
| 246 // provides proxy configuration. crbug.com/241775 | 251 // provides proxy configuration. crbug.com/241775 |
| 247 base::DictionaryValue proxy_config_; | 252 base::DictionaryValue proxy_config_; |
| 248 | 253 |
| 249 DISALLOW_COPY_AND_ASSIGN(NetworkState); | 254 DISALLOW_COPY_AND_ASSIGN(NetworkState); |
| 250 }; | 255 }; |
| 251 | 256 |
| 252 } // namespace chromeos | 257 } // namespace chromeos |
| 253 | 258 |
| 254 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_ | 259 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_ |
| OLD | NEW |