OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 handles the process of extracting all of the features from a | 5 // This class handles the process of extracting all of the features from a |
6 // page and computing a phishyness score. The basic steps are: | 6 // page and computing a phishyness score. The basic steps are: |
7 // - Run each feature extractor over the page, building up a FeatureMap of | 7 // - Run each feature extractor over the page, building up a FeatureMap of |
8 // feature -> value. | 8 // feature -> value. |
9 // - SHA-256 hash all of the feature names in the map so that they match the | 9 // - SHA-256 hash all of the feature names in the map so that they match the |
10 // supplied model. | 10 // supplied model. |
11 // - Hand the hashed map off to a Scorer, which computes the probability that | 11 // - Hand the hashed map off to a Scorer, which computes the probability that |
12 // the page is phishy. | 12 // the page is phishy. |
13 // - If the page is phishy, run the supplied callback. | 13 // - If the page is phishy, run the supplied callback. |
14 // | 14 // |
15 // For more details, see phishing_*_feature_extractor.h, scorer.h, and | 15 // For more details, see phishing_*_feature_extractor.h, scorer.h, and |
16 // client_model.proto. | 16 // client_model.proto. |
17 | 17 |
18 #ifndef CHROME_RENDERER_SAFE_BROWSING_PHISHING_CLASSIFIER_H_ | 18 #ifndef CHROME_RENDERER_SAFE_BROWSING_PHISHING_CLASSIFIER_H_ |
19 #define CHROME_RENDERER_SAFE_BROWSING_PHISHING_CLASSIFIER_H_ | 19 #define CHROME_RENDERER_SAFE_BROWSING_PHISHING_CLASSIFIER_H_ |
20 | 20 |
21 #include "base/basictypes.h" | 21 #include "base/basictypes.h" |
22 #include "base/callback_old.h" | |
23 #include "base/memory/scoped_ptr.h" | 22 #include "base/memory/scoped_ptr.h" |
24 #include "base/string16.h" | 23 #include "base/string16.h" |
25 #include "base/task.h" | 24 #include "base/task.h" |
26 | 25 |
27 namespace content { | 26 namespace content { |
28 class RenderView; | 27 class RenderView; |
29 } | 28 } |
30 | 29 |
31 namespace safe_browsing { | 30 namespace safe_browsing { |
32 class ClientPhishingRequest; | 31 class ClientPhishingRequest; |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 // Used in scheduling BeginFeatureExtraction tasks. | 140 // Used in scheduling BeginFeatureExtraction tasks. |
142 // These pointers are invalidated if classification is cancelled. | 141 // These pointers are invalidated if classification is cancelled. |
143 base::WeakPtrFactory<PhishingClassifier> weak_factory_; | 142 base::WeakPtrFactory<PhishingClassifier> weak_factory_; |
144 | 143 |
145 DISALLOW_COPY_AND_ASSIGN(PhishingClassifier); | 144 DISALLOW_COPY_AND_ASSIGN(PhishingClassifier); |
146 }; | 145 }; |
147 | 146 |
148 } // namespace safe_browsing | 147 } // namespace safe_browsing |
149 | 148 |
150 #endif // CHROME_RENDERER_SAFE_BROWSING_PHISHING_CLASSIFIER_H_ | 149 #endif // CHROME_RENDERER_SAFE_BROWSING_PHISHING_CLASSIFIER_H_ |
OLD | NEW |