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

Unified Diff: chrome/browser/spellchecker/spellcheck_hunspell_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_hunspell_dictionary.cc
diff --git a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc
index bd49e1fab7a10e0ed272843f906646156482cdd1..1b219b8ec9eb2705883029862c01b19aa52cf811 100644
--- a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc
+++ b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc
@@ -247,8 +247,8 @@ void SpellcheckHunspellDictionary::DownloadDictionary(GURL url) {
DCHECK(request_context_getter_);
download_status_ = DOWNLOAD_IN_PROGRESS;
- FOR_EACH_OBSERVER(Observer, observers_,
- OnHunspellDictionaryDownloadBegin(language_));
+ for (Observer& observer : observers_)
+ observer.OnHunspellDictionaryDownloadBegin(language_);
fetcher_ = net::URLFetcher::Create(url, net::URLFetcher::GET, this);
data_use_measurement::DataUseUserData::AttachToFetcher(
@@ -360,9 +360,8 @@ void SpellcheckHunspellDictionary::SaveDictionaryDataComplete(
if (dictionary_saved) {
download_status_ = DOWNLOAD_NONE;
- FOR_EACH_OBSERVER(Observer,
- observers_,
- OnHunspellDictionaryDownloadSuccess(language_));
+ for (Observer& observer : observers_)
+ observer.OnHunspellDictionaryDownloadSuccess(language_);
Load();
} else {
InformListenersOfDownloadFailure();
@@ -371,13 +370,12 @@ void SpellcheckHunspellDictionary::SaveDictionaryDataComplete(
}
void SpellcheckHunspellDictionary::InformListenersOfInitialization() {
- FOR_EACH_OBSERVER(Observer, observers_,
- OnHunspellDictionaryInitialized(language_));
+ for (Observer& observer : observers_)
+ observer.OnHunspellDictionaryInitialized(language_);
}
void SpellcheckHunspellDictionary::InformListenersOfDownloadFailure() {
download_status_ = DOWNLOAD_FAILED;
- FOR_EACH_OBSERVER(Observer,
- observers_,
- OnHunspellDictionaryDownloadFailure(language_));
+ for (Observer& observer : observers_)
+ observer.OnHunspellDictionaryDownloadFailure(language_);
}
« no previous file with comments | « chrome/browser/spellchecker/spellcheck_custom_dictionary.cc ('k') | chrome/browser/task_manager/task_manager_interface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698