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

Unified Diff: chromeos/network/network_type_pattern.cc

Issue 2818593003: [CrOS Tether] Add tether network properties (battery percentage, carrier, and signal strength) to t… (Closed)
Patch Set: stevenjb@ comments. 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
Index: chromeos/network/network_type_pattern.cc
diff --git a/chromeos/network/network_type_pattern.cc b/chromeos/network/network_type_pattern.cc
index 9e3c02cc1fc100d3bdab7d2a8dade40fa12bde23..fa9ed71eaae76d5874772819c96c1f57c7ca638b 100644
--- a/chromeos/network/network_type_pattern.cc
+++ b/chromeos/network/network_type_pattern.cc
@@ -7,12 +7,11 @@
#include <stddef.h>
#include "chromeos/network/network_event_log.h"
+#include "chromeos/network/tether_constants.h"
#include "third_party/cros_system_api/dbus/service_constants.h"
namespace chromeos {
-const char kTypeTether[] = "wifi-tether";
-
namespace {
const char kPatternDefault[] = "PatternDefault";
@@ -20,6 +19,7 @@ const char kPatternEthernet[] = "PatternEthernet";
const char kPatternWireless[] = "PatternWireless";
const char kPatternMobile[] = "PatternMobile";
const char kPatternNonVirtual[] = "PatternNonVirtual";
+const char kPatternTether[] = "PatternTether";
enum NetworkTypeBitFlag {
kNetworkTypeNone = 0,
@@ -64,7 +64,7 @@ NetworkTypePattern NetworkTypePattern::Default() {
// static
NetworkTypePattern NetworkTypePattern::Wireless() {
return NetworkTypePattern(kNetworkTypeWifi | kNetworkTypeWimax |
- kNetworkTypeCellular);
+ kNetworkTypeCellular | kNetworkTypeTether);
stevenjb 2017/04/18 20:41:19 I'd rather not add this here yet. We need to audit
Kyle Horimoto 2017/04/18 21:58:39 Done.
}
// static
@@ -141,6 +141,8 @@ std::string NetworkTypePattern::ToDebugString() const {
return kPatternMobile;
if (Equals(NonVirtual()))
return kPatternNonVirtual;
+ if (Equals(Tether()))
+ return kPatternTether;
std::string str;
for (size_t i = 0; i < arraysize(shill_type_to_flag); ++i) {

Powered by Google App Engine
This is Rietveld 408576698