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

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

Issue 228783002: Moves knowledge of Profile out of FaviconHandler, into FaviconTabHelper. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@FAVICON_3
Patch Set: Rebase. Created 6 years, 8 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/favicon/favicon_tab_helper.h ('k') | components/favicon.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d6b13e95e1f8adf4622be888c3de14c9c6947aca..f46dfcb7a74db4958e047c42e259aeafafe320f9 100644
--- a/chrome/browser/favicon/favicon_tab_helper.cc
+++ b/chrome/browser/favicon/favicon_tab_helper.cc
@@ -38,11 +38,11 @@ DEFINE_WEB_CONTENTS_USER_DATA_KEY(FaviconTabHelper);
FaviconTabHelper::FaviconTabHelper(WebContents* web_contents)
: content::WebContentsObserver(web_contents),
profile_(Profile::FromBrowserContext(web_contents->GetBrowserContext())) {
- favicon_handler_.reset(new FaviconHandler(profile_, this,
- FaviconHandler::FAVICON));
+ favicon_handler_.reset(
+ new FaviconHandler(profile_, this, this, FaviconHandler::FAVICON));
if (chrome::kEnableTouchIcon)
- touch_icon_handler_.reset(new FaviconHandler(profile_, this,
- FaviconHandler::TOUCH));
+ touch_icon_handler_.reset(
+ new FaviconHandler(profile_, this, this, FaviconHandler::TOUCH));
}
FaviconTabHelper::~FaviconTabHelper() {
@@ -192,6 +192,11 @@ void FaviconTabHelper::DidUpdateFaviconURL(
touch_icon_handler_->OnUpdateFaviconURL(page_id, candidates);
}
+FaviconService* FaviconTabHelper::GetFaviconService() {
+ return FaviconServiceFactory::GetForProfile(profile_,
+ Profile::EXPLICIT_ACCESS);
+}
+
void FaviconTabHelper::DidDownloadFavicon(
int id,
int http_status_code,
« no previous file with comments | « chrome/browser/favicon/favicon_tab_helper.h ('k') | components/favicon.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698