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

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: add a new method 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..4255d051e1d5858eb31afdc6f2defd9338b29738 100644
--- a/chrome/browser/history/history_service.cc
+++ b/chrome/browser/history/history_service.cc
@@ -644,6 +644,31 @@ 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_pixel,
+ const FaviconService::FaviconResultsCallback& callback,
+ CancelableTaskTracker* tracker) {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ LoadBackendIfNecessary();
+
sky 2013/10/15 15:03:47 nit: only one newline.
michaelbai 2013/10/15 19:36:31 Done.
+
+ 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_pixel,
+ results),
+ base::Bind(&RunWithFaviconResults, callback, base::Owned(results)));
+}
+
sky 2013/10/15 15:03:47 nit: only one newline.
michaelbai 2013/10/15 19:36:31 Done.
+
CancelableTaskTracker::TaskId HistoryService::GetFaviconForID(
chrome::FaviconID favicon_id,
int desired_size_in_dip,

Powered by Google App Engine
This is Rietveld 408576698