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

Unified Diff: chrome/browser/ui/cocoa/tab_contents/favicon_util_mac.mm

Issue 11011002: Switch FaviconTabHelper to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 8 years, 3 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
« no previous file with comments | « chrome/browser/ui/browser_commands.cc ('k') | chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/tab_contents/favicon_util_mac.mm
diff --git a/chrome/browser/ui/cocoa/tab_contents/favicon_util_mac.mm b/chrome/browser/ui/cocoa/tab_contents/favicon_util_mac.mm
index 8112860088dfcf58394fdecb1465fd962367f83a..719a60245526601ed35c5cc29c805897048d6433 100644
--- a/chrome/browser/ui/cocoa/tab_contents/favicon_util_mac.mm
+++ b/chrome/browser/ui/cocoa/tab_contents/favicon_util_mac.mm
@@ -12,8 +12,11 @@
namespace mac {
NSImage* FaviconForTabContents(TabContents* contents) {
- if (contents && contents->favicon_tab_helper()->FaviconIsValid()) {
- NSImage* image = contents->favicon_tab_helper()->GetFavicon().AsNSImage();
+ FaviconTabHelper* favicon_tab_helper =
+ contents ? FaviconTabHelper::FromWebContents(contents->web_contents())
+ : NULL;
+ if (favicon_tab_helper && favicon_tab_helper->FaviconIsValid()) {
+ NSImage* image = favicon_tab_helper->GetFavicon().AsNSImage();
// The |image| could be nil if the bitmap is null. In that case, fallback
// to the default image.
if (image) {
« no previous file with comments | « chrome/browser/ui/browser_commands.cc ('k') | chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698