summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/extensions/extension_shelf_model.cc3
-rw-r--r--chrome/browser/tabs/tab_strip_model.cc6
2 files changed, 7 insertions, 2 deletions
diff --git a/chrome/browser/extensions/extension_shelf_model.cc b/chrome/browser/extensions/extension_shelf_model.cc
index 51a8ce1..dc584d8 100644
--- a/chrome/browser/extensions/extension_shelf_model.cc
+++ b/chrome/browser/extensions/extension_shelf_model.cc
@@ -44,7 +44,8 @@ ExtensionShelfModel::~ExtensionShelfModel() {
FOR_EACH_OBSERVER(ExtensionShelfModelObserver, observers_,
ShelfModelDeleting());
- observers_.Clear();
+ while (observers_.size())
+ observers_.RemoveObserver(observers_.GetElementAt(0));
for (iterator t = toolstrips_.begin(); t != toolstrips_.end(); ++t)
delete t->host;
diff --git a/chrome/browser/tabs/tab_strip_model.cc b/chrome/browser/tabs/tab_strip_model.cc
index 2fba4b5..3b216d4 100644
--- a/chrome/browser/tabs/tab_strip_model.cc
+++ b/chrome/browser/tabs/tab_strip_model.cc
@@ -86,7 +86,11 @@ bool TabStripModel::HasNonPhantomTabs() const {
}
bool TabStripModel::HasObserver(TabStripModelObserver* observer) {
- return observers_.HasObserver(observer);
+ for (size_t i = 0; i < observers_.size(); ++i) {
+ if (observers_.GetElementAt(i) == observer)
+ return true;
+ }
+ return false;
}
bool TabStripModel::ContainsIndex(int index) const {