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/prefix_set.h" | 5 #include "chrome/browser/safe_browsing/prefix_set.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <iterator> | 8 #include <iterator> |
9 #include <set> | |
10 #include <string> | |
11 #include <utility> | |
Scott Hess - ex-Googler
2014/06/04 16:19:08
You already added utility to prefix_set.h.
jaekyeom
2014/06/05 11:58:57
Done.
| |
9 | 12 |
10 #include "base/file_util.h" | 13 #include "base/file_util.h" |
11 #include "base/files/scoped_file.h" | 14 #include "base/files/scoped_file.h" |
12 #include "base/files/scoped_temp_dir.h" | 15 #include "base/files/scoped_temp_dir.h" |
13 #include "base/logging.h" | 16 #include "base/logging.h" |
14 #include "base/md5.h" | 17 #include "base/md5.h" |
15 #include "base/memory/scoped_ptr.h" | 18 #include "base/memory/scoped_ptr.h" |
16 #include "base/path_service.h" | 19 #include "base/path_service.h" |
17 #include "base/rand_util.h" | 20 #include "base/rand_util.h" |
18 #include "base/strings/string_number_conversions.h" | 21 #include "base/strings/string_number_conversions.h" |
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
733 const SBFullHash kHash2 = SBFullHashForString("www.evil.com/phishing.html"); | 736 const SBFullHash kHash2 = SBFullHashForString("www.evil.com/phishing.html"); |
734 | 737 |
735 EXPECT_TRUE(prefix_set->Exists(kHash1)); | 738 EXPECT_TRUE(prefix_set->Exists(kHash1)); |
736 EXPECT_TRUE(prefix_set->Exists(kHash2)); | 739 EXPECT_TRUE(prefix_set->Exists(kHash2)); |
737 EXPECT_FALSE(prefix_set->PrefixExists(kHash1.prefix)); | 740 EXPECT_FALSE(prefix_set->PrefixExists(kHash1.prefix)); |
738 EXPECT_FALSE(prefix_set->PrefixExists(kHash2.prefix)); | 741 EXPECT_FALSE(prefix_set->PrefixExists(kHash2.prefix)); |
739 } | 742 } |
740 #endif | 743 #endif |
741 | 744 |
742 } // namespace safe_browsing | 745 } // namespace safe_browsing |
OLD | NEW |