Chromium Code Reviews| Index: ui/app_list/search/mixer.cc |
| diff --git a/ui/app_list/search/mixer.cc b/ui/app_list/search/mixer.cc |
| index e9b0f1b747302172b524a8a09ecaf1d465512b9b..13f9db4462891ece1f85fb6b6eb9ad01d228866b 100644 |
| --- a/ui/app_list/search/mixer.cc |
| +++ b/ui/app_list/search/mixer.cc |
| @@ -22,6 +22,7 @@ const size_t kMaxResults = 6; |
| const size_t kMaxMainGroupResults = 4; |
| const size_t kMaxWebstoreResults = 2; |
| const size_t kMaxPeopleResults = 2; |
| +const size_t kMaxSuggestionsResults = 6; |
| // A value to indicate no max number of results limit. |
| const size_t kNoMaxResultsLimit = 0; |
| @@ -123,6 +124,7 @@ Mixer::~Mixer() { |
| } |
| void Mixer::Init() { |
| + groups_[SUGGESTIONS_GROUP].reset(new Group(kMaxSuggestionsResults, 4.0)); |
|
Matt Giuca
2014/12/09 05:34:55
Why is this rated so highly? If anything it could
Mathieu
2014/12/09 21:18:26
This can be re-adjusted later through experimentat
|
| groups_[MAIN_GROUP].reset(new Group(kMaxMainGroupResults, 3.0)); |
| groups_[OMNIBOX_GROUP].reset(new Group(kNoMaxResultsLimit, 2.0)); |
| groups_[WEBSTORE_GROUP].reset(new Group(kMaxWebstoreResults, 1.0)); |
| @@ -143,6 +145,7 @@ void Mixer::MixAndPublish(const KnownResults& known_results) { |
| const Group& omnibox_group = *groups_[OMNIBOX_GROUP]; |
| const Group& webstore_group = *groups_[WEBSTORE_GROUP]; |
| const Group& people_group = *groups_[PEOPLE_GROUP]; |
| + const Group& suggestions_group = *groups_[SUGGESTIONS_GROUP]; |
| // Adds main group and web store results first. |
| results.insert(results.end(), main_group.results().begin(), |
| @@ -151,6 +154,8 @@ void Mixer::MixAndPublish(const KnownResults& known_results) { |
| webstore_group.results().end()); |
| results.insert(results.end(), people_group.results().begin(), |
| people_group.results().end()); |
| + results.insert(results.end(), suggestions_group.results().begin(), |
| + suggestions_group.results().end()); |
| // Collapse duplicate apps from local and web store. |
| RemoveDuplicates(&results); |