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

Unified Diff: ios/web/web_state/ui/crw_wk_web_view_web_controller.mm

Issue 1414793014: [ios] UMA metric to report cache miss for WKWebView cert verification. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Ilya's review comments Created 5 years, 1 month 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 | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/ui/crw_wk_web_view_web_controller.mm
diff --git a/ios/web/web_state/ui/crw_wk_web_view_web_controller.mm b/ios/web/web_state/ui/crw_wk_web_view_web_controller.mm
index e901ad813c785614371df2565dcdafbe6ef0abd7..d85fdb7dd346176d1ae3716cea5c257669af5fb2 100644
--- a/ios/web/web_state/ui/crw_wk_web_view_web_controller.mm
+++ b/ios/web/web_state/ui/crw_wk_web_view_web_controller.mm
@@ -962,12 +962,13 @@ WKWebViewErrorSource WKWebViewErrorSourceFromError(NSError* error) {
if (leafCert) {
auto error = _certVerificationErrors->Get(
{leafCert, base::SysNSStringToUTF8(host)});
- if (error != _certVerificationErrors->end()) {
+ bool cacheHit = error != _certVerificationErrors->end();
+ if (cacheHit) {
status.cert_status = error->second.status;
recoverable = error->second.is_recoverable;
- } else {
- // TODO(eugenebut): Report UMA with cache size (crbug.com/541736).
}
+ UMA_HISTOGRAM_BOOLEAN("WebController.CertVerificationErrorsCacheHit",
+ cacheHit);
}
}
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698