| Index: chrome/browser/history/history_service.h
|
| diff --git a/chrome/browser/history/history_service.h b/chrome/browser/history/history_service.h
|
| index 6b3d3e74e308315f5911d0b105cad194ff4bcdb5..d54b45a79230054225db9db1d8fdedf10e17e5bf 100644
|
| --- a/chrome/browser/history/history_service.h
|
| +++ b/chrome/browser/history/history_service.h
|
| @@ -11,6 +11,7 @@
|
| #include "base/basictypes.h"
|
| #include "base/bind.h"
|
| #include "base/callback.h"
|
| +#include "base/callback_list.h"
|
| #include "base/files/file_path.h"
|
| #include "base/logging.h"
|
| #include "base/memory/ref_counted.h"
|
| @@ -62,6 +63,7 @@ class HistoryClient;
|
| class HistoryDatabase;
|
| class HistoryDBTask;
|
| class HistoryQueryTest;
|
| +class FaviconChangedObserver;
|
| class InMemoryHistoryBackend;
|
| class InMemoryURLIndex;
|
| class InMemoryURLIndexTest;
|
| @@ -451,6 +453,18 @@ class HistoryService : public content::NotificationObserver,
|
|
|
| void NotifyVisitDBObserversOnAddVisit(const history::BriefVisitInfo& info);
|
|
|
| + // This callback is invoked when favicon change for urls.
|
| + typedef base::Callback<void(HistoryService*, const std::set<GURL>&)>
|
| + OnFaviconChangedCallback;
|
| +
|
| + // Add a callback to the list. The callback will remain registered until the
|
| + // returned Subscription is destroyed. This must occurs before HistoryService
|
| + // is destroyed.
|
| + scoped_ptr<base::CallbackList<
|
| + void(HistoryService*, const std::set<GURL>&)>::Subscription>
|
| + AddFaviconChangedCallback(const OnFaviconChangedCallback& callback)
|
| + WARN_UNUSED_RESULT;
|
| +
|
| // Testing -------------------------------------------------------------------
|
|
|
| // Runs |flushed| after bouncing off the history thread.
|
| @@ -736,6 +750,9 @@ class HistoryService : public content::NotificationObserver,
|
| // specified priority. The task will have ownership taken.
|
| void ScheduleTask(SchedulePriority priority, const base::Closure& task);
|
|
|
| + // Invokes all callback registered by AddFaviconChangedCallback.
|
| + void NotifyFaviconChanged(const std::set<GURL>& changed_favicons);
|
| +
|
| // ScheduleAndForget ---------------------------------------------------------
|
| //
|
| // Functions for scheduling operations on the history thread that do not need
|
| @@ -866,6 +883,9 @@ class HistoryService : public content::NotificationObserver,
|
|
|
| ObserverList<history::VisitDatabaseObserver> visit_database_observers_;
|
|
|
| + base::CallbackList<void(HistoryService*, const std::set<GURL>&)>
|
| + favicon_changed_callback_list_;
|
| +
|
| history::DeleteDirectiveHandler delete_directive_handler_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(HistoryService);
|
|
|