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

Unified Diff: chrome/browser/ui/web_applications/web_app_ui.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/web_applications/web_app_ui.cc
diff --git a/chrome/browser/ui/web_applications/web_app_ui.cc b/chrome/browser/ui/web_applications/web_app_ui.cc
index 6b764be016679de221633b8ee1f3445fc738c6b1..25a9a7cbe29b93aef013e5757ac0261ca655b568 100644
--- a/chrome/browser/ui/web_applications/web_app_ui.cc
+++ b/chrome/browser/ui/web_applications/web_app_ui.cc
@@ -148,13 +148,13 @@ void UpdateShortcutWorker::DownloadIcon() {
return;
}
- tab_contents_->favicon_tab_helper()->DownloadImage(
- unprocessed_icons_.back().url,
- std::max(unprocessed_icons_.back().width,
- unprocessed_icons_.back().height),
- history::FAVICON,
- base::Bind(&UpdateShortcutWorker::OnIconDownloaded,
- base::Unretained(this)));
+ FaviconTabHelper::FromWebContents(tab_contents_->web_contents())->
+ DownloadImage(unprocessed_icons_.back().url,
+ std::max(unprocessed_icons_.back().width,
+ unprocessed_icons_.back().height),
+ history::FAVICON,
+ base::Bind(&UpdateShortcutWorker::OnIconDownloaded,
+ base::Unretained(this)));
unprocessed_icons_.pop_back();
}
@@ -308,6 +308,8 @@ void GetShortcutInfoForTab(TabContents* tab_contents,
DCHECK(info); // Must provide a valid info.
const WebContents* web_contents = tab_contents->web_contents();
+ const FaviconTabHelper* favicon_tab_helper =
+ FaviconTabHelper::FromWebContents(web_contents);
const extensions::TabHelper* extensions_tab_helper =
extensions::TabHelper::FromWebContents(web_contents);
const WebApplicationInfo& app_info = extensions_tab_helper->web_app_info();
@@ -319,8 +321,7 @@ void GetShortcutInfoForTab(TabContents* tab_contents,
web_contents->GetTitle()) :
app_info.title;
info->description = app_info.description;
- info->favicon =
- gfx::Image(tab_contents->favicon_tab_helper()->GetFavicon());
+ info->favicon = gfx::Image(favicon_tab_helper->GetFavicon());
info->profile_path = tab_contents->profile()->GetPath();
}
« no previous file with comments | « chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc ('k') | chrome/browser/ui/webui/web_ui_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698