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

Unified Diff: net/base/sdch_manager.cc

Issue 2423713002: Remove usage of FOR_EACH_OBSERVER macro in net (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
« no previous file with comments | « no previous file | net/cert/sth_distributor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/sdch_manager.cc
diff --git a/net/base/sdch_manager.cc b/net/base/sdch_manager.cc
index c409bd6726d7059eddc1c4be2f64a53617addb96..b4de9a15d31cd33dc45a0633c473f54bfe4213f4 100644
--- a/net/base/sdch_manager.cc
+++ b/net/base/sdch_manager.cc
@@ -96,7 +96,8 @@ void SdchManager::ClearData() {
blacklisted_domains_.clear();
allow_latency_experiment_.clear();
dictionaries_.clear();
- FOR_EACH_OBSERVER(SdchObserver, observers_, OnClearDictionaries());
+ for (auto& observer : observers_)
+ observer.OnClearDictionaries();
}
// static
@@ -192,16 +193,15 @@ SdchProblemCode SdchManager::OnGetDictionary(const GURL& request_url,
if (rv != SDCH_OK)
return rv;
- FOR_EACH_OBSERVER(SdchObserver,
- observers_,
- OnGetDictionary(request_url, dictionary_url));
+ for (auto& observer : observers_)
+ observer.OnGetDictionary(request_url, dictionary_url);
return SDCH_OK;
}
void SdchManager::OnDictionaryUsed(const std::string& server_hash) {
- FOR_EACH_OBSERVER(SdchObserver, observers_,
- OnDictionaryUsed(server_hash));
+ for (auto& observer : observers_)
+ observer.OnDictionaryUsed(server_hash);
}
SdchProblemCode SdchManager::CanFetchDictionary(
@@ -423,8 +423,8 @@ SdchProblemCode SdchManager::AddSdchDictionary(
if (server_hash_p)
*server_hash_p = server_hash;
- FOR_EACH_OBSERVER(SdchObserver, observers_,
- OnDictionaryAdded(dictionary_url, server_hash));
+ for (auto& observer : observers_)
+ observer.OnDictionaryAdded(dictionary_url, server_hash);
return SDCH_OK;
}
@@ -436,7 +436,8 @@ SdchProblemCode SdchManager::RemoveSdchDictionary(
dictionaries_.erase(server_hash);
- FOR_EACH_OBSERVER(SdchObserver, observers_, OnDictionaryRemoved(server_hash));
+ for (auto& observer : observers_)
+ observer.OnDictionaryRemoved(server_hash);
return SDCH_OK;
}
« no previous file with comments | « no previous file | net/cert/sth_distributor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698