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

Unified Diff: components/wifi/wifi_test.cc

Issue 102993002: Implement Networking Private API VerifyAndEncryptCredentials method (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Implement GetWiFiPasswordFromSystem on Mac. Created 6 years, 10 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
Index: components/wifi/wifi_test.cc
diff --git a/components/wifi/wifi_test.cc b/components/wifi/wifi_test.cc
index f5d14bb580c7ae26e70fc695d23f7a252a72c1b5..1bf13a7bf27a5695252bc30f1e84151d4d256bb9 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,18 @@ 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,
+ &password,
+ &error);
+ VLOG(0) << password << error;
+ return true;
+ }
+ }
+
return false;
}
« chrome/utility/chrome_content_utility_client.cc ('K') | « components/wifi/wifi_service_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698