Index: chrome/browser/extensions/api/history/history_api.h |
diff --git a/chrome/browser/extensions/api/history/history_api.h b/chrome/browser/extensions/api/history/history_api.h |
index 660f96d506b25293189870e45b64e5f2fe0007ef..5a482df10eff3e376e6829e04bb3d223293870a6 100644 |
--- a/chrome/browser/extensions/api/history/history_api.h |
+++ b/chrome/browser/extensions/api/history/history_api.h |
@@ -14,6 +14,7 @@ |
#include "chrome/browser/history/history_notifications.h" |
#include "chrome/browser/history/history_service.h" |
#include "chrome/common/extensions/api/history.h" |
+#include "components/history/core/browser/history_service_observer.h" |
#include "content/public/browser/notification_registrar.h" |
#include "extensions/browser/browser_context_keyed_api_factory.h" |
#include "extensions/browser/event_router.h" |
@@ -26,9 +27,11 @@ namespace extensions { |
// Observes History service and routes the notifications as events to the |
// extension system. |
-class HistoryEventRouter : public content::NotificationObserver { |
+class HistoryEventRouter : public content::NotificationObserver, |
+ public history::HistoryServiceObserver { |
public: |
- explicit HistoryEventRouter(Profile* profile); |
+ explicit HistoryEventRouter(Profile* profile, |
not at google - send to devlin
2014/10/14 16:06:41
explicit no longer needed.
|
+ HistoryService* history_service); |
virtual ~HistoryEventRouter(); |
private: |
@@ -37,8 +40,12 @@ class HistoryEventRouter : public content::NotificationObserver { |
const content::NotificationSource& source, |
const content::NotificationDetails& details) override; |
- void HistoryUrlVisited(Profile* profile, |
- const history::URLVisitedDetails* details); |
+ // history::HistoryServiceObserver. |
+ virtual void OnURLVisited(HistoryService* history_service, |
+ ui::PageTransition transition, |
+ const history::URLRow& row, |
+ const history::RedirectList& redirects, |
+ base::Time visit_time) override; |
void HistoryUrlsRemoved(Profile* profile, |
const history::URLsDeletedDetails* details); |
@@ -49,6 +56,8 @@ class HistoryEventRouter : public content::NotificationObserver { |
// Used for tracking registrations to history service notifications. |
content::NotificationRegistrar registrar_; |
+ Profile* profile_; |
+ HistoryService* history_service_; |
DISALLOW_COPY_AND_ASSIGN(HistoryEventRouter); |
}; |