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

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: 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
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 89a85b1f17aac181efc30afe7e57d6bf78002525..191a36fbe5fa5bd2cf1eeb54e46c92d8e14f03f1 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -545,11 +545,12 @@ 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;
+ return favicon_tab_helper ? favicon_tab_helper->GetFavicon() : gfx::Image();
}
string16 Browser::GetWindowTitleForCurrentTab() const {
« no previous file with comments | « chrome/browser/ui/ash/launcher/browser_launcher_item_controller.cc ('k') | chrome/browser/ui/browser_commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698