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

Unified Diff: net/base/network_change_notifier.h

Issue 2486393004: Expose API to detect when captive portal probe was blocked on Android (Closed)
Patch Set: pauljensen comments Created 4 years, 1 month 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
Index: net/base/network_change_notifier.h
diff --git a/net/base/network_change_notifier.h b/net/base/network_change_notifier.h
index 27a798d04d1fcf6d2714904324d31e26d18059bd..8ee88eb2182592a67736aa708d4c7da2790e0916 100644
--- a/net/base/network_change_notifier.h
+++ b/net/base/network_change_notifier.h
@@ -328,6 +328,12 @@ class NET_EXPORT NetworkChangeNotifier {
// Requires NetworkHandles support, see AreNetworkHandlesSupported().
static NetworkHandle GetDefaultNetwork();
+ // Returns true if the captive portal probe was blocked for the current
pauljensen 2016/11/16 16:10:23 "the captive portal probe was blocked for"->"the s
+ // network. May incorrectly return true if the user has signed into the
pauljensen 2016/11/16 16:10:24 network->default network
+ // captive portal since the network was last probed. Only available on
+ // Lollipop and newer releases.
pauljensen 2016/11/16 16:10:23 Lollipop->Marshmallow
pauljensen 2016/11/16 16:10:24 Mention it's only available on Android
pauljensen 2016/11/16 16:10:24 Mention what is returned if unavailable
+ static bool GetNetworkCaptivePortal();
+
// Retrieve the last read DnsConfig. This could be expensive if the system has
// a large HOSTS file.
static void GetDnsConfig(DnsConfig* config);
@@ -508,6 +514,7 @@ class NET_EXPORT NetworkChangeNotifier {
virtual ConnectionType GetCurrentNetworkConnectionType(
NetworkHandle network) const;
virtual NetworkHandle GetCurrentDefaultNetwork() const;
+ virtual bool GetCurrentNetworkCaptivePortal() const;
// Hook that allows derived implementations to log histograms at the time a
// new histogram record is being finalized.

Powered by Google App Engine
This is Rietveld 408576698