Chromium Code Reviews| 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 { |