Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(501)

Unified Diff: ui/app_list/views/search_result_container_view.cc

Issue 1132943004: Add Apps.AppListSearchResultDistanceFromOrigin UMA stat. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add_query_length_stat
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/app_list/views/search_result_container_view.cc
diff --git a/ui/app_list/views/search_result_container_view.cc b/ui/app_list/views/search_result_container_view.cc
index 11ccb25bb97ae51edb25609a0e5461e0bd793499..b8a9852e01965260f486b7e6a1e66fafa93aebc3 100644
--- a/ui/app_list/views/search_result_container_view.cc
+++ b/ui/app_list/views/search_result_container_view.cc
@@ -61,6 +61,10 @@ void SearchResultContainerView::ScheduleUpdate() {
}
}
+bool SearchResultContainerView::UpdateScheduled() {
+ return update_factory_.HasWeakPtrs();
+}
+
void SearchResultContainerView::ListItemsAdded(size_t start, size_t count) {
ScheduleUpdate();
}
@@ -79,10 +83,10 @@ void SearchResultContainerView::ListItemsChanged(size_t start, size_t count) {
}
void SearchResultContainerView::DoUpdate() {
+ update_factory_.InvalidateWeakPtrs();
num_results_ = Update();
Layout();
PreferredSizeChanged();
- update_factory_.InvalidateWeakPtrs();
}
} // namespace app_list

Powered by Google App Engine
This is Rietveld 408576698