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

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

Issue 1133463005: Update all bookmarks which use an icon URL when a favicon's bitmap is updated (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@startup_do_not_unexpire
Patch Set: Created 5 years, 5 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 cbac0309a9faea77a9b0b844855950c8f252b643..2fc48f5af41090f9c70572c1f16fda31753e1266 100644
--- a/components/history/core/browser/history_service.cc
+++ b/components/history/core/browser/history_service.cc
@@ -119,11 +119,12 @@ class HistoryService::BackendDelegate : public HistoryBackend::Delegate {
history_service_, base::Passed(&backend)));
}
- void NotifyFaviconChanged(const std::set<GURL>& urls) override {
+ void NotifyFaviconsChanged(const std::set<GURL>& page_urls,
+ const GURL& icon_url) override {
// Send the notification to the history service on the main thread.
service_task_runner_->PostTask(
- FROM_HERE, base::Bind(&HistoryService::NotifyFaviconChanged,
- history_service_, urls));
+ FROM_HERE, base::Bind(&HistoryService::NotifyFaviconsChanged,
+ history_service_, page_urls, icon_url));
}
void NotifyURLVisited(ui::PageTransition transition,
@@ -1130,17 +1131,18 @@ void HistoryService::NotifyKeywordSearchTermDeleted(URLID url_id) {
OnKeywordSearchTermDeleted(this, url_id));
}
-scoped_ptr<base::CallbackList<void(const std::set<GURL>&)>::Subscription>
-HistoryService::AddFaviconChangedCallback(
- const HistoryService::OnFaviconChangedCallback& callback) {
+scoped_ptr<base::CallbackList<void(const std::set<GURL>&,
+ const GURL&)>::Subscription>
+HistoryService::AddFaviconsChangedCallback(
+ const HistoryService::OnFaviconsChangedCallback& callback) {
DCHECK(thread_checker_.CalledOnValidThread());
return favicon_changed_callback_list_.Add(callback);
}
-void HistoryService::NotifyFaviconChanged(
- const std::set<GURL>& changed_favicons) {
+void HistoryService::NotifyFaviconsChanged(const std::set<GURL>& page_urls,
+ const GURL& icon_url) {
DCHECK(thread_checker_.CalledOnValidThread());
- favicon_changed_callback_list_.Notify(changed_favicons);
+ favicon_changed_callback_list_.Notify(page_urls, icon_url);
}
} // namespace history
« no previous file with comments | « components/history/core/browser/history_service.h ('k') | components/history/core/test/history_backend_db_base_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698