diff options
author | noelutz@chromium.org <noelutz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-05 02:30:30 +0000 |
---|---|---|
committer | noelutz@chromium.org <noelutz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-05 02:30:30 +0000 |
commit | e60bc6fa324e2c5653657c5783314a951559cb89 (patch) | |
tree | 5658c079ff6259205d97ca0fc487248aadb7f389 | |
parent | 15dd88f17b260625a3da497c2558bec5c13aaabc (diff) | |
download | chromium_src-e60bc6fa324e2c5653657c5783314a951559cb89.zip chromium_src-e60bc6fa324e2c5653657c5783314a951559cb89.tar.gz chromium_src-e60bc6fa324e2c5653657c5783314a951559cb89.tar.bz2 |
Accurately account for pre-classification successes.
The current UMA stat which measures pre-classification failures will count pre-classification successes as failures when the object is eventually cancelled and deleted. This CL resets the done pre-classification check callbacks when the pre-classification checks succeed to stop counting successes as failures.
BUG=360115
Review URL: https://codereview.chromium.org/224803004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261950 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/safe_browsing/client_side_detection_host.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/chrome/browser/safe_browsing/client_side_detection_host.cc b/chrome/browser/safe_browsing/client_side_detection_host.cc index b223f54..a7d96cf 100644 --- a/chrome/browser/safe_browsing/client_side_detection_host.cc +++ b/chrome/browser/safe_browsing/client_side_detection_host.cc @@ -281,10 +281,18 @@ class ClientSideDetectionHost::ShouldClassifyUrlRequest // Everything checks out, so start classification. // |web_contents_| is safe to call as we will be destructed // before it is. - if (ShouldClassifyForPhishing()) + if (ShouldClassifyForPhishing()) { start_phishing_classification_cb_.Run(true); - if (ShouldClassifyForMalware()) + // Reset the callback to make sure ShouldClassifyForPhishing() + // returns false. + start_phishing_classification_cb_.Reset(); + } + if (ShouldClassifyForMalware()) { start_malware_classification_cb_.Run(true); + // Reset the callback to make sure ShouldClassifyForMalware() + // returns false. + start_malware_classification_cb_.Reset(); + } } content::FrameNavigateParams params_; |