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

Side by Side Diff: components/precache/core/precache_database_unittest.cc

Issue 2317123002: c/browser, c/common, components O-P: 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "components/precache/core/precache_database.h" 5 #include "components/precache/core/precache_database.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 class PrecacheDatabaseTest : public testing::Test { 87 class PrecacheDatabaseTest : public testing::Test {
88 public: 88 public:
89 PrecacheDatabaseTest() {} 89 PrecacheDatabaseTest() {}
90 ~PrecacheDatabaseTest() override {} 90 ~PrecacheDatabaseTest() override {}
91 91
92 protected: 92 protected:
93 void SetUp() override { 93 void SetUp() override {
94 precache_database_.reset(new PrecacheDatabase()); 94 precache_database_.reset(new PrecacheDatabase());
95 95
96 ASSERT_TRUE(scoped_temp_dir_.CreateUniqueTempDir()); 96 ASSERT_TRUE(scoped_temp_dir_.CreateUniqueTempDir());
97 base::FilePath db_path = scoped_temp_dir_.path().Append( 97 base::FilePath db_path = scoped_temp_dir_.GetPath().Append(
98 base::FilePath(FILE_PATH_LITERAL("precache_database"))); 98 base::FilePath(FILE_PATH_LITERAL("precache_database")));
99 ASSERT_TRUE(precache_database_->Init(db_path)); 99 ASSERT_TRUE(precache_database_->Init(db_path));
100 } 100 }
101 101
102 std::map<GURL, base::Time> GetActualURLTableMap() { 102 std::map<GURL, base::Time> GetActualURLTableMap() {
103 // Flush any buffered writes so that the URL table will be up to date. 103 // Flush any buffered writes so that the URL table will be up to date.
104 precache_database_->Flush(); 104 precache_database_->Flush();
105 105
106 std::map<GURL, base::Time> url_table_map; 106 std::map<GURL, base::Time> url_table_map;
107 precache_url_table()->GetAllDataForTesting(&url_table_map); 107 precache_url_table()->GetAllDataForTesting(&url_table_map);
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 EXPECT_NE(PrecacheReferrerHostEntry::kInvalidId, referrer_id); 612 EXPECT_NE(PrecacheReferrerHostEntry::kInvalidId, referrer_id);
613 precache_database_->GetURLListForReferrerHost( 613 precache_database_->GetURLListForReferrerHost(
614 referrer_id, &actual_used_urls, &actual_unused_urls); 614 referrer_id, &actual_used_urls, &actual_unused_urls);
615 EXPECT_TRUE(actual_used_urls.empty()); 615 EXPECT_TRUE(actual_used_urls.empty());
616 } 616 }
617 } 617 }
618 618
619 } // namespace 619 } // namespace
620 620
621 } // namespace precache 621 } // namespace precache
OLDNEW
« no previous file with comments | « components/precache/content/precache_manager_unittest.cc ('k') | components/precache/core/precache_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698