diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-25 03:09:41 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-25 03:09:41 +0000 |
commit | 84aebedeaa91c3fadf523260c12afa136420c7d3 (patch) | |
tree | c5ca8ca0e7bd3f5dba957556cbb062851b4d7853 /webkit | |
parent | efeaf7e7f80c74b91aa87edbbb0ace868f3574a7 (diff) | |
download | chromium_src-84aebedeaa91c3fadf523260c12afa136420c7d3.zip chromium_src-84aebedeaa91c3fadf523260c12afa136420c7d3.tar.gz chromium_src-84aebedeaa91c3fadf523260c12afa136420c7d3.tar.bz2 |
Reland 39942 - Switch NetworkChangeNotifier implementations to use ObserverList.
Fixed build problem with database_tracker.(cc|h).
BUG=36590
Review URL: http://codereview.chromium.org/660039
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39983 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/appcache/appcache_group.cc | 8 | ||||
-rw-r--r-- | webkit/database/database_tracker.cc | 1 | ||||
-rw-r--r-- | webkit/database/database_tracker.h | 2 |
3 files changed, 2 insertions, 9 deletions
diff --git a/webkit/appcache/appcache_group.cc b/webkit/appcache/appcache_group.cc index fd22563..8063b911 100644 --- a/webkit/appcache/appcache_group.cc +++ b/webkit/appcache/appcache_group.cc @@ -215,13 +215,7 @@ void AppCacheGroup::RunQueuedUpdates() { bool AppCacheGroup::FindObserver(UpdateObserver* find_me, const ObserverList<UpdateObserver>& observer_list) { - ObserverList<UpdateObserver>::Iterator it(observer_list); - UpdateObserver* obs; - while ((obs = it.GetNext()) != NULL) { - if (obs == find_me) - return true; - } - return false; + return observer_list.HasObserver(find_me); } void AppCacheGroup::ScheduleUpdateRestart(int delay_ms) { diff --git a/webkit/database/database_tracker.cc b/webkit/database/database_tracker.cc index 5bafa6e..6068836d 100644 --- a/webkit/database/database_tracker.cc +++ b/webkit/database/database_tracker.cc @@ -40,7 +40,6 @@ DatabaseTracker::DatabaseTracker(const FilePath& profile_path) } DatabaseTracker::~DatabaseTracker() { - DCHECK(observers_.size() == 0); DCHECK(dbs_to_be_deleted_.empty()); DCHECK(deletion_callbacks_.empty()); } diff --git a/webkit/database/database_tracker.h b/webkit/database/database_tracker.h index 139e5fe..785cd98 100644 --- a/webkit/database/database_tracker.h +++ b/webkit/database/database_tracker.h @@ -205,7 +205,7 @@ class DatabaseTracker scoped_ptr<DatabasesTable> databases_table_; scoped_ptr<QuotaTable> quota_table_; scoped_ptr<sql::MetaTable> meta_table_; - ObserverList<Observer> observers_; + ObserverList<Observer, true> observers_; std::map<string16, CachedOriginInfo> origins_info_map_; DatabaseConnections database_connections_; |