Chromium Code Reviews| Index: chrome/browser/history/expire_history_backend_unittest.cc |
| diff --git a/chrome/browser/history/expire_history_backend_unittest.cc b/chrome/browser/history/expire_history_backend_unittest.cc |
| index 2a3c8e09555c052243b49af8207ea04a027e810b..542e168fc9615e3cad8ddc578c00b19029415126 100644 |
| --- a/chrome/browser/history/expire_history_backend_unittest.cc |
| +++ b/chrome/browser/history/expire_history_backend_unittest.cc |
| @@ -19,6 +19,7 @@ |
| #include "chrome/browser/history/history_database.h" |
| #include "chrome/browser/history/history_details.h" |
| #include "chrome/browser/history/top_sites.h" |
| +#include "chrome/browser/history/top_sites_factory.h" |
| #include "chrome/test/base/testing_profile.h" |
| #include "chrome/tools/profiles/thumbnail-inl.h" |
| #include "components/history/core/browser/history_backend_notifier.h" |
| @@ -106,7 +107,6 @@ class ExpireHistoryTest : public testing::Test, |
| scoped_ptr<HistoryDatabase> main_db_; |
| scoped_ptr<ThumbnailDatabase> thumb_db_; |
| TestingProfile profile_; |
| - scoped_refptr<TopSites> top_sites_; |
| // Time at the beginning of the test, so everybody agrees what "now" is. |
| const Time now_; |
| @@ -141,11 +141,9 @@ class ExpireHistoryTest : public testing::Test, |
| expirer_.SetDatabases(main_db_.get(), thumb_db_.get()); |
| profile_.CreateTopSites(); |
| profile_.BlockUntilTopSitesLoaded(); |
| - top_sites_ = profile_.GetTopSites(); |
| } |
| void TearDown() override { |
| - top_sites_ = NULL; |
| ClearLastNotifications(); |
| @@ -229,6 +227,8 @@ void ExpireHistoryTest::AddExampleData(URLID url_ids[3], Time visit_times[4]) { |
| Time time; |
| GURL gurl; |
| + scoped_refptr<history::TopSites> top_sites = |
| + TopSitesFactory::GetForProfile(profile_); |
|
sdefresne
2015/01/21 17:57:23
You need to use "&profile_" here and below since "
|
| top_sites_->SetPageThumbnail(url_row1.url(), thumbnail, score); |
|
sdefresne
2015/01/21 17:57:23
You need to use "top_sites" here and below since y
sdefresne
2015/01/21 17:57:23
You need to use "top_sites" here and below since y
|
| top_sites_->SetPageThumbnail(url_row2.url(), thumbnail, score); |
| top_sites_->SetPageThumbnail(url_row3.url(), thumbnail, score); |
| @@ -311,6 +311,8 @@ bool ExpireHistoryTest::HasThumbnail(URLID url_id) { |
| return false; |
| GURL url = info.url(); |
| scoped_refptr<base::RefCountedMemory> data; |
| + scoped_refptr<history::TopSites> top_sites = |
| + TopSitesFactory::GetForProfile(profile_); |
| return top_sites_->GetPageThumbnail(url, false, &data); |
| } |