| Index: chrome/browser/history/history_service.cc
|
| diff --git a/chrome/browser/history/history_service.cc b/chrome/browser/history/history_service.cc
|
| index d3c78c672c7fd3f364f44a946bdc4f23deec08ff..ea860614bae271488bf4f517ea544ee2d3b9f20d 100644
|
| --- a/chrome/browser/history/history_service.cc
|
| +++ b/chrome/browser/history/history_service.cc
|
| @@ -888,6 +888,8 @@ void HistoryService::Cleanup() {
|
| return;
|
| }
|
|
|
| + NotifyHistoryServiceBeingDeleted();
|
| +
|
| weak_ptr_factory_.InvalidateWeakPtrs();
|
|
|
| // Unload the backend.
|
| @@ -1234,10 +1236,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) {
|
| @@ -1269,6 +1268,18 @@ void HistoryService::NotifyURLsModified(const history::URLRows& changed_urls) {
|
| OnURLsModified(this, changed_urls));
|
| }
|
|
|
| +void HistoryService::NotifyHistoryServiceLoaded() {
|
| + DCHECK(thread_checker_.CalledOnValidThread());
|
| + FOR_EACH_OBSERVER(history::HistoryServiceObserver, observers_,
|
| + OnHistoryServiceLoaded(this));
|
| +}
|
| +
|
| +void HistoryService::NotifyHistoryServiceBeingDeleted() {
|
| + DCHECK(thread_checker_.CalledOnValidThread());
|
| + FOR_EACH_OBSERVER(history::HistoryServiceObserver, observers_,
|
| + HistoryServiceBeingDeleted(this));
|
| +}
|
| +
|
| scoped_ptr<base::CallbackList<void(const std::set<GURL>&)>::Subscription>
|
| HistoryService::AddFaviconChangedCallback(
|
| const HistoryService::OnFaviconChangedCallback& callback) {
|
|
|