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

Unified Diff: components/history/core/browser/history_service.cc

Issue 2721363002: Extend LargeIconService to fetch missing favicons from a Google server (Closed)
Patch Set: Addressed comments. Created 3 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
Index: components/history/core/browser/history_service.cc
diff --git a/components/history/core/browser/history_service.cc b/components/history/core/browser/history_service.cc
index b154b3237e19b1373d1c0ba522aefc8229a51861..86948b971861849e117815bc5306d9382eb63ab8 100644
--- a/components/history/core/browser/history_service.cc
+++ b/components/history/core/browser/history_service.cc
@@ -620,9 +620,26 @@ void HistoryService::SetFavicons(const GURL& page_url,
if (history_client_ && !history_client_->CanAddURL(page_url))
return;
- ScheduleTask(PRIORITY_NORMAL,
- base::Bind(&HistoryBackend::SetFavicons, history_backend_,
- page_url, icon_type, icon_url, bitmaps));
+ ScheduleTask(
+ PRIORITY_NORMAL,
+ base::Bind(base::IgnoreResult(&HistoryBackend::SetFavicons),
+ history_backend_, page_url, icon_type, icon_url, bitmaps));
+}
+
+void HistoryService::SetExpiredFaviconsIfNoneKnown(
+ const GURL& page_url,
+ favicon_base::IconType icon_type,
+ const GURL& icon_url,
+ const std::vector<SkBitmap>& bitmaps) {
+ DCHECK(backend_task_runner_) << "History service being called after cleanup";
+ DCHECK(thread_checker_.CalledOnValidThread());
+ if (history_client_ && !history_client_->CanAddURL(page_url))
+ return;
+
+ ScheduleTask(
+ PRIORITY_NORMAL,
+ base::Bind(&HistoryBackend::SetExpiredFaviconsIfNoneKnown,
+ history_backend_, page_url, icon_type, icon_url, bitmaps));
}
void HistoryService::SetFaviconsOutOfDateForPage(const GURL& page_url) {

Powered by Google App Engine
This is Rietveld 408576698