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/browser/safe_browsing/browser_feature_extractor.h" | 5 #include "chrome/browser/safe_browsing/browser_feature_extractor.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/message_loop.h" | 12 #include "base/message_loop.h" |
13 #include "base/stringprintf.h" | 13 #include "base/strings/stringprintf.h" |
14 #include "base/time.h" | 14 #include "base/time.h" |
15 #include "chrome/browser/history/history_backend.h" | 15 #include "chrome/browser/history/history_backend.h" |
16 #include "chrome/browser/history/history_service.h" | 16 #include "chrome/browser/history/history_service.h" |
17 #include "chrome/browser/history/history_service_factory.h" | 17 #include "chrome/browser/history/history_service_factory.h" |
18 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
19 #include "chrome/browser/safe_browsing/browser_features.h" | 19 #include "chrome/browser/safe_browsing/browser_features.h" |
20 #include "chrome/browser/safe_browsing/client_side_detection_service.h" | 20 #include "chrome/browser/safe_browsing/client_side_detection_service.h" |
21 #include "chrome/browser/safe_browsing/ui_manager.h" | 21 #include "chrome/browser/safe_browsing/ui_manager.h" |
22 #include "chrome/common/safe_browsing/csd.pb.h" | 22 #include "chrome/common/safe_browsing/csd.pb.h" |
23 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 23 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
569 EXPECT_TRUE(hosts.find("evil.com") != hosts.end()); | 569 EXPECT_TRUE(hosts.find("evil.com") != hosts.end()); |
570 feature_name = base::StringPrintf("%s%s", features::kBadIpFetch, | 570 feature_name = base::StringPrintf("%s%s", features::kBadIpFetch, |
571 "92.92.92.92"); | 571 "92.92.92.92"); |
572 EXPECT_TRUE(features.count(feature_name)); | 572 EXPECT_TRUE(features.count(feature_name)); |
573 hosts = features[feature_name]; | 573 hosts = features[feature_name]; |
574 EXPECT_EQ(2U, hosts.size()); | 574 EXPECT_EQ(2U, hosts.size()); |
575 EXPECT_TRUE(hosts.find("bad.com") != hosts.end()); | 575 EXPECT_TRUE(hosts.find("bad.com") != hosts.end()); |
576 EXPECT_TRUE(hosts.find("evil.com") != hosts.end()); | 576 EXPECT_TRUE(hosts.find("evil.com") != hosts.end()); |
577 } | 577 } |
578 } // namespace safe_browsing | 578 } // namespace safe_browsing |
OLD | NEW |