diff options
author | adamk@chromium.org <adamk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-08 20:43:25 +0000 |
---|---|---|
committer | adamk@chromium.org <adamk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-08 20:43:25 +0000 |
commit | d72b8a85957fc568c31e0a3df4c2566cf1e502f9 (patch) | |
tree | 686ca2d7b93056ca6e931929ee550c3d51e77605 /net/base/network_change_notifier_mac.h | |
parent | 9f3fba5755542d0f9ac5f39540e771713dd666bb (diff) | |
download | chromium_src-d72b8a85957fc568c31e0a3df4c2566cf1e502f9.zip chromium_src-d72b8a85957fc568c31e0a3df4c2566cf1e502f9.tar.gz chromium_src-d72b8a85957fc568c31e0a3df4c2566cf1e502f9.tar.bz2 |
NetworkChangeNotifierMac: lock access to network_reachable_ as it may be read
on different threads than the one on which it's written.
R=eroman@chromium.org
Review URL: http://codereview.chromium.org/7135005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88389 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/network_change_notifier_mac.h')
-rw-r--r-- | net/base/network_change_notifier_mac.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/base/network_change_notifier_mac.h b/net/base/network_change_notifier_mac.h index d0f49d6..e01e244 100644 --- a/net/base/network_change_notifier_mac.h +++ b/net/base/network_change_notifier_mac.h @@ -11,6 +11,7 @@ #include "base/basictypes.h" #include "base/mac/scoped_cftyperef.h" +#include "base/synchronization/lock.h" #include "net/base/network_change_notifier.h" #include "net/base/network_config_watcher_mac.h" @@ -58,6 +59,7 @@ class NetworkChangeNotifierMac: public NetworkChangeNotifier { base::mac::ScopedCFTypeRef<CFRunLoopRef> run_loop_; base::mac::ScopedCFTypeRef<SCNetworkReachabilityRef> reachability_; bool network_reachable_; + mutable base::Lock network_reachable_lock_; DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierMac); }; |