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

Unified Diff: net/android/network_change_notifier_android.h

Issue 1454313002: Adding platform support check for NetworkObserver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@home
Patch Set: Added forcing networkhandle support to NCNAndroid and NCNAndroidTest Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/android/network_change_notifier_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/android/network_change_notifier_android.h
diff --git a/net/android/network_change_notifier_android.h b/net/android/network_change_notifier_android.h
index b4870bfa9b5ea95f09db8f2db3ee1c50982ad5ac..89e7f19ee951f0fa80a42054f3e441b7ef085ad3 100644
--- a/net/android/network_change_notifier_android.h
+++ b/net/android/network_change_notifier_android.h
@@ -52,6 +52,7 @@ class NET_EXPORT_PRIVATE NetworkChangeNotifierAndroid
void GetCurrentMaxBandwidthAndConnectionType(
double* max_bandwidth_mbps,
ConnectionType* connection_type) const override;
+ bool AreNetworkHandlesCurrentlySupported() const override;
void GetCurrentConnectedNetworks(NetworkList* network_list) const override;
ConnectionType GetCurrentNetworkConnectionType(
NetworkHandle network) const override;
@@ -78,6 +79,9 @@ class NET_EXPORT_PRIVATE NetworkChangeNotifierAndroid
class DnsConfigServiceThread;
+ // Enable NetworkHandles support for tests.
+ void ForceNetworkHandlesSupportedForTesting();
+
NetworkChangeNotifierAndroid(NetworkChangeNotifierDelegateAndroid* delegate,
const DnsConfig* dns_config_for_testing);
@@ -85,6 +89,7 @@ class NET_EXPORT_PRIVATE NetworkChangeNotifierAndroid
NetworkChangeNotifierDelegateAndroid* const delegate_;
scoped_ptr<DnsConfigServiceThread> dns_config_service_thread_;
+ bool force_network_handles_supported_for_testing_;
DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierAndroid);
};
« no previous file with comments | « no previous file | net/android/network_change_notifier_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698