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

Side by Side Diff: components/safe_browsing_db/v4_store_unittest.cc

Issue 2321453002: c/browser, c/common, components S-W: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Just rebased Created 4 years, 3 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/files/file_util.h" 6 #include "base/files/file_util.h"
7 #include "base/files/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/test/test_simple_task_runner.h" 10 #include "base/test/test_simple_task_runner.h"
(...skipping 11 matching lines...) Expand all
22 using ::google::protobuf::int32; 22 using ::google::protobuf::int32;
23 23
24 class V4StoreTest : public PlatformTest { 24 class V4StoreTest : public PlatformTest {
25 public: 25 public:
26 V4StoreTest() : task_runner_(new base::TestSimpleTaskRunner) {} 26 V4StoreTest() : task_runner_(new base::TestSimpleTaskRunner) {}
27 27
28 void SetUp() override { 28 void SetUp() override {
29 PlatformTest::SetUp(); 29 PlatformTest::SetUp();
30 30
31 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 31 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
32 store_path_ = temp_dir_.path().AppendASCII("V4StoreTest.store"); 32 store_path_ = temp_dir_.GetPath().AppendASCII("V4StoreTest.store");
33 DVLOG(1) << "store_path_: " << store_path_.value(); 33 DVLOG(1) << "store_path_: " << store_path_.value();
34 } 34 }
35 35
36 void TearDown() override { 36 void TearDown() override {
37 base::DeleteFile(store_path_, false); 37 base::DeleteFile(store_path_, false);
38 PlatformTest::TearDown(); 38 PlatformTest::TearDown();
39 } 39 }
40 40
41 void WriteFileFormatProtoToFile(uint32_t magic, 41 void WriteFileFormatProtoToFile(uint32_t magic,
42 uint32_t version = 0, 42 uint32_t version = 0,
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 792
793 HashPrefixMap prefix_map_old; 793 HashPrefixMap prefix_map_old;
794 EXPECT_EQ(APPLY_UPDATE_SUCCESS, 794 EXPECT_EQ(APPLY_UPDATE_SUCCESS,
795 V4Store::AddUnlumpedHashes(4, "2222", &prefix_map_old)); 795 V4Store::AddUnlumpedHashes(4, "2222", &prefix_map_old));
796 EXPECT_EQ(CHECKSUM_MISMATCH_FAILURE, 796 EXPECT_EQ(CHECKSUM_MISMATCH_FAILURE,
797 V4Store(task_runner_, store_path_) 797 V4Store(task_runner_, store_path_)
798 .MergeUpdate(prefix_map_old, HashPrefixMap(), nullptr, "aawc")); 798 .MergeUpdate(prefix_map_old, HashPrefixMap(), nullptr, "aawc"));
799 } 799 }
800 800
801 } // namespace safe_browsing 801 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « components/safe_browsing_db/v4_local_database_manager_unittest.cc ('k') | components/search_engines/keyword_table_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698