Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3992)

Unified Diff: chrome/renderer/safe_browsing/scorer.h

Issue 7866011: Switch to the new client-side phishing model that uses Murmurhash for word hashes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile problems and add another test Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/safe_browsing/scorer.h
diff --git a/chrome/renderer/safe_browsing/scorer.h b/chrome/renderer/safe_browsing/scorer.h
index eef54198537851a29b77e86949918872a2fd4ec2..e925935d05018cb6922d382de8b930839d7c2332 100644
--- a/chrome/renderer/safe_browsing/scorer.h
+++ b/chrome/renderer/safe_browsing/scorer.h
@@ -50,11 +50,14 @@ class Scorer {
// Returns a set of hashed page words that appear in the model in binary
// format.
- const base::hash_set<std::string>& page_words() const;
+ const base::hash_set<uint32>& page_words() const;
// Return the maximum number of words per term for the loaded model.
size_t max_words_per_term() const;
+ // Returns the murmurhash3 seed for the loaded model.
+ uint32 murmurhash3_seed() const;
+
protected:
// Most clients should use the factory method. This constructor is public
// to allow for mock implementations.
@@ -73,7 +76,7 @@ class Scorer {
ClientSideModel model_;
base::hash_set<std::string> page_terms_;
- base::hash_set<std::string> page_words_;
+ base::hash_set<uint32> page_words_;
DISALLOW_COPY_AND_ASSIGN(Scorer);
};
« no previous file with comments | « chrome/renderer/safe_browsing/phishing_term_feature_extractor_unittest.cc ('k') | chrome/renderer/safe_browsing/scorer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698