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

Unified Diff: chrome/renderer/safe_browsing/phishing_classifier_browsertest.cc

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/phishing_classifier_browsertest.cc
diff --git a/chrome/renderer/safe_browsing/phishing_classifier_browsertest.cc b/chrome/renderer/safe_browsing/phishing_classifier_browsertest.cc
index e92ed7017dea1422ad91cfe8c4a818e915ef7386..d2a75dfc4ba64abe9aa92a75417c25d5c63d57ba 100644
--- a/chrome/renderer/safe_browsing/phishing_classifier_browsertest.cc
+++ b/chrome/renderer/safe_browsing/phishing_classifier_browsertest.cc
@@ -18,6 +18,7 @@
#include "chrome/common/safe_browsing/csd.pb.h"
#include "chrome/renderer/safe_browsing/features.h"
#include "chrome/renderer/safe_browsing/mock_feature_extractor_clock.h"
+#include "chrome/renderer/safe_browsing/murmurhash3_util.h"
#include "chrome/renderer/safe_browsing/render_view_fake_resources_test.h"
#include "chrome/renderer/safe_browsing/scorer.h"
#include "crypto/sha2.h"
@@ -72,7 +73,8 @@ class PhishingClassifierTest : public RenderViewFakeResourcesTest {
rule->set_weight(1.0);
model.add_page_term(3);
- model.add_page_word(3);
+ model.set_murmur_hash_seed(2777808611U);
+ model.add_page_word(MurmurHash3String("login", model.murmur_hash_seed()));
model.set_max_words_per_term(1);
clock_ = new MockFeatureExtractorClock;
« no previous file with comments | « chrome/renderer/safe_browsing/phishing_classifier.cc ('k') | chrome/renderer/safe_browsing/phishing_term_feature_extractor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698