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 a9a332668b71fe57641b946dbba929c4e2460bdc..60a142f92370ffa6eb091487e5a880054063ba33 100644 |
--- a/components/history/core/browser/history_service.cc |
+++ b/components/history/core/browser/history_service.cc |
@@ -625,12 +625,11 @@ void HistoryService::SetFavicons(const GURL& page_url, |
page_url, icon_type, icon_url, bitmaps)); |
} |
-void HistoryService::SetLastResortFavicons( |
- const GURL& page_url, |
- favicon_base::IconType icon_type, |
- const GURL& icon_url, |
- const std::vector<SkBitmap>& bitmaps, |
- base::Callback<void(bool)> callback) { |
+void HistoryService::SetOnDemandFavicons(const GURL& page_url, |
+ favicon_base::IconType icon_type, |
+ const GURL& icon_url, |
+ const std::vector<SkBitmap>& bitmaps, |
+ base::Callback<void(bool)> callback) { |
DCHECK(backend_task_runner_) << "History service being called after cleanup"; |
DCHECK(thread_checker_.CalledOnValidThread()); |
if (history_client_ && !history_client_->CanAddURL(page_url)) |
@@ -638,7 +637,7 @@ void HistoryService::SetLastResortFavicons( |
PostTaskAndReplyWithResult( |
backend_task_runner_.get(), FROM_HERE, |
- base::Bind(&HistoryBackend::SetLastResortFavicons, history_backend_, |
+ base::Bind(&HistoryBackend::SetOnDemandFavicons, history_backend_, |
page_url, icon_type, icon_url, bitmaps), |
callback); |
} |
@@ -651,6 +650,14 @@ void HistoryService::SetFaviconsOutOfDateForPage(const GURL& page_url) { |
history_backend_, page_url)); |
} |
+void HistoryService::TouchOnDemandFavicon(const GURL& icon_url) { |
+ DCHECK(backend_task_runner_) << "History service being called after cleanup"; |
+ DCHECK(thread_checker_.CalledOnValidThread()); |
+ ScheduleTask(PRIORITY_NORMAL, |
+ base::Bind(&HistoryBackend::TouchOnDemandFavicon, |
+ history_backend_, icon_url)); |
+} |
+ |
void HistoryService::SetImportedFavicons( |
const favicon_base::FaviconUsageDataList& favicon_usage) { |
DCHECK(backend_task_runner_) << "History service being called after cleanup"; |