From 45582697f9846db420f07615886651e9688e70d3 Mon Sep 17 00:00:00 2001 From: sdefresne Date: Fri, 10 Apr 2015 08:25:15 -0700 Subject: Remove FaviconTabHelper Convert CreateForWebContents() and ShouldDisplayFavicon() from static method into free functions and move them into the favicon namespace. Port client code to use favicon::ContentFaviconDriver::FromWebContents() to access the favicon::FaviconDriver and prefer to use the public base class instead of favicon::ContentFaviconDriver. Rename FaviconTabHelperTest to ContentFaviconDriverTest. BUG=359569 TBR=jochen Review URL: https://codereview.chromium.org/1075443003 Cr-Commit-Position: refs/heads/master@{#324639} --- chrome/browser/task_manager/guest_information.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'chrome/browser/task_manager/guest_information.cc') diff --git a/chrome/browser/task_manager/guest_information.cc b/chrome/browser/task_manager/guest_information.cc index 0c7f7e1..fdfa035 100644 --- a/chrome/browser/task_manager/guest_information.cc +++ b/chrome/browser/task_manager/guest_information.cc @@ -6,13 +6,13 @@ #include "base/strings/string16.h" #include "chrome/browser/chrome_notification_types.h" -#include "chrome/browser/favicon/favicon_tab_helper.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/task_manager/renderer_resource.h" #include "chrome/browser/task_manager/resource_provider.h" #include "chrome/browser/task_manager/task_manager.h" #include "chrome/browser/task_manager/task_manager_util.h" #include "chrome/grit/generated_resources.h" +#include "components/favicon/content/content_favicon_driver.h" #include "content/public/browser/notification_service.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_process_host.h" @@ -77,9 +77,11 @@ base::string16 GuestResource::GetTitle() const { gfx::ImageSkia GuestResource::GetIcon() const { WebContents* web_contents = GetWebContents(); - if (web_contents && FaviconTabHelper::FromWebContents(web_contents)) { - return FaviconTabHelper::FromWebContents(web_contents)-> - GetFavicon().AsImageSkia(); + if (web_contents) { + favicon::FaviconDriver* favicon_driver = + favicon::ContentFaviconDriver::FromWebContents(web_contents); + if (favicon_driver) + return favicon_driver->GetFavicon().AsImageSkia(); } return gfx::ImageSkia(); } -- cgit v1.1