OLD | NEW |
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 #pragma once | 16 #pragma once |
17 | 17 |
18 #include <string> | 18 #include <string> |
19 | 19 |
20 #include "base/basictypes.h" | 20 #include "base/basictypes.h" |
21 #include "base/callback.h" | 21 #include "base/callback_old.h" |
22 #include "base/hash_tables.h" | 22 #include "base/hash_tables.h" |
23 #include "base/memory/ref_counted.h" | 23 #include "base/memory/ref_counted.h" |
24 #include "base/message_loop_proxy.h" | 24 #include "base/message_loop_proxy.h" |
25 #include "base/platform_file.h" | 25 #include "base/platform_file.h" |
26 #include "base/string_piece.h" | 26 #include "base/string_piece.h" |
27 #include "chrome/renderer/safe_browsing/client_model.pb.h" | 27 #include "chrome/renderer/safe_browsing/client_model.pb.h" |
28 | 28 |
29 namespace safe_browsing { | 29 namespace safe_browsing { |
30 class FeatureMap; | 30 class FeatureMap; |
31 | 31 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 91 |
92 ClientSideModel model_; | 92 ClientSideModel model_; |
93 base::hash_set<std::string> page_terms_; | 93 base::hash_set<std::string> page_terms_; |
94 base::hash_set<std::string> page_words_; | 94 base::hash_set<std::string> page_words_; |
95 | 95 |
96 DISALLOW_COPY_AND_ASSIGN(Scorer); | 96 DISALLOW_COPY_AND_ASSIGN(Scorer); |
97 }; | 97 }; |
98 } // namepsace safe_browsing | 98 } // namepsace safe_browsing |
99 | 99 |
100 #endif // CHROME_RENDERER_SAFE_BROWSING_SCORER_H_ | 100 #endif // CHROME_RENDERER_SAFE_BROWSING_SCORER_H_ |
OLD | NEW |