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

Unified Diff: components/favicon/core/browser/favicon_service.cc

Issue 1018733002: [Icons NTP] FaviconService: Add method to retrieve large icon. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Stop using FAVICON; fixing #include. Created 5 years, 9 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 | « components/favicon/core/browser/favicon_service.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/favicon/core/browser/favicon_service.cc
diff --git a/components/favicon/core/browser/favicon_service.cc b/components/favicon/core/browser/favicon_service.cc
index f0173e41e6e08e63e3bc46c7321cb292136f53c4..de1b3f0eba8fd1da34d47fc361eff15a252b3f44 100644
--- a/components/favicon/core/browser/favicon_service.cc
+++ b/components/favicon/core/browser/favicon_service.cc
@@ -200,6 +200,31 @@ base::CancelableTaskTracker::TaskId FaviconService::GetFaviconForPageURL(
}
base::CancelableTaskTracker::TaskId
+FaviconService::GetGenericLargeIconForPageURL(
+ const GURL& page_url,
+ int desired_size_in_pixel,
+ const favicon_base::FaviconRawBitmapCallback& callback,
+ base::CancelableTaskTracker* tracker) {
+ favicon_base::FaviconResultsCallback favicon_results_callback =
+ Bind(&FaviconService::RunFaviconRawBitmapCallbackWithBitmapResults,
+ base::Unretained(this),
+ callback,
+ desired_size_in_pixel);
+ if (history_service_) {
+ int icon_types =
+ favicon_base::TOUCH_ICON | favicon_base::TOUCH_PRECOMPOSED_ICON;
+ std::vector<int> desired_sizes_in_pixel;
+ desired_sizes_in_pixel.push_back(desired_size_in_pixel);
+ return history_service_->GetFaviconsForURL(page_url,
+ icon_types,
+ desired_sizes_in_pixel,
+ favicon_results_callback,
+ tracker);
+ }
+ return RunWithEmptyResultAsync(favicon_results_callback, tracker);
+}
+
+base::CancelableTaskTracker::TaskId
FaviconService::UpdateFaviconMappingsAndFetch(
const GURL& page_url,
const std::vector<GURL>& icon_urls,
« no previous file with comments | « components/favicon/core/browser/favicon_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698