Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3807)

Unified Diff: chrome/browser/history/history_service.cc

Issue 573553004: Eliminate NOTIFICATION_HISTORY_LOADED notification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clean up of code in ResourcePrefetchPredictor Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/history/history_service.cc
diff --git a/chrome/browser/history/history_service.cc b/chrome/browser/history/history_service.cc
index 45e62ca6ca399d3d84ecde9062ff2d32b7a29236..56bfacbdefc76f8ecdde50d4bae61d9e315a1e53 100644
--- a/chrome/browser/history/history_service.cc
+++ b/chrome/browser/history/history_service.cc
@@ -1227,10 +1227,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) {
@@ -1267,3 +1264,9 @@ void HistoryService::NotifyFaviconChanged(
DCHECK(thread_checker_.CalledOnValidThread());
favicon_changed_callback_list_.Notify(changed_favicons);
}
+
+void HistoryService::NotifyHistoryServiceLoaded() {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ FOR_EACH_OBSERVER(history::HistoryServiceObserver, observers_,
+ OnHistoryServiceLoaded(this));
+}

Powered by Google App Engine
This is Rietveld 408576698