| Index: chromeos/network/network_state.h
|
| diff --git a/chromeos/network/network_state.h b/chromeos/network/network_state.h
|
| index 17fa58bca8c2fbbbbeb12571011ad68fe5bbca0e..5ed132f8205914023cf13f629a3429afd5a5c253 100644
|
| --- a/chromeos/network/network_state.h
|
| +++ b/chromeos/network/network_state.h
|
| @@ -10,6 +10,7 @@
|
| #include <string>
|
| #include <vector>
|
|
|
| +#include "base/gtest_prod_util.h"
|
| #include "base/macros.h"
|
| #include "base/values.h"
|
| #include "chromeos/network/managed_state.h"
|
| @@ -81,6 +82,12 @@ class CHROMEOS_EXPORT NetworkState : public ManagedState {
|
| bool connectable() const { return connectable_; }
|
| bool is_captive_portal() const { return is_captive_portal_; }
|
| int signal_strength() const { return signal_strength_; }
|
| + // For Wi-Fi, WiMAX, and cellular networks, signal strength is set via updates
|
| + // from Shill, so SetSignalStrength() should not be called in those cases. For
|
| + // tether networks, the signal strength is received as a message from the
|
| + // tether host over Bluetooth, so it must be set via SetSignalStrength()
|
| + // since it does not come from Shill.
|
| + void SetTetherSignalStrength(int signal_strength);
|
|
|
| // Wifi property accessors
|
| const std::string& eap_method() const { return eap_method_; }
|
| @@ -102,6 +109,11 @@ class CHROMEOS_EXPORT NetworkState : public ManagedState {
|
| return third_party_vpn_provider_extension_id_;
|
| }
|
|
|
| + // Tether accessors and setters.
|
| + int battery_percentage() const { return battery_percentage_; }
|
| + void SetBatteryPercentage(int battery_percentage);
|
| + const std::string& carrier() const { return carrier_; }
|
| + void SetCarrier(const std::string& carrier);
|
| const std::string& tether_guid() const { return tether_guid_; }
|
| void set_tether_guid(const std::string& guid) { tether_guid_ = guid; }
|
|
|
| @@ -153,6 +165,7 @@ class CHROMEOS_EXPORT NetworkState : public ManagedState {
|
| friend class MobileActivatorTest;
|
| friend class NetworkStateHandler;
|
| friend class NetworkChangeNotifierChromeosUpdateTest;
|
| + FRIEND_TEST_ALL_PREFIXES(NetworkStateTest, TetherProperties);
|
|
|
| // Updates |name_| from WiFi.HexSSID if provided, and validates |name_|.
|
| // Returns true if |name_| changes.
|
| @@ -213,6 +226,10 @@ class CHROMEOS_EXPORT NetworkState : public ManagedState {
|
| std::string vpn_provider_type_;
|
| std::string third_party_vpn_provider_extension_id_;
|
|
|
| + // Tether properties.
|
| + std::string carrier_;
|
| + int battery_percentage_;
|
| +
|
| // TODO(pneubeck): Remove this once (Managed)NetworkConfigurationHandler
|
| // provides proxy configuration. crbug.com/241775
|
| base::DictionaryValue proxy_config_;
|
|
|