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

Side by Side Diff: ui/app_list/search/mixer.cc

Issue 909773002: Fix apps sometimes not showing up in the app list search results. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_shadow_border
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | ui/app_list/search_result.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/app_list/search/mixer.h" 5 #include "ui/app_list/search/mixer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 10 matching lines...) Expand all
21 const size_t kMaxResults = 6; 21 const size_t kMaxResults = 6;
22 const size_t kMaxMainGroupResults = 4; 22 const size_t kMaxMainGroupResults = 4;
23 const size_t kMaxWebstoreResults = 2; 23 const size_t kMaxWebstoreResults = 2;
24 const size_t kMaxPeopleResults = 2; 24 const size_t kMaxPeopleResults = 2;
25 const size_t kMaxSuggestionsResults = 6; 25 const size_t kMaxSuggestionsResults = 6;
26 26
27 // A value to indicate no max number of results limit. 27 // A value to indicate no max number of results limit.
28 const size_t kNoMaxResultsLimit = 0; 28 const size_t kNoMaxResultsLimit = 0;
29 29
30 void UpdateResult(const SearchResult& source, SearchResult* target) { 30 void UpdateResult(const SearchResult& source, SearchResult* target) {
31 target->set_display_type(source.display_type());
31 target->set_title(source.title()); 32 target->set_title(source.title());
32 target->set_title_tags(source.title_tags()); 33 target->set_title_tags(source.title_tags());
33 target->set_details(source.details()); 34 target->set_details(source.details());
34 target->set_details_tags(source.details_tags()); 35 target->set_details_tags(source.details_tags());
35 } 36 }
36 37
37 } // namespace 38 } // namespace
38 39
39 Mixer::SortData::SortData() : result(NULL), score(0.0) { 40 Mixer::SortData::SortData() : result(NULL), score(0.0) {
40 } 41 }
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 results->swap(final); 253 results->swap(final);
253 } 254 }
254 255
255 void Mixer::FetchResults(bool is_voice_query, 256 void Mixer::FetchResults(bool is_voice_query,
256 const KnownResults& known_results) { 257 const KnownResults& known_results) {
257 for (const auto& item : groups_) 258 for (const auto& item : groups_)
258 item.second->FetchResults(is_voice_query, known_results); 259 item.second->FetchResults(is_voice_query, known_results);
259 } 260 }
260 261
261 } // namespace app_list 262 } // namespace app_list
OLDNEW
« 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