summaryrefslogtreecommitdiffstats
path: root/net/base/network_change_notifier_mac.h
diff options
context:
space:
mode:
authoradamk@chromium.org <adamk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-12 21:28:15 +0000
committeradamk@chromium.org <adamk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-12 21:28:15 +0000
commit88a59c8f29a1fd4180eeb418728bba9f79609365 (patch)
tree5874c006400096b58dbdf2c9cf6b77d7b14eae8f /net/base/network_change_notifier_mac.h
parent7abec0424c8943483bee9d15cb245ea7bfc7ed65 (diff)
downloadchromium_src-88a59c8f29a1fd4180eeb418728bba9f79609365.zip
chromium_src-88a59c8f29a1fd4180eeb418728bba9f79609365.tar.gz
chromium_src-88a59c8f29a1fd4180eeb418728bba9f79609365.tar.bz2
NetworkChangeNotifierMac: synchronize destruction order with helper thread.
Previously, it was possible for NetworkChangeNotifierMac to unschedule the SCNetworkReachability callback before it had been scheduled. Under the hypothesis that this is causing crashes on shutdown, this change makes sure that the helper thread (on which reachability is initially scheduled) runs to completion before we check to see if we need to unschedule the callback. BUG=91767 Review URL: http://codereview.chromium.org/7862006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100771 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/network_change_notifier_mac.h')
-rw-r--r--net/base/network_change_notifier_mac.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/net/base/network_change_notifier_mac.h b/net/base/network_change_notifier_mac.h
index 7983db7..3da8ccb 100644
--- a/net/base/network_change_notifier_mac.h
+++ b/net/base/network_change_notifier_mac.h
@@ -6,11 +6,11 @@
#define NET_BASE_NETWORK_CHANGE_NOTIFIER_MAC_H_
#pragma once
-#include <SystemConfiguration/SCDynamicStore.h>
-#include <SystemConfiguration/SCNetworkReachability.h>
+#include <SystemConfiguration/SystemConfiguration.h>
#include "base/basictypes.h"
#include "base/mac/scoped_cftyperef.h"
+#include "base/scoped_ptr.h"
#include "base/synchronization/condition_variable.h"
#include "base/synchronization/lock.h"
#include "net/base/network_change_notifier.h"
@@ -75,10 +75,7 @@ class NetworkChangeNotifierMac: public NetworkChangeNotifier {
base::mac::ScopedCFTypeRef<CFRunLoopRef> run_loop_;
Forwarder forwarder_;
-
- // config_watcher_ should be the last data member, to ensure the rest
- // of the object is constructed by the time its constructor runs.
- const NetworkConfigWatcherMac config_watcher_;
+ scoped_ptr<const NetworkConfigWatcherMac> config_watcher_;
DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierMac);
};