Index: ui/app_list/views/app_list_main_view.cc |
diff --git a/ui/app_list/views/app_list_main_view.cc b/ui/app_list/views/app_list_main_view.cc |
index 9ca1860ac60ddabc29c433e85ac46e4c4c1907e6..d1cc5e7b828692078006312c4e94b8f4db512900 100644 |
--- a/ui/app_list/views/app_list_main_view.cc |
+++ b/ui/app_list/views/app_list_main_view.cc |
@@ -68,7 +68,12 @@ class AppListMainView::IconLoader : public AppListItemObserver { |
private: |
// AppListItemObserver overrides: |
void ItemIconChanged() override { |
- owner_->OnItemIconLoaded(this); |
+ owner_->OnIconLoaderFinished(this); |
+ // Note that IconLoader is released here. |
+ } |
+ |
+ void ItemBeingDestroyed() override { |
+ owner_->OnIconLoaderFinished(this); |
// Note that IconLoader is released here. |
} |
@@ -221,7 +226,7 @@ void AppListMainView::OnIconLoadingWaitTimer() { |
GetWidget()->Show(); |
} |
-void AppListMainView::OnItemIconLoaded(IconLoader* loader) { |
+void AppListMainView::OnIconLoaderFinished(IconLoader* loader) { |
ScopedVector<IconLoader>::iterator it = std::find( |
pending_icon_loaders_.begin(), pending_icon_loaders_.end(), loader); |
DCHECK(it != pending_icon_loaders_.end()); |