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

Unified Diff: net/base/network_change_notifier_mac.h

Issue 9147026: API for connection type (Ethernet/WIFI/WWAN ...) in NetworkChangeNotifier. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 11 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_mac.h
diff --git a/net/base/network_change_notifier_mac.h b/net/base/network_change_notifier_mac.h
index 54ca27d0797f8447ad25f86bea13de2e5e8c1788..8d49db43927cc374cf37f3314772a0df15d36c0e 100644
--- a/net/base/network_change_notifier_mac.h
+++ b/net/base/network_change_notifier_mac.h
@@ -25,14 +25,7 @@ class NetworkChangeNotifierMac: public NetworkChangeNotifier {
virtual ~NetworkChangeNotifierMac();
// NetworkChangeNotifier implementation:
- virtual bool IsCurrentlyOffline() const OVERRIDE;
-
- private:
- enum OnlineState {
- UNINITIALIZED = -1,
- OFFLINE = 0,
- ONLINE = 1
- };
+ virtual ConnectionState GetCurrentConnectionState() const OVERRIDE;
// Forwarder just exists to keep the NetworkConfigWatcherMac API out of
// NetworkChangeNotifierMac's public API.
@@ -70,8 +63,8 @@ class NetworkChangeNotifierMac: public NetworkChangeNotifier {
// These must be constructed before config_watcher_ to ensure
// the lock is in a valid state when Forwarder::Init is called.
- OnlineState online_state_;
- mutable base::Lock online_state_lock_;
+ ConnectionState connection_state_;
+ mutable base::Lock connection_state_lock_;
mutable base::ConditionVariable initial_state_cv_;
base::mac::ScopedCFTypeRef<SCNetworkReachabilityRef> reachability_;
base::mac::ScopedCFTypeRef<CFRunLoopRef> run_loop_;

Powered by Google App Engine
This is Rietveld 408576698