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 bd447c20a6bd1f213e1f932223a4b7533dfbd57b..9e0bf6ea258e6a37044e352eac3b42b004e48e23 100644 |
--- a/chrome/browser/thumbnails/thumbnail_list_source.cc |
+++ b/chrome/browser/thumbnails/thumbnail_list_source.cc |
@@ -12,6 +12,7 @@ |
#include "base/memory/ref_counted_memory.h" |
#include "base/strings/string_util.h" |
#include "chrome/browser/history/top_sites.h" |
+#include "chrome/browser/history/top_sites_factory.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/search/instant_io_context.h" |
#include "chrome/browser/thumbnails/thumbnail_service.h" |
@@ -94,15 +95,17 @@ void ThumbnailListSource::StartDataRequest( |
int render_process_id, |
int render_frame_id, |
const content::URLDataSource::GotDataCallback& callback) { |
- if (!profile_->GetTopSites()) { |
+ scoped_refptr<history::TopSites> top_sites = |
+ TopSitesFactory::GetForProfile(profile_); |
+ if (!top_sites) { |
callback.Run(NULL); |
return; |
} |
- profile_->GetTopSites()->GetMostVisitedURLs( |
+ top_sites->GetMostVisitedURLs( |
base::Bind(&ThumbnailListSource::OnMostVisitedURLsAvailable, |
- weak_ptr_factory_.GetWeakPtr(), |
- callback), true); |
+ weak_ptr_factory_.GetWeakPtr(), callback), |
+ true); |
} |
std::string ThumbnailListSource::GetMimeType(const std::string& path) const { |