| 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..ca70ffb0dc3d47e2f117b59ef10a929b0142708b 100644
|
| --- a/net/base/network_change_notifier.h
|
| +++ b/net/base/network_change_notifier.h
|
| @@ -47,6 +47,29 @@ 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 access point.
|
| + struct NET_EXPORT WifiAccessPointInfo {
|
| + WifiAccessPointInfo();
|
| + ~WifiAccessPointInfo();
|
| + 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 +158,11 @@ class NET_EXPORT NetworkChangeNotifier {
|
| // cheap as this could be called (repeatedly) from the network thread.
|
| virtual ConnectionType GetCurrentConnectionType() const = 0;
|
|
|
| + // Fill in the wifi access point info if device is currently connected to a
|
| + // wifi access point. Return true if device is connected to a wifi access
|
| + // point, false otherwise.
|
| + virtual bool GetCurrentWifiAccessPointInfo(WifiAccessPointInfo* info);
|
| +
|
| // 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 +187,9 @@ class NET_EXPORT NetworkChangeNotifier {
|
| // the internet, the connection type is CONNECTION_WIFI.
|
| static ConnectionType GetConnectionType();
|
|
|
| + // Retreive the wifi access point info.
|
| + static bool GetWifiAccessPointInfo(WifiAccessPointInfo* info);
|
| +
|
| // Retrieve the last read DnsConfig. This could be expensive if the system has
|
| // a large HOSTS file.
|
| static void GetDnsConfig(DnsConfig* config);
|
|
|