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

Side by Side Diff: chrome/renderer/safe_browsing/scorer.h

Issue 2743563006: Componentize safe_browsing [+1]: move protos to component
Patch Set: fix remaining proto references Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // This class loads a client-side model and lets you compute a phishing score 5 // This class loads a client-side model and lets you compute a phishing score
6 // for a set of previously extracted features. The phishing score corresponds 6 // for a set of previously extracted features. The phishing score corresponds
7 // to the probability that the features are indicative of a phishing site. 7 // to the probability that the features are indicative of a phishing site.
8 // 8 //
9 // For more details on how the score is actually computed for a given model 9 // For more details on how the score is actually computed for a given model
10 // and a given set of features read the comments in client_model.proto file. 10 // and a given set of features read the comments in client_model.proto file.
11 // 11 //
12 // See features.h for a list of features that are currently used. 12 // See features.h for a list of features that are currently used.
13 13
14 #ifndef CHROME_RENDERER_SAFE_BROWSING_SCORER_H_ 14 #ifndef CHROME_RENDERER_SAFE_BROWSING_SCORER_H_
15 #define CHROME_RENDERER_SAFE_BROWSING_SCORER_H_ 15 #define CHROME_RENDERER_SAFE_BROWSING_SCORER_H_
16 16
17 #include <stddef.h> 17 #include <stddef.h>
18 #include <stdint.h> 18 #include <stdint.h>
19 19
20 #include <string> 20 #include <string>
21 21
22 #include "base/containers/hash_tables.h" 22 #include "base/containers/hash_tables.h"
23 #include "base/macros.h" 23 #include "base/macros.h"
24 #include "base/strings/string_piece.h" 24 #include "base/strings/string_piece.h"
25 #include "chrome/common/safe_browsing/client_model.pb.h" 25 #include "components/safe_browsing/common/client_model.pb.h"
26 26
27 namespace safe_browsing { 27 namespace safe_browsing {
28 class FeatureMap; 28 class FeatureMap;
29 29
30 // Scorer methods are virtual to simplify mocking of this class. 30 // Scorer methods are virtual to simplify mocking of this class.
31 class Scorer { 31 class Scorer {
32 public: 32 public:
33 virtual ~Scorer(); 33 virtual ~Scorer();
34 34
35 // Factory method which creates a new Scorer object by parsing the given 35 // Factory method which creates a new Scorer object by parsing the given
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 84
85 ClientSideModel model_; 85 ClientSideModel model_;
86 base::hash_set<std::string> page_terms_; 86 base::hash_set<std::string> page_terms_;
87 base::hash_set<uint32_t> page_words_; 87 base::hash_set<uint32_t> page_words_;
88 88
89 DISALLOW_COPY_AND_ASSIGN(Scorer); 89 DISALLOW_COPY_AND_ASSIGN(Scorer);
90 }; 90 };
91 } // namespace safe_browsing 91 } // namespace safe_browsing
92 92
93 #endif // CHROME_RENDERER_SAFE_BROWSING_SCORER_H_ 93 #endif // CHROME_RENDERER_SAFE_BROWSING_SCORER_H_
OLDNEW
« no previous file with comments | « chrome/renderer/safe_browsing/phishing_classifier_delegate_browsertest.cc ('k') | chrome/renderer/safe_browsing/scorer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698