| Index: chrome/browser/history/chrome_history_client.h
|
| diff --git a/chrome/browser/history/chrome_history_client.h b/chrome/browser/history/chrome_history_client.h
|
| index bad2f0b6741c262916245aa8b9f55684e2bb90b9..1fd20a3316ba94f742afc40a1dad652a1c9b61ad 100644
|
| --- a/chrome/browser/history/chrome_history_client.h
|
| +++ b/chrome/browser/history/chrome_history_client.h
|
| @@ -7,9 +7,11 @@
|
|
|
| #include "base/macros.h"
|
| #include "components/history/core/browser/history_client.h"
|
| +#include "components/history/core/browser/history_service_observer.h"
|
| #include "components/history/core/browser/top_sites_observer.h"
|
|
|
| class BookmarkModel;
|
| +class HistoryService;
|
| class Profile;
|
|
|
| namespace history {
|
| @@ -19,6 +21,7 @@ class TopSites;
|
| // This class implements history::HistoryClient to abstract operations that
|
| // depend on Chrome environment.
|
| class ChromeHistoryClient : public history::HistoryClient,
|
| + public history::HistoryServiceObserver,
|
| public history::TopSitesObserver {
|
| public:
|
| explicit ChromeHistoryClient(BookmarkModel* bookmark_model,
|
| @@ -26,6 +29,11 @@ class ChromeHistoryClient : public history::HistoryClient,
|
| history::TopSites* top_sites);
|
| virtual ~ChromeHistoryClient();
|
|
|
| + // TODO(sdefresne): once NOTIFICATION_HISTORY_URL* notifications are no
|
| + // longer used, remove this reference to the HistoryService from the
|
| + // ChromeHistoryClient, http://crbug.com/42178
|
| + void SetHistoryService(HistoryService* history_service);
|
| +
|
| // history::HistoryClient:
|
| virtual void BlockUntilBookmarksLoaded() override;
|
| virtual bool IsBookmarked(const GURL& url) override;
|
| @@ -37,6 +45,13 @@ class ChromeHistoryClient : public history::HistoryClient,
|
| // KeyedService:
|
| virtual void Shutdown() override;
|
|
|
| + // HistoryServiceObserver:
|
| + virtual void OnURLVisited(HistoryService* history_service,
|
| + ui::PageTransition transition,
|
| + const history::URLRow& row,
|
| + const history::RedirectList& redirects,
|
| + base::Time visit_time) OVERRIDE;
|
| +
|
| // TopSitesObserver:
|
| virtual void TopSitesLoaded(history::TopSites* top_sites) override;
|
| virtual void TopSitesChanged(history::TopSites* top_sites) override;
|
| @@ -45,6 +60,7 @@ class ChromeHistoryClient : public history::HistoryClient,
|
| // The BookmarkModel, this should outlive ChromeHistoryClient.
|
| BookmarkModel* bookmark_model_;
|
| Profile* profile_;
|
| + HistoryService* history_service_;
|
| // The TopSites object is owned by the Profile (see
|
| // chrome/browser/profiles/profile_impl.h)
|
| // and lazily constructed by the getter.
|
|
|