summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorbryner@chromium.org <bryner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-03 01:46:25 +0000
committerbryner@chromium.org <bryner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-03 01:46:25 +0000
commit8bbe419073681b99c8fa2d2a5ebf192c3326ee73 (patch)
tree2a882383f2ac683eeaeb4ac0d1c59268d30ae3ac /chrome
parenta2bf9fe5d8d87448223f004d4ffd84c44e2f8868 (diff)
downloadchromium_src-8bbe419073681b99c8fa2d2a5ebf192c3326ee73.zip
chromium_src-8bbe419073681b99c8fa2d2a5ebf192c3326ee73.tar.gz
chromium_src-8bbe419073681b99c8fa2d2a5ebf192c3326ee73.tar.bz2
Clear the previous word state on a negative word cache hit.
BUG=none TEST=none Review URL: http://codereview.chromium.org/7828063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99497 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/renderer/safe_browsing/phishing_term_feature_extractor.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/renderer/safe_browsing/phishing_term_feature_extractor.cc b/chrome/renderer/safe_browsing/phishing_term_feature_extractor.cc
index 3a13d31..1bcb5e8 100644
--- a/chrome/renderer/safe_browsing/phishing_term_feature_extractor.cc
+++ b/chrome/renderer/safe_browsing/phishing_term_feature_extractor.cc
@@ -209,6 +209,10 @@ void PhishingTermFeatureExtractor::HandleWord(
// part of any term. This avoids the SHA256, lowercasing, and UTF conversion,
// all of which are relatively expensive.
if (negative_word_cache_.Get(word) != negative_word_cache_.end()) {
+ // We know we're no longer in a possible n-gram, so clear the previous word
+ // state.
+ state_->previous_words.clear();
+ state_->previous_word_sizes.clear();
return;
}