| Index: chrome/browser/thumbnails/thumbnail_list_source.cc
|
| diff --git a/chrome/browser/thumbnails/thumbnail_list_source.cc b/chrome/browser/thumbnails/thumbnail_list_source.cc
|
| index 1cba5a6b06d9a6d653fc43fbeb17181892c0993d..bbe7092963d604c2d3217c1104c34788b1139437 100644
|
| --- a/chrome/browser/thumbnails/thumbnail_list_source.cc
|
| +++ b/chrome/browser/thumbnails/thumbnail_list_source.cc
|
| @@ -79,7 +79,7 @@ void RenderMostVisitedURLList(
|
|
|
| ThumbnailListSource::ThumbnailListSource(Profile* profile)
|
| : thumbnail_service_(ThumbnailServiceFactory::GetForProfile(profile)),
|
| - profile_(profile),
|
| + top_sites_(TopSitesFactory::GetForProfile(profile)),
|
| weak_ptr_factory_(this) {
|
| }
|
|
|
| @@ -95,14 +95,12 @@ void ThumbnailListSource::StartDataRequest(
|
| int render_process_id,
|
| int render_frame_id,
|
| const content::URLDataSource::GotDataCallback& callback) {
|
| - scoped_refptr<history::TopSites> top_sites =
|
| - TopSitesFactory::GetForProfile(profile_);
|
| - if (!top_sites) {
|
| + if (!top_sites_) {
|
| callback.Run(NULL);
|
| return;
|
| }
|
|
|
| - top_sites->GetMostVisitedURLs(
|
| + top_sites_->GetMostVisitedURLs(
|
| base::Bind(&ThumbnailListSource::OnMostVisitedURLsAvailable,
|
| weak_ptr_factory_.GetWeakPtr(), callback),
|
| true);
|
|
|