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

Unified Diff: athena/home/app_list_view_delegate.cc

Issue 621823004: Simplifies the structure of app_list search a bit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 2 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 | « ash/shell/app_list.cc ('k') | athena/main/url_search_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/home/app_list_view_delegate.cc
diff --git a/athena/home/app_list_view_delegate.cc b/athena/home/app_list_view_delegate.cc
index 99b1041cf1057e1cc99dfeef467e80a5cfc67176..29ecb0574e4bc6d95041d912c240d46a7bc65050 100644
--- a/athena/home/app_list_view_delegate.cc
+++ b/athena/home/app_list_view_delegate.cc
@@ -53,14 +53,10 @@ void AppListViewDelegate::RegisterSearchProvider(
void AppListViewDelegate::SearchResultChanged() {
// TODO(mukai): port app-list's Mixer to reorder the results properly.
app_list::SearchProvider* search_provider = search_providers_[0];
- std::vector<app_list::SearchResult*> results;
- search_provider->ReleaseResult(&results);
- if (results.empty()) {
- model_->results()->DeleteAll();
- } else {
- for (size_t i = 0; i < results.size(); ++i)
- model_->results()->Add(results[i]);
- }
+ const app_list::SearchProvider::Results& results = search_provider->results();
+ model_->results()->DeleteAll();
+ for (size_t i = 0; i < results.size(); ++i)
+ model_->results()->Add(results[i]->Duplicate().release());
}
bool AppListViewDelegate::ForceNativeDesktop() const {
« no previous file with comments | « ash/shell/app_list.cc ('k') | athena/main/url_search_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698