Chromium Code Reviews| 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..ee0feb7e72969162a125cf570f4e168f4188e3cb 100644 |
| --- a/net/base/network_change_notifier.h |
| +++ b/net/base/network_change_notifier.h |
| @@ -130,9 +130,14 @@ 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 |type| is a cellular connection. |
| + // Returns false if |type| is CONNECTION_UNKNOWN, and thus, depending on the |
| + // implementation of GetConnectionType(), it is possible that |
| + // IsConnectionCellular(GetConnectionType()) returns false even if the |
| + // current connection is cellular. |
|
Ryan Sleevi
2012/10/22 17:34:00
I'm not sure this comment still fully captures the
droger
2012/10/22 17:41:06
It seems to me that this discussion applies to the
|
| + static bool IsConnectionCellular(ConnectionType type); |
| // Like Create(), but for use in tests. The mock object doesn't monitor any |
| // events, it merely rebroadcasts notifications when requested. |