Index: chrome/browser/extensions/api/history/history_api.cc |
diff --git a/chrome/browser/extensions/api/history/history_api.cc b/chrome/browser/extensions/api/history/history_api.cc |
index 196ecaaf4cc5e6a73c38a7a5f77446573959fc41..56b50d7fed755c5fd086908fb35c2eae3f6354de 100644 |
--- a/chrome/browser/extensions/api/history/history_api.cc |
+++ b/chrome/browser/extensions/api/history/history_api.cc |
@@ -27,8 +27,6 @@ |
#include "chrome/common/extensions/api/history.h" |
#include "chrome/common/pref_names.h" |
#include "components/history/core/browser/history_types.h" |
-#include "content/public/browser/notification_details.h" |
-#include "content/public/browser/notification_source.h" |
#include "extensions/browser/event_router.h" |
#include "extensions/browser/extension_system_provider.h" |
#include "extensions/browser/extensions_browser_client.h" |
@@ -135,24 +133,12 @@ HistoryEventRouter::HistoryEventRouter(Profile* profile, |
HistoryService* history_service) |
: profile_(profile), history_service_observer_(this) { |
DCHECK(profile); |
- registrar_.Add(this, |
- chrome::NOTIFICATION_HISTORY_URLS_DELETED, |
- content::Source<Profile>(profile)); |
history_service_observer_.Add(history_service); |
} |
HistoryEventRouter::~HistoryEventRouter() { |
} |
-void HistoryEventRouter::Observe(int type, |
- const content::NotificationSource& source, |
- const content::NotificationDetails& details) { |
- DCHECK_EQ(type, chrome::NOTIFICATION_HISTORY_URLS_DELETED); |
- HistoryUrlsRemoved( |
- content::Source<Profile>(source).ptr(), |
- content::Details<const history::URLsDeletedDetails>(details).ptr()); |
-} |
- |
void HistoryEventRouter::OnURLVisited(HistoryService* history_service, |
ui::PageTransition transition, |
const history::URLRow& row, |
@@ -163,6 +149,12 @@ void HistoryEventRouter::OnURLVisited(HistoryService* history_service, |
DispatchEvent(profile_, api::history::OnVisited::kEventName, args.Pass()); |
} |
+void HistoryEventRouter::OnURLsDeleted( |
+ HistoryService* history_service, |
+ const history::URLsDeletedDetails& deleted_details) { |
+ HistoryUrlsRemoved(history_service->profile(), &deleted_details); |
sdefresne
2014/12/04 17:21:12
Remove HistoryUrlsRemoved() method and inline the
nshaik
2014/12/07 09:34:49
Done.
|
+} |
+ |
void HistoryEventRouter::HistoryUrlsRemoved( |
Profile* profile, |
const history::URLsDeletedDetails* details) { |