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

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

Issue 301613004: Turn FaviconClient into a Keyed service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: touching wood 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: chrome/browser/favicon/favicon_tab_helper.cc
diff --git a/chrome/browser/favicon/favicon_tab_helper.cc b/chrome/browser/favicon/favicon_tab_helper.cc
index 67eb09337ff1eacfa47ff758476550b1d6869d1b..b7eee225ea3285a6fe84e9cf46d950efb3692975 100644
--- a/chrome/browser/favicon/favicon_tab_helper.cc
+++ b/chrome/browser/favicon/favicon_tab_helper.cc
@@ -6,6 +6,7 @@
#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"
@@ -42,21 +43,17 @@ DEFINE_WEB_CONTENTS_USER_DATA_KEY(FaviconTabHelper);
FaviconTabHelper::FaviconTabHelper(WebContents* web_contents)
: content::WebContentsObserver(web_contents),
profile_(Profile::FromBrowserContext(web_contents->GetBrowserContext())) {
- client_.reset(new ChromeFaviconClient(profile_));
+ client_ = ChromeFaviconClientFactory::GetForProfile(profile_);
#if defined(OS_ANDROID)
bool download_largest_icon = true;
#else
bool download_largest_icon = false;
#endif
- favicon_handler_.reset(new FaviconHandler(client_.get(),
- this,
- FaviconHandler::FAVICON,
- download_largest_icon));
+ favicon_handler_.reset(new FaviconHandler(
+ client_, this, FaviconHandler::FAVICON, download_largest_icon));
if (chrome::kEnableTouchIcon)
- touch_icon_handler_.reset(new FaviconHandler(client_.get(),
- this,
- FaviconHandler::TOUCH,
- download_largest_icon));
+ touch_icon_handler_.reset(new FaviconHandler(
+ client_, this, FaviconHandler::TOUCH, download_largest_icon));
}
FaviconTabHelper::~FaviconTabHelper() {
« no previous file with comments | « chrome/browser/favicon/favicon_tab_helper.h ('k') | chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698