| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "chrome/renderer/safe_browsing/phishing_dom_feature_extractor.h" | 5 #include "chrome/renderer/safe_browsing/phishing_dom_feature_extractor.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/hash_tables.h" | 8 #include "base/hash_tables.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| 11 #include "base/metrics/histogram.h" | 11 #include "base/metrics/histogram.h" |
| 12 #include "base/string_util.h" |
| 12 #include "base/time.h" | 13 #include "base/time.h" |
| 13 #include "chrome/renderer/render_view.h" | 14 #include "chrome/renderer/render_view.h" |
| 14 #include "chrome/renderer/safe_browsing/feature_extractor_clock.h" | 15 #include "chrome/renderer/safe_browsing/feature_extractor_clock.h" |
| 15 #include "chrome/renderer/safe_browsing/features.h" | 16 #include "chrome/renderer/safe_browsing/features.h" |
| 16 #include "net/base/registry_controlled_domain.h" | 17 #include "net/base/registry_controlled_domain.h" |
| 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" | 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" |
| 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h" | 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h" |
| 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
| 20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNodeCollection.h" | 21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNodeCollection.h" |
| 21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" | 22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" |
| (...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 // Record number of script tags (discretized for numerical stability.) | 477 // Record number of script tags (discretized for numerical stability.) |
| 477 if (page_feature_state_->num_script_tags > 1) { | 478 if (page_feature_state_->num_script_tags > 1) { |
| 478 features_->AddBooleanFeature(features::kPageNumScriptTagsGTOne); | 479 features_->AddBooleanFeature(features::kPageNumScriptTagsGTOne); |
| 479 if (page_feature_state_->num_script_tags > 6) { | 480 if (page_feature_state_->num_script_tags > 6) { |
| 480 features_->AddBooleanFeature(features::kPageNumScriptTagsGTSix); | 481 features_->AddBooleanFeature(features::kPageNumScriptTagsGTSix); |
| 481 } | 482 } |
| 482 } | 483 } |
| 483 } | 484 } |
| 484 | 485 |
| 485 } // namespace safe_browsing | 486 } // namespace safe_browsing |
| OLD | NEW |