diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-24 22:53:51 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-24 22:53:51 +0000 |
commit | 6f0479fa6d498b8ba48c8b7cbcd507534fda610e (patch) | |
tree | ccd432f1d28d3535ec23c9d6330afbaede7420b6 /webkit/appcache/appcache_group.cc | |
parent | 9a0d91236e8557d37498f002254a6a5427ebf842 (diff) | |
download | chromium_src-6f0479fa6d498b8ba48c8b7cbcd507534fda610e.zip chromium_src-6f0479fa6d498b8ba48c8b7cbcd507534fda610e.tar.gz chromium_src-6f0479fa6d498b8ba48c8b7cbcd507534fda610e.tar.bz2 |
Revert 39942 - Switch NetworkChangeNotifier implementations to use ObserverList.
Fix up observer list so we can use FOR_EACH_OBSERVER when check_empty is set.
Clean up the ObserverList API a bit, replacing GetElementAt() with HasObserver() and Clear().
BUG=36590
Review URL: http://codereview.chromium.org/652205
TBR=willchan@chromium.org
Review URL: http://codereview.chromium.org/661029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39945 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/appcache/appcache_group.cc')
-rw-r--r-- | webkit/appcache/appcache_group.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/webkit/appcache/appcache_group.cc b/webkit/appcache/appcache_group.cc index 8063b911..fd22563 100644 --- a/webkit/appcache/appcache_group.cc +++ b/webkit/appcache/appcache_group.cc @@ -215,7 +215,13 @@ void AppCacheGroup::RunQueuedUpdates() { bool AppCacheGroup::FindObserver(UpdateObserver* find_me, const ObserverList<UpdateObserver>& observer_list) { - return observer_list.HasObserver(find_me); + ObserverList<UpdateObserver>::Iterator it(observer_list); + UpdateObserver* obs; + while ((obs = it.GetNext()) != NULL) { + if (obs == find_me) + return true; + } + return false; } void AppCacheGroup::ScheduleUpdateRestart(int delay_ms) { |