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

Unified Diff: net/base/network_change_notifier_mac.h

Issue 7006015: Implement NetworkChangeNotifier::IsCurrentlyOffline() for Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Retain CFRunLoop, get rid of CleanUp method Created 9 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 | « no previous file | net/base/network_change_notifier_mac.cc » ('j') | net/base/network_change_notifier_mac.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f46a6666f64b4169a32ac468583b7d9959907ab7..37963daaa4cf8a453d6dce40811d43cefab39e8a 100644
--- a/net/base/network_change_notifier_mac.h
+++ b/net/base/network_change_notifier_mac.h
@@ -7,8 +7,10 @@
#pragma once
#include <SystemConfiguration/SCDynamicStore.h>
+#include <SystemConfiguration/SCNetworkReachability.h>
#include "base/basictypes.h"
+#include "base/mac/scoped_cftyperef.h"
#include "net/base/network_change_notifier.h"
#include "net/base/network_config_watcher_mac.h"
@@ -47,8 +49,15 @@ class NetworkChangeNotifierMac: public NetworkChangeNotifier {
void SetDynamicStoreNotificationKeys(SCDynamicStoreRef store);
void OnNetworkConfigChange(CFArrayRef changed_keys);
+ static void ReachabilityCallback(SCNetworkReachabilityRef target,
+ SCNetworkConnectionFlags flags,
+ void* notifier);
+
Forwarder forwarder_;
const NetworkConfigWatcherMac config_watcher_;
+ CFRunLoopRef run_loop_;
+ base::mac::ScopedCFTypeRef<SCNetworkReachabilityRef> reachability_;
+ bool network_reachable_;
DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierMac);
};
« no previous file with comments | « no previous file | net/base/network_change_notifier_mac.cc » ('j') | net/base/network_change_notifier_mac.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698