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

Unified Diff: chrome/browser/spellchecker/spellcheck_custom_dictionary.cc

Issue 2439493002: Reduce usage of FOR_EACH_OBSERVER macro in chrome/browser (Closed)
Patch Set: 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
Index: chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
diff --git a/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc b/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
index 63d4b30de6bad66a6fb7619c8d92165885f1d9b7..ed77bc7619bd22a94c62ab7768e40b1b956943bc 100644
--- a/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
+++ b/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
@@ -425,7 +425,8 @@ void SpellcheckCustomDictionary::OnLoaded(
Apply(dictionary_change);
Sync(dictionary_change);
is_loaded_ = true;
- FOR_EACH_OBSERVER(Observer, observers_, OnCustomDictionaryLoaded());
+ for (Observer& observer : observers_)
+ observer.OnCustomDictionaryLoaded();
if (!result->is_valid_file) {
// Save cleaned up data only after startup.
fix_invalid_file_.Reset(
@@ -522,7 +523,6 @@ void SpellcheckCustomDictionary::Notify(const Change& dictionary_change) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (!IsLoaded() || dictionary_change.empty())
return;
- FOR_EACH_OBSERVER(Observer,
- observers_,
- OnCustomDictionaryChanged(dictionary_change));
+ for (Observer& observer : observers_)
+ observer.OnCustomDictionaryChanged(dictionary_change);
}
« no previous file with comments | « chrome/browser/search/instant_service.cc ('k') | chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698