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

Unified Diff: chromeos/network/shill_property_util.h

Issue 300623008: Move NetworkTypePattern to its own file (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 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/policy_applicator.cc ('k') | chromeos/network/shill_property_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/shill_property_util.h
diff --git a/chromeos/network/shill_property_util.h b/chromeos/network/shill_property_util.h
index 726fb3646e97125900c5fb4bdc891209faeeab2f..ca0aa5c089ec5ef89b1bc9ae023818b3d95e1430 100644
--- a/chromeos/network/shill_property_util.h
+++ b/chromeos/network/shill_property_util.h
@@ -81,55 +81,6 @@ bool GetHomeProviderFromProperty(const base::Value& value,
} // namespace shill_property_util
-class CHROMEOS_EXPORT NetworkTypePattern {
- public:
- // Matches any network.
- static NetworkTypePattern Default();
-
- // Matches wireless (WiFi, cellular, etc.) networks
- static NetworkTypePattern Wireless();
-
- // Matches cellular or wimax networks.
- static NetworkTypePattern Mobile();
-
- // Matches non virtual networks.
- static NetworkTypePattern NonVirtual();
-
- // Matches ethernet networks (with or without EAP).
- static NetworkTypePattern Ethernet();
-
- static NetworkTypePattern WiFi();
- static NetworkTypePattern Cellular();
- static NetworkTypePattern VPN();
- static NetworkTypePattern Wimax();
-
- // Matches only networks of exactly the type |shill_network_type|, which must
- // be one of the types defined in service_constants.h (e.g.
- // shill::kTypeWifi).
- // Note: Shill distinguishes Ethernet without EAP from Ethernet with EAP. If
- // unsure, better use one of the matchers above.
- static NetworkTypePattern Primitive(const std::string& shill_network_type);
-
- bool Equals(const NetworkTypePattern& other) const;
- bool MatchesType(const std::string& shill_network_type) const;
-
- // Returns true if this pattern matches at least one network type that
- // |other_pattern| matches (according to MatchesType). Thus MatchesPattern is
- // symmetric and reflexive but not transitive.
- // See the unit test for examples.
- bool MatchesPattern(const NetworkTypePattern& other_pattern) const;
-
- std::string ToDebugString() const;
-
- private:
- explicit NetworkTypePattern(int pattern);
-
- // The bit array of the matching network types.
- int pattern_;
-
- DISALLOW_ASSIGN(NetworkTypePattern);
-};
-
} // namespace chromeos
#endif // CHROMEOS_NETWORK_SHILL_PROPERTY_UTIL_H_
« no previous file with comments | « chromeos/network/policy_applicator.cc ('k') | chromeos/network/shill_property_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698