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

Side by Side Diff: net/base/network_change_notifier_mac.cc

Issue 7009002: Fix debug crash caused by NetworkChangeNotifierChromeos. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change NotifyObserversOfOnlineStateChange call to static. Created 9 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/base/network_change_notifier.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/base/network_change_notifier_mac.h" 5 #include "net/base/network_change_notifier_mac.h"
6 6
7 #include <netinet/in.h> 7 #include <netinet/in.h>
8 #include <SystemConfiguration/SCDynamicStoreKey.h> 8 #include <SystemConfiguration/SCDynamicStoreKey.h>
9 #include <SystemConfiguration/SCNetworkReachability.h> 9 #include <SystemConfiguration/SCNetworkReachability.h>
10 #include <SystemConfiguration/SCSchemaDefinitions.h> 10 #include <SystemConfiguration/SCSchemaDefinitions.h>
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 NetworkChangeNotifierMac* notifier_mac = 115 NetworkChangeNotifierMac* notifier_mac =
116 static_cast<NetworkChangeNotifierMac*>(notifier); 116 static_cast<NetworkChangeNotifierMac*>(notifier);
117 117
118 DCHECK_EQ(notifier_mac->run_loop_.get(), CFRunLoopGetCurrent()); 118 DCHECK_EQ(notifier_mac->run_loop_.get(), CFRunLoopGetCurrent());
119 119
120 bool reachable = flags & kSCNetworkFlagsReachable; 120 bool reachable = flags & kSCNetworkFlagsReachable;
121 bool connection_required = flags & kSCNetworkFlagsConnectionRequired; 121 bool connection_required = flags & kSCNetworkFlagsConnectionRequired;
122 bool old_reachability = notifier_mac->network_reachable_; 122 bool old_reachability = notifier_mac->network_reachable_;
123 notifier_mac->network_reachable_ = reachable && !connection_required; 123 notifier_mac->network_reachable_ = reachable && !connection_required;
124 if (old_reachability != notifier_mac->network_reachable_) 124 if (old_reachability != notifier_mac->network_reachable_)
125 notifier_mac->NotifyObserversOfOnlineStateChange(); 125 NotifyObserversOfOnlineStateChange();
126 } 126 }
127 127
128 } // namespace net 128 } // namespace net
OLDNEW
« no previous file with comments | « net/base/network_change_notifier.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698