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

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: browser_context 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 8e268779a2493d13c874e1d72fbaff644d9e5434..a11a775c3a803f8a202bcab7e31aa52bfaa2c653 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->browser_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