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

Unified Diff: chromeos/network/network_type_pattern.cc

Issue 2913103002: Add Tether to Mobile NetworkTypePattern. (Closed)
Patch Set: fixed usage of Cellular vs Mobile in some files 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
Index: chromeos/network/network_type_pattern.cc
diff --git a/chromeos/network/network_type_pattern.cc b/chromeos/network/network_type_pattern.cc
index dbda85ba2a067523a4373f021babf7fabb16704b..9b0792b4110fafcbd76fb623e29de2eb7a74164d 100644
--- a/chromeos/network/network_type_pattern.cc
+++ b/chromeos/network/network_type_pattern.cc
@@ -15,11 +15,9 @@ namespace chromeos {
namespace {
const char kPatternDefault[] = "PatternDefault";
-const char kPatternEthernet[] = "PatternEthernet";
Kyle Horimoto 2017/06/01 22:12:23 Why are you removing this and PatternTether? Same
stevenjb 2017/06/01 22:29:48 Ethernet() used to be 'Ethernet' or 'EthernetEAP'
lesliewatkins 2017/06/02 21:31:17 Acknowledged.
const char kPatternWireless[] = "PatternWireless";
const char kPatternMobile[] = "PatternMobile";
const char kPatternNonVirtual[] = "PatternNonVirtual";
-const char kPatternTether[] = "PatternTether";
stevenjb 2017/06/01 22:29:48 Since kTypeTether is listed in shill_type_to_flag,
lesliewatkins 2017/06/02 21:31:17 Acknowledged.
enum NetworkTypeBitFlag {
kNetworkTypeNone = 0,
@@ -69,7 +67,8 @@ NetworkTypePattern NetworkTypePattern::Wireless() {
// static
NetworkTypePattern NetworkTypePattern::Mobile() {
- return NetworkTypePattern(kNetworkTypeCellular | kNetworkTypeWimax);
+ return NetworkTypePattern(kNetworkTypeCellular | kNetworkTypeWimax |
+ kNetworkTypeTether);
}
// static
@@ -133,16 +132,12 @@ bool NetworkTypePattern::MatchesPattern(
std::string NetworkTypePattern::ToDebugString() const {
if (Equals(Default()))
return kPatternDefault;
- if (Equals(Ethernet()))
- return kPatternEthernet;
if (Equals(Wireless()))
return kPatternWireless;
if (Equals(Mobile()))
return kPatternMobile;
if (Equals(NonVirtual()))
return kPatternNonVirtual;
- if (Equals(Tether()))
- return kPatternTether;
stevenjb 2017/06/01 22:29:48 Maybe add a comment here: // Note: shill_type_to_
lesliewatkins 2017/06/02 21:31:17 Done.
std::string str;
for (size_t i = 0; i < arraysize(shill_type_to_flag); ++i) {

Powered by Google App Engine
This is Rietveld 408576698