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

Unified Diff: chrome/utility/extensions/extensions_handler.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, 4 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 | « chrome/utility/extensions/extensions_handler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/utility/extensions/extensions_handler.cc
diff --git a/chrome/utility/extensions/extensions_handler.cc b/chrome/utility/extensions/extensions_handler.cc
index 25f65a77707dfe1cd13deb206666dc7bcbb0901e..e8ef09fab3ddb3ff5340752ded5d91a887479609 100644
--- a/chrome/utility/extensions/extensions_handler.cc
+++ b/chrome/utility/extensions/extensions_handler.cc
@@ -111,8 +111,8 @@ bool ExtensionsHandler::OnMessageReceived(const IPC::Message& message) {
#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)
@@ -282,9 +282,7 @@ void ExtensionsHandler::OnIndexPicasaAlbumsContents(
#endif // defined(OS_WIN) || defined(OS_MACOSX)
#if defined(OS_WIN)
-void ExtensionsHandler::OnGetAndEncryptWiFiCredentials(
- const std::string& network_guid,
- const std::vector<uint8>& public_key) {
+void ExtensionsHandler::OnGetWiFiCredentials(const std::string& network_guid) {
scoped_ptr<wifi::WiFiService> wifi_service(wifi::WiFiService::Create());
wifi_service->Initialize(NULL);
@@ -292,15 +290,7 @@ void ExtensionsHandler::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) {
- success = networking_private_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)
« no previous file with comments | « chrome/utility/extensions/extensions_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698