Commit 8db91339 authored by Xinghui Lu's avatar Xinghui Lu Committed by Chromium LUCI CQ

Log if the high confidence allowlist is too small.

If the size of the allowlist is too small, the allowlist check will be
skipped and Chrome will fall back to hash-based check. We'd like to know
how often that happens.

Metrics added:
SafeBrowsing.RT.AllowlistSizeTooSmall

Bug: 1164555
Change-Id: Ibd29ebfccab72eacdd0fb0b5a45f9a8ebc3eff05
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2622335
Commit-Queue: Xinghui Lu <xinghuilu@chromium.org>
Reviewed-by: default avatarMark Pearson <mpearson@chromium.org>
Reviewed-by: default avatarMichael Lippautz <mlippautz@chromium.org>
Reviewed-by: default avatarDaniel Rubery <drubery@chromium.org>
Cr-Commit-Position: refs/heads/master@{#843923}
parent f24c05b7
...@@ -430,6 +430,8 @@ AsyncMatch V4LocalDatabaseManager::CheckUrlForHighConfidenceAllowlist( ...@@ -430,6 +430,8 @@ AsyncMatch V4LocalDatabaseManager::CheckUrlForHighConfidenceAllowlist(
bool is_allowlist_too_small = bool is_allowlist_too_small =
IsStoreTooSmall(GetUrlHighConfidenceAllowlistId(), kBytesPerFullHashEntry, IsStoreTooSmall(GetUrlHighConfidenceAllowlistId(), kBytesPerFullHashEntry,
kHighConfidenceAllowlistMinimumEntryCount); kHighConfidenceAllowlistMinimumEntryCount);
UMA_HISTOGRAM_BOOLEAN("SafeBrowsing.RT.AllowlistSizeTooSmall",
is_allowlist_too_small);
if (!enabled_ || (is_allowlist_too_small && is_artificial_prefix_empty) || if (!enabled_ || (is_allowlist_too_small && is_artificial_prefix_empty) ||
!CanCheckUrl(url) || !CanCheckUrl(url) ||
(!all_stores_available && is_artificial_prefix_empty)) { (!all_stores_available && is_artificial_prefix_empty)) {
......
...@@ -8857,6 +8857,11 @@ Called by update_bad_message_reasons.py.--> ...@@ -8857,6 +8857,11 @@ Called by update_bad_message_reasons.py.-->
<int value="1" label="Translated"/> <int value="1" label="Translated"/>
</enum> </enum>
<enum name="BooleanUnavailable">
<int value="0" label="Available"/>
<int value="1" label="Unavailable"/>
</enum>
<enum name="BooleanUnderlay"> <enum name="BooleanUnderlay">
<int value="0" label="Overlay Mode"/> <int value="0" label="Overlay Mode"/>
<int value="1" label="Underlay Mode"/> <int value="1" label="Underlay Mode"/>
...@@ -841,6 +841,19 @@ reviews. Googlers can read more about this at go/gwsq-gerrit. ...@@ -841,6 +841,19 @@ reviews. Googlers can read more about this at go/gwsq-gerrit.
</summary> </summary>
</histogram> </histogram>
<histogram name="SafeBrowsing.RT.AllowlistSizeTooSmall"
enum="BooleanUnavailable" expires_after="2022-01-12">
<owner>xinghuilu@chromium.org</owner>
<owner>chrome-safebrowsing-alerts@google.com</owner>
<summary>
Logs whether the size of the high confidence allowlist is too small. It can
happen if it is misconfigured on the server-side, or the local file is
corrupted on the disk. If too small, the allowlist is considered as
unavailable. Logged each time a top frame URL navigation happens for users
who have the real time URL lookups enabled.
</summary>
</histogram>
<histogram name="SafeBrowsing.RT.AllStoresAvailable" enum="BooleanAvailable" <histogram name="SafeBrowsing.RT.AllStoresAvailable" enum="BooleanAvailable"
expires_after="2021-08-17"> expires_after="2021-08-17">
<owner>xinghuilu@chromium.org</owner> <owner>xinghuilu@chromium.org</owner>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment