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

Unified Diff: net/base/network_change_notifier.h

Issue 2081493002: Obtain WiFi SSID on Android using Android APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Created 4 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 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 aafee7a20067ed50206a7505ad2fcfd444d85451..1cd00e3b8262c3bc4099a3ca6e6818d9d1b4c86a 100644
--- a/net/base/network_change_notifier.h
+++ b/net/base/network_change_notifier.h
@@ -8,6 +8,7 @@
#include <stdint.h>
#include <memory>
+#include <string>
#include <vector>
#include "base/macros.h"
@@ -275,6 +276,11 @@ class NET_EXPORT NetworkChangeNotifier {
// the internet, the connection type is CONNECTION_WIFI.
static ConnectionType GetConnectionType();
+ // Returns the SSID of the current connection. If the current connection type
+ // is not CONNECTION_WIFI, or if the SSID is unavailable, it may return an
Not at Google. Contact bengr 2016/06/23 20:08:56 "may" -> "will"?
tbansal1 2016/06/27 19:48:20 Done.
+ // empty string. Currently, only implemented on Android.
+ static std::string GetWiFiSSID();
+
// Sets |max_bandwidth_mbps| to a theoretical upper limit on download
// bandwidth, potentially based on underlying connection type, signal
// strength, or some other signal. If the network subtype is unknown then
@@ -500,6 +506,7 @@ class NET_EXPORT NetworkChangeNotifier {
virtual void GetCurrentMaxBandwidthAndConnectionType(
double* max_bandwidth_mbps,
ConnectionType* connection_type) const;
+ virtual std::string GetCurrentWiFiSSID() const;
virtual bool AreNetworkHandlesCurrentlySupported() const;
virtual void GetCurrentConnectedNetworks(NetworkList* network_list) const;
virtual ConnectionType GetCurrentNetworkConnectionType(

Powered by Google App Engine
This is Rietveld 408576698