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

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, 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
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 608a1cf86585c48b0b2d76feae77d3e44fa570da..2e6f070acbd60e82a0e4817ac35fbf459c30bb0e 100644
--- a/components/history/core/browser/history_service.cc
+++ b/components/history/core/browser/history_service.cc
@@ -118,11 +118,12 @@ class HistoryService::BackendDelegate : public HistoryBackend::Delegate {
history_service_, base::Passed(&backend)));
}
- void NotifyFaviconChanged(const std::set<GURL>& urls) override {
+ void NotifyFaviconsChanged(const std::vector<GURL>& page_urls,
+ const std::vector<GURL>& icon_urls) 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_urls));
}
void NotifyURLVisited(ui::PageTransition transition,
@@ -1122,17 +1123,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::vector<GURL>&,
+ const std::vector<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::vector<GURL>& page_urls,
+ const std::vector<GURL>& icon_urls) {
DCHECK(thread_checker_.CalledOnValidThread());
- favicon_changed_callback_list_.Notify(changed_favicons);
+ favicon_changed_callback_list_.Notify(page_urls, icon_urls);
}
} // namespace history

Powered by Google App Engine
This is Rietveld 408576698