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

Unified Diff: components/wifi/wifi_service_mac.mm

Issue 880143003: Add SSID getter to WiFiService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mef comments Created 5 years, 11 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
« no previous file with comments | « components/wifi/wifi_service.h ('k') | components/wifi/wifi_service_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/wifi/wifi_service_mac.mm
diff --git a/components/wifi/wifi_service_mac.mm b/components/wifi/wifi_service_mac.mm
index 890b22906fc478fd042d7ce50ca3cab3168f8589..46fc9f09b5907744cfc9b8d35ae7481a39a468a2 100644
--- a/components/wifi/wifi_service_mac.mm
+++ b/components/wifi/wifi_service_mac.mm
@@ -76,6 +76,8 @@ class WiFiServiceMac : public WiFiService {
void RequestConnectedNetworkUpdate() override;
+ void GetConnectedNetworkSSID(std::string* ssid, std::string* error) override;
+
private:
// Checks |ns_error| and if is not |nil|, then stores |error_name|
// into |error|.
@@ -416,6 +418,12 @@ void WiFiServiceMac::RequestConnectedNetworkUpdate() {
OnWlanObserverNotification();
}
+void WiFiServiceMac::GetConnectedNetworkSSID(std::string* ssid,
+ std::string* error) {
+ *ssid = base::SysNSStringToUTF8([interface_ ssid]);
+ *error = "";
+}
+
std::string WiFiServiceMac::GetNetworkConnectionState(
const std::string& network_guid) const {
if (network_guid != GUIDFromSSID([interface_ ssid]))
« no previous file with comments | « components/wifi/wifi_service.h ('k') | components/wifi/wifi_service_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698