Index: chrome/browser/history/history_service.cc |
diff --git a/chrome/browser/history/history_service.cc b/chrome/browser/history/history_service.cc |
index b5a971b0adc6a7535326920c7ab55f9e8acdc8bb..9ef201b54f0eb14b94e2b6dfa091eb39b9d09baa 100644 |
--- a/chrome/browser/history/history_service.cc |
+++ b/chrome/browser/history/history_service.cc |
@@ -1199,10 +1199,7 @@ void HistoryService::BroadcastNotificationsHelper( |
void HistoryService::OnDBLoaded() { |
DCHECK(thread_checker_.CalledOnValidThread()); |
backend_loaded_ = true; |
- content::NotificationService::current()->Notify( |
- chrome::NOTIFICATION_HISTORY_LOADED, |
- content::Source<Profile>(profile_), |
- content::Details<HistoryService>(this)); |
+ NotifyHistoryServiceLoaded(); |
} |
bool HistoryService::GetRowForURL(const GURL& url, history::URLRow* url_row) { |
@@ -1229,3 +1226,21 @@ void HistoryService::NotifyVisitDBObserversOnAddVisit( |
FOR_EACH_OBSERVER(history::VisitDatabaseObserver, visit_database_observers_, |
OnAddVisit(info)); |
} |
+ |
+void HistoryService::AddHistoryServiceObserver( |
sdefresne
2014/10/20 13:15:41
Note: those two methods have been added already. I
nshaik
2014/10/29 08:43:39
Done.
|
+ history::HistoryServiceObserver* observer) { |
+ DCHECK(thread_checker_.CalledOnValidThread()); |
+ history_service_observers_.AddObserver(observer); |
+} |
+ |
+void HistoryService::RemoveHistoryServiceObserver( |
+ history::HistoryServiceObserver* observer) { |
+ DCHECK(thread_checker_.CalledOnValidThread()); |
+ history_service_observers_.RemoveObserver(observer); |
+} |
+ |
+void HistoryService::NotifyHistoryServiceLoaded() { |
+ FOR_EACH_OBSERVER(history::HistoryServiceObserver, |
+ history_service_observers_, |
+ HistoryServiceLoaded(this)); |
+} |