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

Unified Diff: net/cert/x509_util_android.cc

Issue 144153002: Follow-up changes to Android certificate verification logic. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and fix X509UtilTest. Created 6 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 | « net/cert/cert_verify_proc_android.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/x509_util_android.cc
diff --git a/net/cert/x509_util_android.cc b/net/cert/x509_util_android.cc
index 1f6c3c696d23d38edb2acced9b7f8cfd391f5e14..128ea850ac0e89c1563f8dcc25ed17493f17f15a 100644
--- a/net/cert/x509_util_android.cc
+++ b/net/cert/x509_util_android.cc
@@ -4,7 +4,9 @@
#include "net/cert/x509_util_android.h"
+#include "base/android/build_info.h"
#include "base/android/jni_android.h"
+#include "base/metrics/histogram.h"
#include "jni/X509Util_jni.h"
#include "net/cert/cert_database.h"
@@ -14,6 +16,17 @@ void NotifyKeyChainChanged(JNIEnv* env, jclass clazz) {
CertDatabase::GetInstance()->OnAndroidKeyChainChanged();
}
+void RecordCertVerifyCapabilitiesHistogram(JNIEnv* env,
+ jclass clazz,
+ jboolean found_system_trust_roots) {
+ // Only record the histogram for 4.2 and up. Before 4.2, the platform doesn't
+ // return the certificate chain anyway.
+ if (base::android::BuildInfo::GetInstance()->sdk_int() >= 17) {
+ UMA_HISTOGRAM_BOOLEAN("Net.FoundSystemTrustRootsAndroid",
+ found_system_trust_roots);
+ }
+}
+
jobject GetApplicationContext(JNIEnv* env, jclass clazz) {
return base::android::GetApplicationContext();
}
« no previous file with comments | « net/cert/cert_verify_proc_android.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698