| Index: chrome/browser/history/history_service.h
|
| diff --git a/chrome/browser/history/history_service.h b/chrome/browser/history/history_service.h
|
| index a7de0cb9e8161813294399e7521585837c7b147d..3dfff77e6eb271b3ed01054f4c813ddbabc79e7d 100644
|
| --- a/chrome/browser/history/history_service.h
|
| +++ b/chrome/browser/history/history_service.h
|
| @@ -64,6 +64,7 @@ class HistoryClient;
|
| class HistoryDatabase;
|
| class HistoryDBTask;
|
| class HistoryQueryTest;
|
| +class HistoryServiceObserver;
|
| class HistoryTest;
|
| class InMemoryHistoryBackend;
|
| class InMemoryURLIndex;
|
| @@ -430,6 +431,12 @@ class HistoryService : public content::NotificationObserver,
|
| // Notification that a URL is no longer bookmarked.
|
| void URLsNoLongerBookmarked(const std::set<GURL>& urls);
|
|
|
| + // HistoryServiceObserver ----------------------------------------------------
|
| +
|
| + // Adds/Removes an HistoryServiceObserver.
|
| + void AddHistoryServiceObserver(history::HistoryServiceObserver* observer);
|
| + void RemoveHistoryServiceObserver(history::HistoryServiceObserver* observer);
|
| +
|
| // Generic Stuff -------------------------------------------------------------
|
|
|
| // Schedules a HistoryDBTask for running on the history backend thread. See
|
| @@ -589,6 +596,19 @@ class HistoryService : public content::NotificationObserver,
|
| // available or the URL does not exist.
|
| bool GetRowForURL(const GURL& url, history::URLRow* url_row);
|
|
|
| + // HistoryServiceObserver ----------------------------------------------------
|
| +
|
| + // Notify all HistoryServiceObservers registered that user is visiting a URL.
|
| + // The |row| ID will be set to the value that is currently in effect in the
|
| + // main history database. |redirects| is the list of redirects leading up to
|
| + // the URL. If we have a redirect chain A -> B -> C and user is visiting C,
|
| + // then |redirects[0]=B| and |redirects[1]=A|. If there are no redirects,
|
| + // |redirects| is an empty vector.
|
| + void NotifyURLVisited(ui::PageTransition transition,
|
| + const history::URLRow& row,
|
| + const history::RedirectList& redirects,
|
| + const base::Time& visit_time);
|
| +
|
| // Favicon -------------------------------------------------------------------
|
|
|
| // These favicon methods are exposed to the FaviconService. Instead of calling
|
| @@ -873,6 +893,7 @@ class HistoryService : public content::NotificationObserver,
|
| // See http://crbug.com/138321
|
| scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_;
|
|
|
| + ObserverList<history::HistoryServiceObserver> history_service_observers_;
|
| ObserverList<history::VisitDatabaseObserver> visit_database_observers_;
|
|
|
| base::CallbackList<void(const std::set<GURL>&)>
|
|
|