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

Unified Diff: ui/app_list/search/mixer.cc

Issue 922063003: Sort experimental app list search result groups. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_search_results_not_being_there
Patch Set: force test to be experimental app list Created 5 years, 10 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
« no previous file with comments | « no previous file | ui/app_list/search_result.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/search/mixer.cc
diff --git a/ui/app_list/search/mixer.cc b/ui/app_list/search/mixer.cc
index f873780b29a19287ddf1934d4d78b93e48f6a2dd..9c2e0295469928c28fe2c3563e63b0b6e1941815 100644
--- a/ui/app_list/search/mixer.cc
+++ b/ui/app_list/search/mixer.cc
@@ -211,6 +211,7 @@ void Mixer::Publish(const SortedResults& new_results,
// Update and use the old result if it exists.
SearchResult* ui_result = ui_result_it->second;
UpdateResult(new_result, ui_result);
+ ui_result->set_relevance(sort_data.score);
// |ui_results| takes back ownership from |ui_results_map| here.
ui_results->Add(ui_result);
@@ -219,8 +220,10 @@ void Mixer::Publish(const SortedResults& new_results,
// results.
ui_results_map.erase(ui_result->id());
} else {
+ scoped_ptr<SearchResult> result_copy = new_result.Duplicate();
+ result_copy->set_relevance(sort_data.score);
// Copy the result from |new_results| otherwise.
- ui_results->Add(new_result.Duplicate().release());
+ ui_results->Add(result_copy.release());
}
}
« no previous file with comments | « no previous file | ui/app_list/search_result.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698