Chromium Code Reviews| Index: net/base/network_change_notifier.h |
| diff --git a/net/base/network_change_notifier.h b/net/base/network_change_notifier.h |
| index b29426e3dc825a3014e228974d4c5bb61ee57a8f..f0658356b490efc2058d923457ae5dc3530d7629 100644 |
| --- a/net/base/network_change_notifier.h |
| +++ b/net/base/network_change_notifier.h |
| @@ -47,6 +47,27 @@ class NET_EXPORT NetworkChangeNotifier { |
| CONNECTION_LAST = CONNECTION_BLUETOOTH |
| }; |
| + // Wifi access point security mode definitions. |
| + enum WifiSecurityMode { |
| + WIFI_SECURITY_UNKNOWN = 0, |
| + WIFI_SECURITY_WPA = 1, |
| + WIFI_SECURITY_WEP = 2, |
| + WIFI_SECURITY_RSN = 3, |
| + WIFI_SECURITY_802_1X = 4, |
| + WIFI_SECURITY_PSK = 5, |
| + WIFI_SECURITY_NONE |
| + }; |
| + |
| + // Information of the currently connected wifi AP. |
| + struct NET_EXPORT WifiApInfo { |
| + WifiSecurityMode security; |
| + std::string bssid; |
| + std::string model_number; |
| + std::string model_name; |
| + std::string device_name; |
| + std::string oui_list; |
| + }; |
| + |
| class NET_EXPORT IPAddressObserver { |
| public: |
| // Will be called when the IP address of the primary interface changes. |
| @@ -135,6 +156,10 @@ class NET_EXPORT NetworkChangeNotifier { |
| // cheap as this could be called (repeatedly) from the network thread. |
| virtual ConnectionType GetCurrentConnectionType() const = 0; |
| + // Fill in the wifi AP info if device is currently connected to a wifi AP, |
| + // Return true if device is connected to a wifi AP, false otherwise. |
| + virtual bool GetCurrentWifiApInfo(WifiApInfo &info); |
|
stevenjb
2014/07/08 00:24:53
*info
zqiu1
2014/07/08 20:47:53
Done.
|
| + |
| // Replaces the default class factory instance of NetworkChangeNotifier class. |
| // The method will take over the ownership of |factory| object. |
| static void SetFactory(NetworkChangeNotifierFactory* factory); |
| @@ -159,6 +184,9 @@ class NET_EXPORT NetworkChangeNotifier { |
| // the internet, the connection type is CONNECTION_WIFI. |
| static ConnectionType GetConnectionType(); |
| + // Retreive the wifi AP info. |
| + static bool GetWifiApInfo(WifiApInfo &info); |
|
stevenjb
2014/07/08 00:24:53
*info
zqiu1
2014/07/08 20:47:53
Done.
|
| + |
| // Retrieve the last read DnsConfig. This could be expensive if the system has |
| // a large HOSTS file. |
| static void GetDnsConfig(DnsConfig* config); |