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

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: Call cleanup from destructor 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..a5e4a6097f2b4b2b0dbf761099f189fdf20c6485 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"
@@ -37,6 +39,9 @@ class NetworkChangeNotifierMac: public NetworkChangeNotifier {
virtual void OnNetworkConfigChange(CFArrayRef changed_keys) {
net_config_watcher_->OnNetworkConfigChange(changed_keys);
}
+ virtual void CleanUp() {
+ net_config_watcher_->CleanUp();
+ }
private:
NetworkChangeNotifierMac* const net_config_watcher_;
@@ -47,8 +52,15 @@ class NetworkChangeNotifierMac: public NetworkChangeNotifier {
void SetDynamicStoreNotificationKeys(SCDynamicStoreRef store);
void OnNetworkConfigChange(CFArrayRef changed_keys);
+ static void ReachabilityCallback(SCNetworkReachabilityRef target,
+ SCNetworkConnectionFlags flags,
+ void* notifier);
+ void CleanUp();
+
Forwarder forwarder_;
const NetworkConfigWatcherMac config_watcher_;
+ 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