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

Unified Diff: chromeos/network/network_state.h

Issue 11614035: Improve NetworkStateHandler API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix TrayNetworkStateObserver Created 8 years 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_state.h
diff --git a/chromeos/network/network_state.h b/chromeos/network/network_state.h
index b5f73761ae7e63cf5a9f36e9abfc0762bb2aa4fd..0cdb6422c7752e36c196f49f6780817864aaa298 100644
--- a/chromeos/network/network_state.h
+++ b/chromeos/network/network_state.h
@@ -37,10 +37,21 @@ class CHROMEOS_EXPORT NetworkState : public ManagedState {
bool IsConnectedState() const;
bool IsConnectingState() const;
+ // Returns true if |type_| == |match_type|, or it matches one of the
+ // following special match types:
+ // * kMatchTypeDefault to match any network
pneubeck (no reviews) 2012/12/19 15:22:38 Why not call it kMatchTypeAny?
stevenjb 2012/12/19 18:01:07 I wanted to match the intention here; "Any" implie
pneubeck (no reviews) 2012/12/19 19:40:06 But First makes only sense in the context of the f
+ // * kMatchTypeNonVirtual to match non virtual networks
+ // * kMatchTypeWireless to match wireless networks
+ bool MatchesType(const std::string& match_type) const;
+
// Helpers (used e.g. when a state is cached)
static bool StateIsConnected(const std::string& state);
static bool StateIsConnecting(const std::string& state);
+ static const char kMatchTypeDefault[];
+ static const char kMatchTypeWireless[];
+ static const char kMatchTypeNonVirtual[];
+
private:
friend class NetworkStateHandler;

Powered by Google App Engine
This is Rietveld 408576698