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

Unified Diff: ui/app_list/search_provider.cc

Issue 2701123002: AppList Performance Optimization 2 (Closed)
Patch Set: Cache the tokenized name Created 3 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 | « ui/app_list/search_provider.h ('k') | ui/app_list/views/start_page_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/search_provider.cc
diff --git a/ui/app_list/search_provider.cc b/ui/app_list/search_provider.cc
index 6d7bea838e9bcc275841924b166856b7dec2b46e..a8887ee362159fd36836bee981b3ef21bdb5781a 100644
--- a/ui/app_list/search_provider.cc
+++ b/ui/app_list/search_provider.cc
@@ -16,7 +16,12 @@ SearchProvider::~SearchProvider() {
}
void SearchProvider::Add(std::unique_ptr<SearchResult> result) {
- results_.push_back(std::move(result));
+ results_.emplace_back(std::move(result));
+ FireResultChanged();
+}
+
+void SearchProvider::SwapResults(Results* new_results) {
+ results_.swap(*new_results);
FireResultChanged();
}
« no previous file with comments | « ui/app_list/search_provider.h ('k') | ui/app_list/views/start_page_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698