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

Unified Diff: components/os_crypt/os_crypt_mac.mm

Issue 714273004: mac: Expose keychain access frequency to Telemetry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mock_keychain_sleep
Patch Set: Move GetEncryptionPassword so that it gets compiled on iOS. Created 5 years, 11 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 | « no previous file | crypto/mock_apple_keychain.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/os_crypt/os_crypt_mac.mm
diff --git a/components/os_crypt/os_crypt_mac.mm b/components/os_crypt/os_crypt_mac.mm
index 507993196aeefde7c018114ef0e4951c9ed810d3..dcfd2fbca12a7996add2ba1009753e1270b55036 100644
--- a/components/os_crypt/os_crypt_mac.mm
+++ b/components/os_crypt/os_crypt_mac.mm
@@ -16,6 +16,7 @@
#include "components/os_crypt/os_crypt_switches.h"
#include "crypto/apple_keychain.h"
#include "crypto/encryptor.h"
+#include "crypto/mock_apple_keychain.h"
#include "crypto/symmetric_key.h"
using crypto::AppleKeychain;
@@ -57,7 +58,8 @@ crypto::SymmetricKey* GetEncryptionKey() {
std::string password;
if (use_mock_keychain || mock_keychain_command_line_flag) {
- password = "mock_password";
+ crypto::MockAppleKeychain keychain;
+ password = keychain.GetEncryptionPassword();
} else {
AppleKeychain keychain;
KeychainPassword encryptor_password(keychain);
« no previous file with comments | « no previous file | crypto/mock_apple_keychain.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698