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

Unified Diff: chromeos/network/network_type_pattern.cc

Issue 2913103002: Add Tether to Mobile NetworkTypePattern. (Closed)
Patch Set: Add Tether to Mobile NetworkTypePattern. Created 3 years, 6 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_type_pattern.h ('k') | chromeos/network/network_type_pattern_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..0cfe2d5ee16f11bc932621b0dfffa06e40090d8f 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";
const char kPatternWireless[] = "PatternWireless";
const char kPatternMobile[] = "PatternMobile";
const char kPatternNonVirtual[] = "PatternNonVirtual";
-const char kPatternTether[] = "PatternTether";
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,17 +132,14 @@ 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;
+ // Note: shill_type_to_flag includes kTypeTether.
std::string str;
for (size_t i = 0; i < arraysize(shill_type_to_flag); ++i) {
if (!(pattern_ & shill_type_to_flag[i].bit_flag))
« no previous file with comments | « chromeos/network/network_type_pattern.h ('k') | chromeos/network/network_type_pattern_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698