Index: chrome/browser/tab_contents/thumbnail_generator.cc |
diff --git a/chrome/browser/tab_contents/thumbnail_generator.cc b/chrome/browser/tab_contents/thumbnail_generator.cc |
index a11afb594d06867935259eca59348466e5d1ed0d..cad86065204e3c49cc466f8572f20905055f4230 100644 |
--- a/chrome/browser/tab_contents/thumbnail_generator.cc |
+++ b/chrome/browser/tab_contents/thumbnail_generator.cc |
@@ -440,9 +440,10 @@ SkBitmap ThumbnailGenerator::GetClippedBitmap(const SkBitmap& bitmap, |
void ThumbnailGenerator::UpdateThumbnailIfNecessary( |
TabContents* tab_contents) { |
const GURL& url = tab_contents->GetURL(); |
- history::TopSites* top_sites = tab_contents->profile()->GetTopSites(); |
+ Profile* profile = static_cast<Profile*>(tab_contents->context()); |
+ history::TopSites* top_sites = profile->GetTopSites(); |
// Skip if we don't need to update the thumbnail. |
- if (!ShouldUpdateThumbnail(tab_contents->profile(), top_sites, url)) |
+ if (!ShouldUpdateThumbnail(profile, top_sites, url)) |
return; |
const int options = ThumbnailGenerator::kClippedThumbnail; |