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

Unified Diff: chrome/browser/ui/browser.cc

Issue 11011002: Switch FaviconTabHelper to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 89a85b1f17aac181efc30afe7e57d6bf78002525..a6b8c9c5f3d919edb2f0344c4ec645be9e03150f 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -545,11 +545,13 @@ bool Browser::is_devtools() const {
// Browser, State Storage and Retrieval for UI:
gfx::Image Browser::GetCurrentPageIcon() const {
- TabContents* contents = chrome::GetActiveTabContents(this);
- // |contents| can be NULL since GetCurrentPageIcon() is called by the window
- // during the window's creation (before tabs have been added).
- return contents ?
- contents->favicon_tab_helper()->GetFavicon() : gfx::Image();
+ WebContents* web_contents = chrome::GetActiveWebContents(this);
+ // |web_contents| can be NULL since GetCurrentPageIcon() is called by the
+ // window during the window's creation (before tabs have been added).
+ FaviconTabHelper* favicon_tab_helper =
+ web_contents ? FaviconTabHelper::FromWebContents(web_contents)
+ : NULL;
stevenjb 2012/10/01 17:56:51 nit: does : NULL; fit on the previous line?
Avi (use Gerrit) 2012/10/01 19:23:57 Done.
+ return favicon_tab_helper ? favicon_tab_helper->GetFavicon() : gfx::Image();
}
string16 Browser::GetWindowTitleForCurrentTab() const {

Powered by Google App Engine
This is Rietveld 408576698