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

Unified Diff: chromeos/network/network_state.cc

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 | « chromeos/network/network_state.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/network_state.cc
diff --git a/chromeos/network/network_state.cc b/chromeos/network/network_state.cc
index dff74c4c3968a324842b1ae2bc6d4f602afa471c..8db653504654229489ed249b5a9afd47fc830e6f 100644
--- a/chromeos/network/network_state.cc
+++ b/chromeos/network/network_state.cc
@@ -201,6 +201,8 @@ bool NetworkState::PropertyChanged(const std::string& key,
vpn_provider_type_ = vpn_provider_type;
return true;
+ } else if (key == shill::kTetheringProperty) {
+ return GetStringValue(key, value, &tethering_state_);
}
return false;
}
@@ -364,6 +366,11 @@ void NetworkState::set_connection_state(const std::string connection_state) {
connection_state_ = connection_state;
}
+bool NetworkState::IsUsingMobileData() const {
+ return type() == shill::kTypeCellular || type() == chromeos::kTypeTether ||
+ tethering_state() == shill::kTetheringConfirmedState;
+}
+
bool NetworkState::IsDynamicWep() const {
return security_class_ == shill::kSecurityWep &&
eap_key_mgmt_ == shill::kKeyManagementIEEE8021X;
« no previous file with comments | « chromeos/network/network_state.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698