summaryrefslogtreecommitdiffstats
path: root/net/base/network_change_notifier_mac.h
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-03 19:06:01 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-03 19:06:01 +0000
commit9715b85f74e95db5345fd33ef43ff48eb0ce983f (patch)
tree4db4724ac54f5e6a37d0cd6f42e2159e69db4d54 /net/base/network_change_notifier_mac.h
parent1cfb7420fb7ea2fa5a6360bbee5424918e84a027 (diff)
downloadchromium_src-9715b85f74e95db5345fd33ef43ff48eb0ce983f.zip
chromium_src-9715b85f74e95db5345fd33ef43ff48eb0ce983f.tar.gz
chromium_src-9715b85f74e95db5345fd33ef43ff48eb0ce983f.tar.bz2
Fix NetworkChangeNotifier crashes on Mac.
Revert r58230. BUG=54305,53138 TEST=Make sure ethernet is plugged in. Run Chrome. Unplug ethernet. Does not crash. Review URL: http://codereview.chromium.org/3350009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58520 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/network_change_notifier_mac.h')
-rw-r--r--net/base/network_change_notifier_mac.h36
1 files changed, 7 insertions, 29 deletions
diff --git a/net/base/network_change_notifier_mac.h b/net/base/network_change_notifier_mac.h
index 33cf99c..1d23524 100644
--- a/net/base/network_change_notifier_mac.h
+++ b/net/base/network_change_notifier_mac.h
@@ -14,39 +14,17 @@
namespace net {
-class NetworkChangeNotifierMac: public NetworkChangeNotifier {
+class NetworkChangeNotifierMac : public NetworkConfigWatcherMac,
+ public NetworkChangeNotifier {
public:
NetworkChangeNotifierMac();
- virtual ~NetworkChangeNotifierMac();
- private:
- // Forwarder just exists to keep the NetworkConfigWatcherMac API out of
- // NetworkChangeNotifierMac's public API.
- class Forwarder : public NetworkConfigWatcherMac::Delegate {
- public:
- explicit Forwarder(NetworkChangeNotifierMac* net_config_watcher)
- : net_config_watcher_(net_config_watcher_) {}
-
- // NetworkConfigWatcherMac::Delegate implementation:
- virtual void SetDynamicStoreNotificationKeys(SCDynamicStoreRef store) {
- net_config_watcher_->SetDynamicStoreNotificationKeys(store);
- }
- virtual void OnNetworkConfigChange(CFArrayRef changed_keys) {
- net_config_watcher_->OnNetworkConfigChange(changed_keys);
- }
-
- private:
- NetworkChangeNotifierMac* const net_config_watcher_;
- DISALLOW_COPY_AND_ASSIGN(Forwarder);
- };
-
- // NetworkConfigWatcherMac::Delegate implementation:
- void SetDynamicStoreNotificationKeys(SCDynamicStoreRef store);
- void OnNetworkConfigChange(CFArrayRef changed_keys);
-
- Forwarder forwarder_;
- const NetworkConfigWatcherMac config_watcher_;
+ protected:
+ // NetworkConfigWatcherMac implementation:
+ virtual void SetDynamicStoreNotificationKeys(SCDynamicStoreRef store);
+ virtual void OnNetworkConfigChange(CFArrayRef changed_keys);
+ private:
DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierMac);
};