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

Side by Side Diff: chrome/utility/extensions/extensions_handler.cc

Issue 442073003: Separate CryptoVerifyImpl into its own file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Feedback 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/utility/extensions/extensions_handler.h" 5 #include "chrome/utility/extensions/extensions_handler.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "chrome/common/chrome_utility_messages.h" 9 #include "chrome/common/chrome_utility_messages.h"
10 #include "chrome/common/extensions/chrome_extensions_client.h" 10 #include "chrome/common/extensions/chrome_extensions_client.h"
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 scoped_ptr<wifi::WiFiService> wifi_service(wifi::WiFiService::Create()); 271 scoped_ptr<wifi::WiFiService> wifi_service(wifi::WiFiService::Create());
272 wifi_service->Initialize(NULL); 272 wifi_service->Initialize(NULL);
273 273
274 std::string key_data; 274 std::string key_data;
275 std::string error; 275 std::string error;
276 wifi_service->GetKeyFromSystem(network_guid, &key_data, &error); 276 wifi_service->GetKeyFromSystem(network_guid, &key_data, &error);
277 277
278 std::vector<uint8> ciphertext; 278 std::vector<uint8> ciphertext;
279 bool success = error.empty() && !key_data.empty(); 279 bool success = error.empty() && !key_data.empty();
280 if (success) { 280 if (success) {
281 NetworkingPrivateCrypto crypto; 281 success = networking_private_crypto::EncryptByteString(
282 success = crypto.EncryptByteString(public_key, key_data, &ciphertext); 282 public_key, key_data, &ciphertext);
283 } 283 }
284 284
285 Send(new ChromeUtilityHostMsg_GotEncryptedWiFiCredentials(ciphertext, 285 Send(new ChromeUtilityHostMsg_GotEncryptedWiFiCredentials(ciphertext,
286 success)); 286 success));
287 } 287 }
288 #endif // defined(OS_WIN) 288 #endif // defined(OS_WIN)
289 289
290 } // namespace extensions 290 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698