Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(500)

Unified Diff: chromeos/network/network_state.h

Issue 2919683002: Treat tethered networks as mobile networks (Closed)
Patch Set: Clean up code Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/settings/about_handler.cc ('k') | chromeos/network/network_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/network_state.h
diff --git a/chromeos/network/network_state.h b/chromeos/network/network_state.h
index d43c56273e7c02f1a7947d0889342e8f00777698..18dba0417f01551c6e1eebfd9da047e773ab7b50 100644
--- a/chromeos/network/network_state.h
+++ b/chromeos/network/network_state.h
@@ -100,6 +100,7 @@ class CHROMEOS_EXPORT NetworkState : public ManagedState {
const std::string& roaming() const { return roaming_; }
const std::string& payment_url() const { return payment_url_; }
bool cellular_out_of_credits() const { return cellular_out_of_credits_; }
+ const std::string& tethering_state() const { return tethering_state_; }
// VPN property accessors
const std::string& vpn_provider_type() const { return vpn_provider_type_; }
@@ -123,6 +124,9 @@ class CHROMEOS_EXPORT NetworkState : public ManagedState {
const std::string& tether_guid() const { return tether_guid_; }
void set_tether_guid(const std::string& guid) { tether_guid_ = guid; }
+ // Returns true if current connection is using mobile data.
+ bool IsUsingMobileData() const;
+
// Returns true if the network securty is WEP_8021x (Dynamic WEP)
bool IsDynamicWep() const;
@@ -226,6 +230,7 @@ class CHROMEOS_EXPORT NetworkState : public ManagedState {
std::string roaming_;
std::string payment_url_;
bool cellular_out_of_credits_ = false;
+ std::string tethering_state_;
// VPN properties, used to construct the display name and to show the correct
// configuration dialog.
@@ -235,6 +240,7 @@ class CHROMEOS_EXPORT NetworkState : public ManagedState {
// Tether properties.
std::string carrier_;
int battery_percentage_;
+
// Whether the current device has already connected to the tether host device
// providing the hotspot corresponding to this NetworkState.
// Note: this means that the current device has already connected to the
« no previous file with comments | « chrome/browser/ui/webui/settings/about_handler.cc ('k') | chromeos/network/network_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698