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..24f13f93b64cddb7f360d44ff503a206ee3d0ab5 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 = 4; |
|
Mathieu
2014/12/03 21:01:31
App launcher folks: I'm not sure any of this is ne
|
| // A value to indicate no max number of results limit. |
| const size_t kNoMaxResultsLimit = 0; |
| @@ -127,6 +128,7 @@ void Mixer::Init() { |
| groups_[OMNIBOX_GROUP].reset(new Group(kNoMaxResultsLimit, 2.0)); |
| groups_[WEBSTORE_GROUP].reset(new Group(kMaxWebstoreResults, 1.0)); |
| groups_[PEOPLE_GROUP].reset(new Group(kMaxPeopleResults, 0.0)); |
| + groups_[SUGGESTIONS_GROUP].reset(new Group(kMaxSuggestionsResults, 2.0)); |
| } |
| void Mixer::AddProviderToGroup(GroupId group, SearchProvider* provider) { |
| @@ -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); |