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

Unified Diff: net/base/network_change_notifier_mac.h

Issue 2896203003: [NetworkChangeNotifier] Return more specific network connection types (ethernet/wifi) on OSX (Closed)
Patch Set: Fixes Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/base/network_change_notifier_mac.cc » ('j') | net/base/network_change_notifier_mac.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/network_change_notifier_mac.h
diff --git a/net/base/network_change_notifier_mac.h b/net/base/network_change_notifier_mac.h
index 9acb47c57971c4b423748a5763d9c252ebd9e4d2..8f79304ecc9f5e5ab38ffbb383d6e6a262c56c08 100644
--- a/net/base/network_change_notifier_mac.h
+++ b/net/base/network_change_notifier_mac.h
@@ -12,6 +12,7 @@
#include "base/compiler_specific.h"
#include "base/mac/scoped_cftyperef.h"
#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
#include "base/synchronization/condition_variable.h"
#include "base/synchronization/lock.h"
#include "net/base/network_change_notifier.h"
@@ -58,8 +59,10 @@ class NetworkChangeNotifierMac: public NetworkChangeNotifier {
static void ReachabilityCallback(SCNetworkReachabilityRef target,
SCNetworkConnectionFlags flags,
void* notifier);
+ void ReachabilityCallbackImpl(ConnectionType new_type);
pauljensen 2017/05/23 15:10:30 can you add a comment for this function?
jkarlin 2017/05/27 01:06:19 No longer needed.
static NetworkChangeCalculatorParams NetworkChangeCalculatorParamsMac();
+ static ConnectionType CalculateConnectionType(SCNetworkConnectionFlags flags);
pauljensen 2017/05/23 15:10:30 ditto
jkarlin 2017/05/27 01:06:19 No longer needed.
// These must be constructed before config_watcher_ to ensure
// the lock is in a valid state when Forwarder::Init is called.
@@ -75,6 +78,8 @@ class NetworkChangeNotifierMac: public NetworkChangeNotifier {
std::unique_ptr<DnsConfigServiceThread> dns_config_service_thread_;
+ base::WeakPtrFactory<NetworkChangeNotifierMac> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierMac);
};
« no previous file with comments | « no previous file | net/base/network_change_notifier_mac.cc » ('j') | net/base/network_change_notifier_mac.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698