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

Unified Diff: chrome/browser/ui/webui/ntp/most_visited_handler.cc

Issue 1092873002: [Icons NTP] Refactor large_icon_source to extract the logic shared between desktop and Android to f… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
Index: chrome/browser/ui/webui/ntp/most_visited_handler.cc
diff --git a/chrome/browser/ui/webui/ntp/most_visited_handler.cc b/chrome/browser/ui/webui/ntp/most_visited_handler.cc
index cff19a60e1913015633b2212915a8854eeb6146b..71492facfa0885a8e2e0b6cde423966f89ec065e 100644
--- a/chrome/browser/ui/webui/ntp/most_visited_handler.cc
+++ b/chrome/browser/ui/webui/ntp/most_visited_handler.cc
@@ -22,6 +22,7 @@
#include "base/values.h"
#include "chrome/browser/favicon/fallback_icon_service_factory.h"
#include "chrome/browser/favicon/favicon_service_factory.h"
+#include "chrome/browser/favicon/large_icon_service_factory.h"
#include "chrome/browser/history/top_sites_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/thumbnails/thumbnail_list_source.h"
@@ -39,6 +40,7 @@
#include "chrome/common/url_constants.h"
#include "components/favicon/core/fallback_icon_service.h"
#include "components/favicon/core/favicon_service.h"
+#include "components/favicon/core/large_icon_service.h"
#include "components/history/core/browser/page_usage_data.h"
#include "components/history/core/browser/top_sites.h"
#include "components/keyed_service/core/service_access_type.h"
@@ -91,10 +93,12 @@ void MostVisitedHandler::RegisterMessages() {
ServiceAccessType::EXPLICIT_ACCESS);
favicon::FallbackIconService* fallback_icon_service =
FallbackIconServiceFactory::GetForBrowserContext(profile);
+ favicon::LargeIconService* large_icon_service =
+ LargeIconServiceFactory::GetForBrowserContext(profile);
// Register chrome://large-icon as a data source for large icons.
huangs 2015/04/20 19:50:25 NIT: Maybe move this guy after FaviconSource few l
beaudoin 2015/04/21 00:15:38 Done.
- content::URLDataSource::Add(profile,
- new LargeIconSource(favicon_service, fallback_icon_service));
+ content::URLDataSource::Add(profile, new LargeIconSource(
+ favicon_service, fallback_icon_service, large_icon_service));
content::URLDataSource::Add(profile,
huangs 2015/04/20 19:50:25 Hmm weird, I missed adding // Register chrome://f
beaudoin 2015/04/21 00:15:38 Done.
new FallbackIconSource(fallback_icon_service));

Powered by Google App Engine
This is Rietveld 408576698