| 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/safe_browsing_store_file.h" | 5 #include "chrome/browser/safe_browsing/safe_browsing_store_file.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
| 9 #include "base/files/scoped_file.h" | 9 #include "base/files/scoped_file.h" |
| 10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
| 11 #include "base/md5.h" | 11 #include "base/md5.h" |
| 12 #include "base/path_service.h" | 12 #include "base/path_service.h" |
| 13 #include "base/test/test_simple_task_runner.h" | 13 #include "base/test/test_simple_task_runner.h" |
| 14 #include "chrome/common/chrome_paths.h" | 14 #include "chrome/common/chrome_paths.h" |
| 15 #include "components/safe_browsing_db/prefix_set.h" | |
| 16 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 17 #include "testing/platform_test.h" | 16 #include "testing/platform_test.h" |
| 18 | 17 |
| 19 namespace { | 18 namespace { |
| 20 | 19 |
| 21 const int kAddChunk1 = 1; | 20 const int kAddChunk1 = 1; |
| 22 const int kAddChunk2 = 3; | 21 const int kAddChunk2 = 3; |
| 23 const int kAddChunk3 = 5; | 22 const int kAddChunk3 = 5; |
| 24 const int kAddChunk4 = 7; | 23 const int kAddChunk4 = 7; |
| 25 // Disjoint chunk numbers for subs to flush out typos. | 24 // Disjoint chunk numbers for subs to flush out typos. |
| (...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 843 std::vector<SBPrefix> prefixes_result; | 842 std::vector<SBPrefix> prefixes_result; |
| 844 builder.GetPrefixSetNoHashes()->GetPrefixes(&prefixes_result); | 843 builder.GetPrefixSetNoHashes()->GetPrefixes(&prefixes_result); |
| 845 ASSERT_EQ(1U, prefixes_result.size()); | 844 ASSERT_EQ(1U, prefixes_result.size()); |
| 846 EXPECT_EQ(kHash1.prefix, prefixes_result[0]); | 845 EXPECT_EQ(kHash1.prefix, prefixes_result[0]); |
| 847 EXPECT_TRUE(add_full_hashes_result.empty()); | 846 EXPECT_TRUE(add_full_hashes_result.empty()); |
| 848 } | 847 } |
| 849 } | 848 } |
| 850 #endif | 849 #endif |
| 851 | 850 |
| 852 } // namespace safe_browsing | 851 } // namespace safe_browsing |
| OLD | NEW |