summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tabs
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-24 22:41:47 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-24 22:41:47 +0000
commit6531594abea873c883782041fea5d126507497e1 (patch)
tree017227faab41fb16f84a2485ec9b03d3f783d132 /chrome/browser/tabs
parent60a782e6a5a80fbba8fe690f05502147ae998d8c (diff)
downloadchromium_src-6531594abea873c883782041fea5d126507497e1.zip
chromium_src-6531594abea873c883782041fea5d126507497e1.tar.gz
chromium_src-6531594abea873c883782041fea5d126507497e1.tar.bz2
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 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39942 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tabs')
-rw-r--r--chrome/browser/tabs/tab_strip_model.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/chrome/browser/tabs/tab_strip_model.cc b/chrome/browser/tabs/tab_strip_model.cc
index 3b216d4..2fba4b5 100644
--- a/chrome/browser/tabs/tab_strip_model.cc
+++ b/chrome/browser/tabs/tab_strip_model.cc
@@ -86,11 +86,7 @@ bool TabStripModel::HasNonPhantomTabs() const {
}
bool TabStripModel::HasObserver(TabStripModelObserver* observer) {
- for (size_t i = 0; i < observers_.size(); ++i) {
- if (observers_.GetElementAt(i) == observer)
- return true;
- }
- return false;
+ return observers_.HasObserver(observer);
}
bool TabStripModel::ContainsIndex(int index) const {