Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5947)

Unified Diff: chrome/browser/tab_contents/thumbnail_generator.cc

Issue 7464009: Removal of Profile from content part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: works now Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;

Powered by Google App Engine
This is Rietveld 408576698