From 222650396e5a4a40891362bc7f660b9b73dd3ed4 Mon Sep 17 00:00:00 2001 From: calamity Date: Sun, 8 Feb 2015 20:37:08 -0800 Subject: [PATCH] Fix apps sometimes not showing up in the app list search results. This CL fixes an issue with the experimental app list search where the app results would sometimes not show up. This was being caused by the display type not being updated when the result was copied from the mixer, causing recommendation results not to change into tile results. BUG=456060 Review URL: https://codereview.chromium.org/909773002 Cr-Commit-Position: refs/heads/master@{#315264} --- ui/app_list/search/mixer.cc | 1 + ui/app_list/search_result.h | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ui/app_list/search/mixer.cc b/ui/app_list/search/mixer.cc index e4ef2f597479..95da23de8d53 100644 --- a/ui/app_list/search/mixer.cc +++ b/ui/app_list/search/mixer.cc @@ -28,6 +28,7 @@ const size_t kMaxSuggestionsResults = 6; const size_t kNoMaxResultsLimit = 0; void UpdateResult(const SearchResult& source, SearchResult* target) { + target->set_display_type(source.display_type()); target->set_title(source.title()); target->set_title_tags(source.title_tags()); target->set_details(source.details()); diff --git a/ui/app_list/search_result.h b/ui/app_list/search_result.h index 5efcfd06a898..90cd6cd2b931 100644 --- a/ui/app_list/search_result.h +++ b/ui/app_list/search_result.h @@ -99,7 +99,11 @@ class APP_LIST_EXPORT SearchResult { const std::string& id() const { return id_; } double relevance() const { return relevance_; } + DisplayType display_type() const { return display_type_; } + void set_display_type(DisplayType display_type) { + display_type_ = display_type; + } const Actions& actions() const { return actions_; @@ -143,9 +147,6 @@ class APP_LIST_EXPORT SearchResult { protected: void set_id(const std::string& id) { id_ = id; } void set_relevance(double relevance) { relevance_ = relevance; } - void set_display_type(DisplayType display_type) { - display_type_ = display_type; - } void set_voice_result(bool voice_result) { voice_result_ = voice_result; } private: -- 2.11.4.GIT