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

Unified Diff: trunk/src/chrome/browser/favicon/favicon_tab_helper.cc

Issue 334613004: Revert 276642 "Turn FaviconClient into a Keyed service." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 6 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: trunk/src/chrome/browser/favicon/favicon_tab_helper.cc
===================================================================
--- trunk/src/chrome/browser/favicon/favicon_tab_helper.cc (revision 276741)
+++ trunk/src/chrome/browser/favicon/favicon_tab_helper.cc (working copy)
@@ -6,7 +6,6 @@
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/favicon/chrome_favicon_client.h"
-#include "chrome/browser/favicon/chrome_favicon_client_factory.h"
#include "chrome/browser/favicon/favicon_handler.h"
#include "chrome/browser/favicon/favicon_service.h"
#include "chrome/browser/favicon/favicon_service_factory.h"
@@ -43,17 +42,21 @@
FaviconTabHelper::FaviconTabHelper(WebContents* web_contents)
: content::WebContentsObserver(web_contents),
profile_(Profile::FromBrowserContext(web_contents->GetBrowserContext())) {
- client_ = ChromeFaviconClientFactory::GetForProfile(profile_);
+ client_.reset(new ChromeFaviconClient(profile_));
#if defined(OS_ANDROID)
bool download_largest_icon = true;
#else
bool download_largest_icon = false;
#endif
- favicon_handler_.reset(new FaviconHandler(
- client_, this, FaviconHandler::FAVICON, download_largest_icon));
+ favicon_handler_.reset(new FaviconHandler(client_.get(),
+ this,
+ FaviconHandler::FAVICON,
+ download_largest_icon));
if (chrome::kEnableTouchIcon)
- touch_icon_handler_.reset(new FaviconHandler(
- client_, this, FaviconHandler::TOUCH, download_largest_icon));
+ touch_icon_handler_.reset(new FaviconHandler(client_.get(),
+ this,
+ FaviconHandler::TOUCH,
+ download_largest_icon));
}
FaviconTabHelper::~FaviconTabHelper() {

Powered by Google App Engine
This is Rietveld 408576698