Chromium Code Reviews| Index: chrome/browser/thumbnails/thumbnail_service_impl.cc |
| diff --git a/chrome/browser/thumbnails/thumbnail_service_impl.cc b/chrome/browser/thumbnails/thumbnail_service_impl.cc |
| index 8f572d39b14994962831bcaef78b10eaf32e672e..74841cbaf584c255215366b69a13d5e26df24ba3 100644 |
| --- a/chrome/browser/thumbnails/thumbnail_service_impl.cc |
| +++ b/chrome/browser/thumbnails/thumbnail_service_impl.cc |
| @@ -8,6 +8,7 @@ |
| #include "base/memory/ref_counted_memory.h" |
| #include "base/time/time.h" |
| #include "chrome/browser/history/history_service.h" |
| +#include "chrome/browser/history/top_sites_factory.h" |
| #include "chrome/browser/thumbnails/content_based_thumbnailing_algorithm.h" |
| #include "chrome/browser/thumbnails/simple_thumbnail_crop.h" |
| #include "chrome/browser/thumbnails/thumbnailing_context.h" |
| @@ -37,7 +38,7 @@ void AddForcedURLOnUIThread(scoped_refptr<history::TopSites> top_sites, |
| const GURL& url) { |
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| - if (top_sites.get() != NULL) |
| + if (top_sites) |
| top_sites->AddForcedURL(url, base::Time::Now()); |
| } |
| @@ -46,7 +47,7 @@ void AddForcedURLOnUIThread(scoped_refptr<history::TopSites> top_sites, |
| namespace thumbnails { |
| ThumbnailServiceImpl::ThumbnailServiceImpl(Profile* profile) |
| - : top_sites_(profile->GetTopSites()), |
| + : top_sites_(TopSitesFactory::GetForProfile(profile).get()), |
|
Bernhard Bauer
2015/01/08 10:22:05
Remove the .get().
Jitu( very slow this week)
2015/01/12 11:30:08
Done.
|
| use_thumbnail_retargeting_(IsThumbnailRetargetingEnabled()) { |
| } |