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

Unified Diff: chromeos/network/network_state.cc

Issue 2819383002: [CrOS Tether] Update NetworkState to include tether properties and integrate into NetworkStateHandl… (Closed)
Patch Set: stevenjb@ comment. Created 3 years, 8 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') | chromeos/network/network_state_handler.h » ('j') | 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 a20e22ca3c4881bac3b47ce599f6751fd72d90af..838faa0b3b8f1dfc9b6f01f6b71c7dc904403343 100644
--- a/chromeos/network/network_state.cc
+++ b/chromeos/network/network_state.cc
@@ -15,6 +15,7 @@
#include "chromeos/network/network_util.h"
#include "chromeos/network/onc/onc_utils.h"
#include "chromeos/network/shill_property_util.h"
+#include "chromeos/network/tether_constants.h"
#include "components/device_event_log/device_event_log.h"
#include "third_party/cros_system_api/dbus/service_constants.h"
@@ -261,6 +262,15 @@ void NetworkState::GetStateProperties(base::DictionaryValue* dictionary) const {
provider_property.release());
}
+ // Tether properties
+ if (NetworkTypePattern::Tether().MatchesType(type())) {
+ dictionary->SetIntegerWithoutPathExpansion(kTetherBatteryPercentage,
+ battery_percentage());
+ dictionary->SetStringWithoutPathExpansion(kTetherCarrier, carrier());
+ dictionary->SetIntegerWithoutPathExpansion(kTetherSignalStrength,
+ signal_strength());
+ }
+
// Wireless properties
if (!NetworkTypePattern::Wireless().MatchesType(type()))
return;
« no previous file with comments | « chromeos/network/network_state.h ('k') | chromeos/network/network_state_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698