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

Unified Diff: chrome/browser/history/history_service.cc

Issue 26563004: Find Favicon in priority of icon_type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 2 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/history/history_service.cc
diff --git a/chrome/browser/history/history_service.cc b/chrome/browser/history/history_service.cc
index aee38c899a9c99b5635cd81d1526576acad38e1e..5eb6cce017c6298a76f646662034be27b0fa3045 100644
--- a/chrome/browser/history/history_service.cc
+++ b/chrome/browser/history/history_service.cc
@@ -644,6 +644,29 @@ CancelableTaskTracker::TaskId HistoryService::GetFaviconsForURL(
base::Bind(&RunWithFaviconResults, callback, base::Owned(results)));
}
+CancelableTaskTracker::TaskId HistoryService::GetLargestFaviconForURL(
+ const GURL& page_url,
+ const std::vector<int>& icon_types,
+ int minimal_size_in_pixels,
+ const FaviconService::FaviconResultsCallback& callback,
+ CancelableTaskTracker* tracker) {
+ DCHECK(thread_checker_.CalledOnValidThread());
pkotwicz 2013/10/16 16:59:41 Nit: DCHECK should be indented with LoadBackendIfN
michaelbai 2013/10/16 18:17:05 Done.
+ LoadBackendIfNecessary();
+
+ std::vector<chrome::FaviconBitmapResult>* results =
+ new std::vector<chrome::FaviconBitmapResult>();
+ return tracker->PostTaskAndReply(
+ thread_->message_loop_proxy().get(),
+ FROM_HERE,
+ base::Bind(&HistoryBackend::GetLargestFaviconForURL,
+ history_backend_.get(),
+ page_url,
+ icon_types,
+ minimal_size_in_pixels,
+ results),
+ base::Bind(&RunWithFaviconResults, callback, base::Owned(results)));
+}
+
CancelableTaskTracker::TaskId HistoryService::GetFaviconForID(
chrome::FaviconID favicon_id,
int desired_size_in_dip,
« chrome/browser/history/history_service.h ('K') | « chrome/browser/history/history_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698