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

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

Issue 2856873002: [Thumbnails DB] Allow setting last_requested time when accessing favicons. (Closed)
Patch Set: Peter's comments Created 3 years, 6 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/history/core/browser/history_service.h ('k') | components/history/core/browser/history_types.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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";
« no previous file with comments | « components/history/core/browser/history_service.h ('k') | components/history/core/browser/history_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698