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

Unified Diff: chrome/utility/chrome_content_utility_client.cc

Issue 343053002: Credential passing for WifiManager in Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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: chrome/utility/chrome_content_utility_client.cc
diff --git a/chrome/utility/chrome_content_utility_client.cc b/chrome/utility/chrome_content_utility_client.cc
index e50cede5afa4723c89037032caafdf54787925e7..8e55c54fd81ad793004c24d7a07b62898dc0a5d9 100644
--- a/chrome/utility/chrome_content_utility_client.cc
+++ b/chrome/utility/chrome_content_utility_client.cc
@@ -414,8 +414,8 @@ bool ChromeContentUtilityClient::OnMessageReceived(
#endif // defined(OS_WIN) || defined(OS_MACOSX)
#if defined(OS_WIN)
- IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_GetAndEncryptWiFiCredentials,
- OnGetAndEncryptWiFiCredentials)
+ IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_GetWiFiCredentials,
+ OnGetWiFiCredentials)
#endif // defined(OS_WIN)
IPC_MESSAGE_UNHANDLED(handled = false)
@@ -1013,9 +1013,8 @@ void ChromeContentUtilityClient::OnIndexPicasaAlbumsContents(
#endif // defined(OS_WIN) || defined(OS_MACOSX)
#if defined(OS_WIN)
-void ChromeContentUtilityClient::OnGetAndEncryptWiFiCredentials(
- const std::string& network_guid,
- const std::vector<uint8>& public_key) {
+void ChromeContentUtilityClient::OnGetWiFiCredentials(
+ const std::string& network_guid) {
scoped_ptr<wifi::WiFiService> wifi_service(wifi::WiFiService::Create());
wifi_service->Initialize(NULL);
@@ -1023,15 +1022,7 @@ void ChromeContentUtilityClient::OnGetAndEncryptWiFiCredentials(
std::string error;
wifi_service->GetKeyFromSystem(network_guid, &key_data, &error);
- std::vector<uint8> ciphertext;
- bool success = error.empty() && !key_data.empty();
- if (success) {
- NetworkingPrivateCrypto crypto;
- success = crypto.EncryptByteString(public_key, key_data, &ciphertext);
- }
-
- Send(new ChromeUtilityHostMsg_GotEncryptedWiFiCredentials(ciphertext,
- success));
+ Send(new ChromeUtilityHostMsg_GotWiFiCredentials(key_data, error.empty()));
}
#endif // defined(OS_WIN)

Powered by Google App Engine
This is Rietveld 408576698