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

Unified Diff: net/base/network_change_notifier.h

Issue 11115009: Helper functions in NetworkChangeNotifier related to WWAN use (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Update existing code Created 8 years, 2 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: net/base/network_change_notifier.h
diff --git a/net/base/network_change_notifier.h b/net/base/network_change_notifier.h
index 731c305bebbf6279a0dd4e10d41488a3dbe4d3d4..892a97a1b4bfddbd5ac442cb45f5568bbd2583ff 100644
--- a/net/base/network_change_notifier.h
+++ b/net/base/network_change_notifier.h
@@ -130,9 +130,13 @@ class NET_EXPORT NetworkChangeNotifier {
// |false| is inconclusive; even if some link is up, it is uncertain
// whether a particular connection attempt to a particular remote site
// will be successfully.
- static bool IsOffline() {
- return GetConnectionType() == CONNECTION_NONE;
- }
+ static bool IsOffline();
+
+ // Returns true if the current connection is cellular.
+ static bool IsConnectionCellular();
+
+ // Returns true if |type| is a cellular connection.
+ static bool IsConnectionCellular(ConnectionType type);
Ryan Sleevi 2012/10/12 17:49:57 Having two APIs to do something so functionally cl
// Like Create(), but for use in tests. The mock object doesn't monitor any
// events, it merely rebroadcasts notifications when requested.

Powered by Google App Engine
This is Rietveld 408576698