summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpaulg@google.com <paulg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-11 21:59:58 +0000
committerpaulg@google.com <paulg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-11 21:59:58 +0000
commit09d985f6f84d13dc3c4a9d6b826a6ddb431cfad5 (patch)
tree02e3627c0aebcc1d9b1fe03f6de38a9bdad54159
parente761d8bfa0043e0230d827ed3ae37fd7337de503 (diff)
downloadchromium_src-09d985f6f84d13dc3c4a9d6b826a6ddb431cfad5.zip
chromium_src-09d985f6f84d13dc3c4a9d6b826a6ddb431cfad5.tar.gz
chromium_src-09d985f6f84d13dc3c4a9d6b826a6ddb431cfad5.tar.bz2
Add a histogram to measure the number of times we ask
for a prefix that the SafeBrowsing servers have, but that the full hashes provided in the response don't match the URL we're looking up. Review URL: http://codereview.chromium.org/115201 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15795 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_service.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc
index bd7a9c4..d3d0920 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
@@ -442,8 +442,15 @@ void SafeBrowsingService::HandleOneCheck(
if (check->client) {
UrlCheckResult result = URL_SAFE;
int index = safe_browsing_util::CompareFullHashes(check->url, full_hashes);
- if (index != -1)
+ if (index != -1) {
result = GetResultFromListname(full_hashes[index].list_name);
+ } else {
+ // Log the case where the SafeBrowsing servers return full hashes in the
+ // GetHash response that match the prefix we're looking up, but don't
+ // match the full hash of the URL.
+ if (!full_hashes.empty())
+ UMA_HISTOGRAM_COUNTS("SB2.GetHashServerMiss", 1);
+ }
// Let the client continue handling the original request.
check->client->OnUrlCheckResult(check->url, result);