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 4671e4915b0e0de60ca70e031801aa2d3139ae6f..505d7926bc7243d371a4014626d8d9bc00fc7c94 100644 |
| --- a/net/base/network_change_notifier.h |
| +++ b/net/base/network_change_notifier.h |
| @@ -46,6 +46,20 @@ class NET_EXPORT NetworkChangeNotifier { |
| CONNECTION_LAST = CONNECTION_NONE |
| }; |
| + // Information of the currently connected wifi AP. |
| + struct NET_EXPORT WifiApInfo { |
| + WifiApInfo(); |
| + ~WifiApInfo(); |
|
stevenjb
2014/06/12 20:54:40
empty constructors (and destructors for no-virtual
zqiu1
2014/07/07 23:37:33
Done.
|
| + |
| + std::string bssid; |
| + std::string security; |
| + std::string model_number; |
| + std::string model_name; |
| + std::string device_name; |
| + std::string manufacturer; |
| + std::string oui_list; |
| + }; |
| + |
| class NET_EXPORT IPAddressObserver { |
| public: |
| // Will be called when the IP address of the primary interface changes. |
| @@ -134,6 +148,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) { return false; } |
|
stevenjb
2014/06/12 20:54:40
virtual methods should never be inlined (only exec
zqiu1
2014/07/07 23:37:33
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); |
| @@ -158,6 +176,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); |
| + |
| // Retrieve the last read DnsConfig. This could be expensive if the system has |
| // a large HOSTS file. |
| static void GetDnsConfig(DnsConfig* config); |