OLD | NEW |
1 // Copyright (c) 2012 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 #include "chrome/renderer/safe_browsing/phishing_classifier.h" | 5 #include "chrome/renderer/safe_browsing/phishing_classifier.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
| 14 #include "build/build_config.h" |
14 #include "chrome/browser/ui/browser.h" | 15 #include "chrome/browser/ui/browser.h" |
15 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 16 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
16 #include "chrome/common/chrome_switches.h" | 17 #include "chrome/common/chrome_switches.h" |
17 #include "chrome/common/safe_browsing/client_model.pb.h" | 18 #include "chrome/common/safe_browsing/client_model.pb.h" |
18 #include "chrome/common/safe_browsing/csd.pb.h" | 19 #include "chrome/common/safe_browsing/csd.pb.h" |
19 #include "chrome/renderer/safe_browsing/features.h" | 20 #include "chrome/renderer/safe_browsing/features.h" |
20 #include "chrome/renderer/safe_browsing/mock_feature_extractor_clock.h" | 21 #include "chrome/renderer/safe_browsing/mock_feature_extractor_clock.h" |
21 #include "chrome/renderer/safe_browsing/murmurhash3_util.h" | 22 #include "chrome/renderer/safe_browsing/murmurhash3_util.h" |
22 #include "chrome/renderer/safe_browsing/scorer.h" | 23 #include "chrome/renderer/safe_browsing/scorer.h" |
23 #include "chrome/test/base/in_process_browser_test.h" | 24 #include "chrome/test/base/in_process_browser_test.h" |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 #endif | 351 #endif |
351 IN_PROC_BROWSER_TEST_F(PhishingClassifierTest, MAYBE_DisableDetection) { | 352 IN_PROC_BROWSER_TEST_F(PhishingClassifierTest, MAYBE_DisableDetection) { |
352 EXPECT_TRUE(classifier_->is_ready()); | 353 EXPECT_TRUE(classifier_->is_ready()); |
353 | 354 |
354 // Set a NULL scorer, which turns detection back off. | 355 // Set a NULL scorer, which turns detection back off. |
355 classifier_->set_phishing_scorer(NULL); | 356 classifier_->set_phishing_scorer(NULL); |
356 EXPECT_FALSE(classifier_->is_ready()); | 357 EXPECT_FALSE(classifier_->is_ready()); |
357 } | 358 } |
358 | 359 |
359 } // namespace safe_browsing | 360 } // namespace safe_browsing |
OLD | NEW |