| Index: ui/app_list/app_list_item_list.cc
|
| diff --git a/ui/app_list/app_list_item_list.cc b/ui/app_list/app_list_item_list.cc
|
| index 801f923ae2880c961e1776802db5f38f1cac6f7f..c8d96e2aec1a7c35ffd54ebf6079fbdd45f21b98 100644
|
| --- a/ui/app_list/app_list_item_list.cc
|
| +++ b/ui/app_list/app_list_item_list.cc
|
| @@ -166,17 +166,15 @@ void AppListItemList::DeleteItem(const std::string& id) {
|
| // |item| will be deleted on destruction.
|
| }
|
|
|
| -scoped_ptr<AppListItem> AppListItemList::RemoveItem(
|
| - const std::string& id) {
|
| +scoped_ptr<AppListItem> AppListItemList::RemoveItem(const std::string& id) {
|
| size_t index;
|
| - if (FindItemIndex(id, &index))
|
| - return RemoveItemAt(index);
|
| -
|
| - return scoped_ptr<AppListItem>();
|
| + if (!FindItemIndex(id, &index))
|
| + LOG(FATAL) << "RemoveItem: Not found: " << id;
|
| + return RemoveItemAt(index);
|
| }
|
|
|
| scoped_ptr<AppListItem> AppListItemList::RemoveItemAt(size_t index) {
|
| - DCHECK_LT(index, item_count());
|
| + CHECK_LT(index, item_count());
|
| AppListItem* item = app_list_items_[index];
|
| app_list_items_.weak_erase(app_list_items_.begin() + index);
|
| FOR_EACH_OBSERVER(AppListItemListObserver,
|
|
|