summaryrefslogtreecommitdiffstats
path: root/ios
diff options
context:
space:
mode:
authoreugenebut <eugenebut@chromium.org>2015-11-05 18:50:33 -0800
committerCommit bot <commit-bot@chromium.org>2015-11-06 02:51:25 +0000
commit018d0db613993f7ec1b08eb0c7543e0111e242ed (patch)
tree17a4b80c416f5bb8bcf9d0c5c63d1a8d6392ab50 /ios
parent71cdd9187961525087022b0e9b00b6b103f76fd1 (diff)
downloadchromium_src-018d0db613993f7ec1b08eb0c7543e0111e242ed.zip
chromium_src-018d0db613993f7ec1b08eb0c7543e0111e242ed.tar.gz
chromium_src-018d0db613993f7ec1b08eb0c7543e0111e242ed.tar.bz2
[ios] UMA metric to report cache hit/miss for WKWebView cert verification.
WKWebView Web Controller has a cache of pending cert verification results to avoid extra verifications when presenting SSL interstitial. This metric helps to understand whether or not cache miss is possible. BUG=541736 Review URL: https://codereview.chromium.org/1414793014 Cr-Commit-Position: refs/heads/master@{#358240}
Diffstat (limited to 'ios')
-rw-r--r--ios/web/web_state/ui/crw_wk_web_view_web_controller.mm7
1 files changed, 4 insertions, 3 deletions
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 e901ad81..d85fdb7 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);
}
}