| Index: components/wifi/wifi_test.cc
|
| diff --git a/components/wifi/wifi_test.cc b/components/wifi/wifi_test.cc
|
| index c8875ba59f8efaaf30b39c93caa85502f8c55d17..b5e069094257cd00b8509a16268fcc296f6f4b91 100644
|
| --- a/components/wifi/wifi_test.cc
|
| +++ b/components/wifi/wifi_test.cc
|
| @@ -66,6 +66,7 @@ WiFiTest::Result WiFiTest::Main(int argc, const char* argv[]) {
|
| if (!ParseCommandLine(argc, argv)) {
|
| VLOG(0) << "Usage: " << argv[0] <<
|
| " [--list]"
|
| + " [--get_password]"
|
| " [--get_properties]"
|
| " [--create]"
|
| " [--connect]"
|
| @@ -190,6 +191,19 @@ bool WiFiTest::ParseCommandLine(int argc, const char* argv[]) {
|
| }
|
| }
|
|
|
| + if (parsed_command_line.HasSwitch("get_password")) {
|
| + if (network_guid.length() > 0) {
|
| + std::string error;
|
| + std::string password;
|
| + wifi_service->GetPassphraseFromSystem(network_guid,
|
| + std::string(),
|
| + &password,
|
| + &error);
|
| + VLOG(0) << password << error;
|
| + return true;
|
| + }
|
| + }
|
| +
|
| return false;
|
| }
|
|
|
|
|