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

Unified Diff: crypto/mock_apple_keychain.cc

Issue 714273004: mac: Expose keychain access frequency to Telemetry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mock_keychain_sleep
Patch Set: Comments from dtu. Created 6 years 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: crypto/mock_apple_keychain.cc
diff --git a/crypto/mock_apple_keychain.cc b/crypto/mock_apple_keychain.cc
index 1ddfc8679461c6fddf320642405dc31f98643c0b..df5e845a67cd528e216bf35e7900f1df53538995 100644
--- a/crypto/mock_apple_keychain.cc
+++ b/crypto/mock_apple_keychain.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/logging.h"
+#include "base/perf_util.h"
#include "base/time/time.h"
#include "crypto/mock_apple_keychain.h"
@@ -17,6 +18,8 @@ OSStatus MockAppleKeychain::FindGenericPassword(
UInt32* passwordLength,
void** passwordData,
SecKeychainItemRef* itemRef) const {
+ base::IncrementKeychainAccessHistogram();
+
// When simulating |noErr|, return canned |passwordData| and
// |passwordLength|. Otherwise, just return given code.
if (find_generic_result_ == noErr) {
@@ -48,6 +51,8 @@ OSStatus MockAppleKeychain::AddGenericPassword(
UInt32 passwordLength,
const void* passwordData,
SecKeychainItemRef* itemRef) const {
+ base::IncrementKeychainAccessHistogram();
+
called_add_generic_ = true;
DCHECK_GT(passwordLength, 0U);

Powered by Google App Engine
This is Rietveld 408576698