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

Unified Diff: components/wifi/wifi_test.cc

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_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/wifi/wifi_test.cc
diff --git a/components/wifi/wifi_test.cc b/components/wifi/wifi_test.cc
index 2fa07c3a38eb983e00ec33c426cc7832d9bb4c36..47d1940e890a2f575f2256a11d37145e066d5c2f 100644
--- a/components/wifi/wifi_test.cc
+++ b/components/wifi/wifi_test.cc
@@ -82,19 +82,20 @@ class WiFiTest {
WiFiTest::Result WiFiTest::Main(int argc, const char* argv[]) {
if (!ParseCommandLine(argc, argv)) {
- VLOG(0) << "Usage: " << argv[0] <<
- " [--list]"
- " [--get_key]"
- " [--get_properties]"
- " [--create]"
- " [--connect]"
- " [--disconnect]"
- " [--scan]"
- " [--network_guid=<network_guid>]"
- " [--frequency=0|2400|5000]"
- " [--security=none|WEP-PSK|WPA-PSK|WPA2-PSK]"
- " [--password=<wifi_password>]"
- " [<network_guid>]\n";
+ VLOG(0) << "Usage: " << argv[0]
+ << " [--list]"
+ " [--get_connected_ssid]"
+ " [--get_key]"
+ " [--get_properties]"
+ " [--create]"
+ " [--connect]"
+ " [--disconnect]"
+ " [--scan]"
+ " [--network_guid=<network_guid>]"
+ " [--frequency=0|2400|5000]"
+ " [--security=none|WEP-PSK|WPA-PSK|WPA2-PSK]"
+ " [--password=<wifi_password>]"
+ " [<network_guid>]\n";
return RESULT_WRONG_USAGE;
}
@@ -232,6 +233,17 @@ bool WiFiTest::ParseCommandLine(int argc, const char* argv[]) {
return true;
}
+ if (parsed_command_line.HasSwitch("get_connected_ssid")) {
+ std::string ssid;
+ std::string error;
+ wifi_service_->GetConnectedNetworkSSID(&ssid, &error);
+ if (error.length() > 0)
+ VLOG(0) << error;
+ else
+ VLOG(0) << "Network SSID: " << ssid;
+ return true;
+ }
+
return false;
}
« no previous file with comments | « components/wifi/wifi_service_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698