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

Unified Diff: chrome/browser/ui/ash/launcher/browser_launcher_item_controller.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
« no previous file with comments | « chrome/browser/task_manager/task_manager_resource_providers.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/launcher/browser_launcher_item_controller.cc
diff --git a/chrome/browser/ui/ash/launcher/browser_launcher_item_controller.cc b/chrome/browser/ui/ash/launcher/browser_launcher_item_controller.cc
index c1a6027788c125b8d231c057fe4b2cb8a6fe21ad..aa21485623eee3bc07b4f5f534aa238c9ef2732f 100644
--- a/chrome/browser/ui/ash/launcher/browser_launcher_item_controller.cc
+++ b/chrome/browser/ui/ash/launcher/browser_launcher_item_controller.cc
@@ -183,8 +183,10 @@ void BrowserLauncherItemController::TabChangedAt(
return;
}
- if (tab->favicon_tab_helper()->FaviconIsValid() ||
- !tab->favicon_tab_helper()->ShouldDisplayFavicon()) {
+ FaviconTabHelper* favicon_tab_helper =
+ FaviconTabHelper::FromWebContents(tab->web_contents());
+ if (favicon_tab_helper->FaviconIsValid() ||
+ !favicon_tab_helper->ShouldDisplayFavicon()) {
// We have the favicon, update immediately.
UpdateLauncher(tab);
} else {
@@ -267,8 +269,10 @@ void BrowserLauncherItemController::UpdateLauncher(TabContents* tab) {
} else {
DCHECK_EQ(TYPE_TABBED, type());
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- if (tab->favicon_tab_helper()->ShouldDisplayFavicon()) {
- item.image = tab->favicon_tab_helper()->GetFavicon().AsImageSkia();
+ FaviconTabHelper* favicon_tab_helper =
+ FaviconTabHelper::FromWebContents(tab->web_contents());
+ if (favicon_tab_helper->ShouldDisplayFavicon()) {
+ item.image = favicon_tab_helper->GetFavicon().AsImageSkia();
if (item.image.isNull()) {
item.image = *rb.GetImageSkiaNamed(IDR_DEFAULT_FAVICON);
}
« no previous file with comments | « chrome/browser/task_manager/task_manager_resource_providers.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698