Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_store_file_unittest.cc

Issue 1399843003: Move prefix_set and parts of s_b_util into a new component safe_browsing_db. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use group instead of a static_library for targets that have no sources. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
15 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
16 #include "testing/platform_test.h" 17 #include "testing/platform_test.h"
17 18
18 namespace { 19 namespace {
19 20
20 const int kAddChunk1 = 1; 21 const int kAddChunk1 = 1;
21 const int kAddChunk2 = 3; 22 const int kAddChunk2 = 3;
22 const int kAddChunk3 = 5; 23 const int kAddChunk3 = 5;
23 const int kAddChunk4 = 7; 24 const int kAddChunk4 = 7;
24 // Disjoint chunk numbers for subs to flush out typos. 25 // Disjoint chunk numbers for subs to flush out typos.
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 std::vector<SBPrefix> prefixes_result; 843 std::vector<SBPrefix> prefixes_result;
843 builder.GetPrefixSetNoHashes()->GetPrefixes(&prefixes_result); 844 builder.GetPrefixSetNoHashes()->GetPrefixes(&prefixes_result);
844 ASSERT_EQ(1U, prefixes_result.size()); 845 ASSERT_EQ(1U, prefixes_result.size());
845 EXPECT_EQ(kHash1.prefix, prefixes_result[0]); 846 EXPECT_EQ(kHash1.prefix, prefixes_result[0]);
846 EXPECT_TRUE(add_full_hashes_result.empty()); 847 EXPECT_TRUE(add_full_hashes_result.empty());
847 } 848 }
848 } 849 }
849 #endif 850 #endif
850 851
851 } // namespace safe_browsing 852 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_store_file.cc ('k') | chrome/browser/safe_browsing/safe_browsing_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698