Index: ui/base/models/list_model.h |
diff --git a/ui/base/models/list_model.h b/ui/base/models/list_model.h |
index 754d6eb08546a86210696b20bc243b69ad8f8a9a..16d0d81e94e1d56836e0ee6cb8ba101057b2d248 100644 |
--- a/ui/base/models/list_model.h |
+++ b/ui/base/models/list_model.h |
@@ -26,7 +26,7 @@ class ListModel { |
// Adds |item| to the model at given |index|. |
void AddAt(size_t index, ItemType* item) { |
DCHECK_LE(index, item_count()); |
- items_->insert(items_.begin() + index, item); |
+ items_.insert(items_.begin() + index, item); |
NotifyItemsAdded(index, 1); |
} |
@@ -40,7 +40,7 @@ class ListModel { |
ItemType* RemoveAt(size_t index) { |
DCHECK_LT(index, item_count()); |
ItemType* item = items_[index]; |
- items_->erase(items_.begin() + index); |
+ items_.weak_erase(items_.begin() + index); |
NotifyItemsRemoved(index, 1); |
return item; |
} |
@@ -48,7 +48,7 @@ class ListModel { |
// Removes all items from the model. This does NOT delete the items. |
void RemoveAll() { |
size_t count = item_count(); |
- items_->clear(); |
+ items_.clear(); |
NotifyItemsRemoved(0, count); |
} |