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 92f918609c7c6004b453b46268db77f605171449..a7ddc14dec69ca494a22d90036359b85f0dcaa49 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,8 @@ class ChromeHistoryClient : public history::HistoryClient, |
history::TopSites* top_sites); |
virtual ~ChromeHistoryClient(); |
+ void SetHistoryService(HistoryService* history_service); |
+ |
// history::HistoryClient: |
virtual void BlockUntilBookmarksLoaded() OVERRIDE; |
virtual bool IsBookmarked(const GURL& url) OVERRIDE; |
@@ -37,6 +42,12 @@ class ChromeHistoryClient : public history::HistoryClient, |
// KeyedService: |
virtual void Shutdown() OVERRIDE; |
+ // HistoryServiceObserver: |
+ virtual void OnURLVisited(ui::PageTransition transition, |
+ const history::URLRow& row, |
+ const history::RedirectList& redirects, |
+ const base::Time& visit_time) OVERRIDE; |
+ |
// TopSitesObserver: |
virtual void TopSitesLoaded(history::TopSites* top_sites) OVERRIDE; |
virtual void TopSitesChanged(history::TopSites* top_sites) OVERRIDE; |
@@ -45,6 +56,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. |