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

Unified Diff: components/history/core/browser/history_service.cc

Issue 2423813002: Remove usage of FOR_EACH_OBSERVER macro in components/history (Closed)
Patch Set: explicit type Created 4 years, 2 months 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
« no previous file with comments | « components/history/core/browser/history_backend.cc ('k') | components/history/core/browser/top_sites.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/history/core/browser/history_service.cc
diff --git a/components/history/core/browser/history_service.cc b/components/history/core/browser/history_service.cc
index a4993cac05fb647e2c225199f636bd002f44e896..a97677666b691d765a49bbc921453c2bdda7d277 100644
--- a/components/history/core/browser/history_service.cc
+++ b/components/history/core/browser/history_service.cc
@@ -1063,14 +1063,14 @@ void HistoryService::NotifyURLVisited(ui::PageTransition transition,
const RedirectList& redirects,
base::Time visit_time) {
DCHECK(thread_checker_.CalledOnValidThread());
- FOR_EACH_OBSERVER(HistoryServiceObserver, observers_,
- OnURLVisited(this, transition, row, redirects, visit_time));
+ for (HistoryServiceObserver& observer : observers_)
+ observer.OnURLVisited(this, transition, row, redirects, visit_time);
}
void HistoryService::NotifyURLsModified(const URLRows& changed_urls) {
DCHECK(thread_checker_.CalledOnValidThread());
- FOR_EACH_OBSERVER(HistoryServiceObserver, observers_,
- OnURLsModified(this, changed_urls));
+ for (HistoryServiceObserver& observer : observers_)
+ observer.OnURLsModified(this, changed_urls);
}
void HistoryService::NotifyURLsDeleted(bool all_history,
@@ -1101,21 +1101,22 @@ void HistoryService::NotifyURLsDeleted(bool all_history,
}
}
- FOR_EACH_OBSERVER(
- HistoryServiceObserver, observers_,
- OnURLsDeleted(this, all_history, expired, deleted_rows, favicon_urls));
+ for (HistoryServiceObserver& observer : observers_) {
+ observer.OnURLsDeleted(this, all_history, expired, deleted_rows,
+ favicon_urls);
+ }
}
void HistoryService::NotifyHistoryServiceLoaded() {
DCHECK(thread_checker_.CalledOnValidThread());
- FOR_EACH_OBSERVER(HistoryServiceObserver, observers_,
- OnHistoryServiceLoaded(this));
+ for (HistoryServiceObserver& observer : observers_)
+ observer.OnHistoryServiceLoaded(this);
}
void HistoryService::NotifyHistoryServiceBeingDeleted() {
DCHECK(thread_checker_.CalledOnValidThread());
- FOR_EACH_OBSERVER(HistoryServiceObserver, observers_,
- HistoryServiceBeingDeleted(this));
+ for (HistoryServiceObserver& observer : observers_)
+ observer.HistoryServiceBeingDeleted(this);
}
void HistoryService::NotifyKeywordSearchTermUpdated(
@@ -1123,14 +1124,14 @@ void HistoryService::NotifyKeywordSearchTermUpdated(
KeywordID keyword_id,
const base::string16& term) {
DCHECK(thread_checker_.CalledOnValidThread());
- FOR_EACH_OBSERVER(HistoryServiceObserver, observers_,
- OnKeywordSearchTermUpdated(this, row, keyword_id, term));
+ for (HistoryServiceObserver& observer : observers_)
+ observer.OnKeywordSearchTermUpdated(this, row, keyword_id, term);
}
void HistoryService::NotifyKeywordSearchTermDeleted(URLID url_id) {
DCHECK(thread_checker_.CalledOnValidThread());
- FOR_EACH_OBSERVER(HistoryServiceObserver, observers_,
- OnKeywordSearchTermDeleted(this, url_id));
+ for (HistoryServiceObserver& observer : observers_)
+ observer.OnKeywordSearchTermDeleted(this, url_id);
}
std::unique_ptr<
« no previous file with comments | « components/history/core/browser/history_backend.cc ('k') | components/history/core/browser/top_sites.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698