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

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

Issue 11360108: Start calculating new combined NetworkChangeNotifier signal (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Switch to default argument constructor Created 8 years 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_linux.cc ('k') | net/base/network_change_notifier_mac.cc » ('j') | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef NET_BASE_NETWORK_CHANGE_NOTIFIER_MAC_H_ 5 #ifndef NET_BASE_NETWORK_CHANGE_NOTIFIER_MAC_H_
6 #define NET_BASE_NETWORK_CHANGE_NOTIFIER_MAC_H_ 6 #define NET_BASE_NETWORK_CHANGE_NOTIFIER_MAC_H_
7 7
8 #include <SystemConfiguration/SystemConfiguration.h> 8 #include <SystemConfiguration/SystemConfiguration.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 void StartReachabilityNotifications(); 52 void StartReachabilityNotifications();
53 void SetDynamicStoreNotificationKeys(SCDynamicStoreRef store); 53 void SetDynamicStoreNotificationKeys(SCDynamicStoreRef store);
54 void OnNetworkConfigChange(CFArrayRef changed_keys); 54 void OnNetworkConfigChange(CFArrayRef changed_keys);
55 55
56 void SetInitialConnectionType(); 56 void SetInitialConnectionType();
57 57
58 static void ReachabilityCallback(SCNetworkReachabilityRef target, 58 static void ReachabilityCallback(SCNetworkReachabilityRef target,
59 SCNetworkConnectionFlags flags, 59 SCNetworkConnectionFlags flags,
60 void* notifier); 60 void* notifier);
61 61
62 static NetworkChangeCalculatorParams NetworkChangeCalculatorParamsMac();
63
62 // These must be constructed before config_watcher_ to ensure 64 // These must be constructed before config_watcher_ to ensure
63 // the lock is in a valid state when Forwarder::Init is called. 65 // the lock is in a valid state when Forwarder::Init is called.
64 ConnectionType connection_type_; 66 ConnectionType connection_type_;
65 bool connection_type_initialized_; 67 bool connection_type_initialized_;
66 mutable base::Lock connection_type_lock_; 68 mutable base::Lock connection_type_lock_;
67 mutable base::ConditionVariable initial_connection_type_cv_; 69 mutable base::ConditionVariable initial_connection_type_cv_;
68 base::mac::ScopedCFTypeRef<SCNetworkReachabilityRef> reachability_; 70 base::mac::ScopedCFTypeRef<SCNetworkReachabilityRef> reachability_;
69 base::mac::ScopedCFTypeRef<CFRunLoopRef> run_loop_; 71 base::mac::ScopedCFTypeRef<CFRunLoopRef> run_loop_;
70 72
71 Forwarder forwarder_; 73 Forwarder forwarder_;
72 scoped_ptr<const NetworkConfigWatcherMac> config_watcher_; 74 scoped_ptr<const NetworkConfigWatcherMac> config_watcher_;
73 75
74 scoped_ptr<DnsConfigServiceThread> dns_config_service_thread_; 76 scoped_ptr<DnsConfigServiceThread> dns_config_service_thread_;
75 77
76 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierMac); 78 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierMac);
77 }; 79 };
78 80
79 } // namespace net 81 } // namespace net
80 82
81 #endif // NET_BASE_NETWORK_CHANGE_NOTIFIER_MAC_H_ 83 #endif // NET_BASE_NETWORK_CHANGE_NOTIFIER_MAC_H_
OLDNEW
« no previous file with comments | « net/base/network_change_notifier_linux.cc ('k') | net/base/network_change_notifier_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698