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

Unified Diff: ui/app_list/search/tokenized_string.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/mixer.cc ('k') | ui/app_list/search_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/search/tokenized_string.cc
diff --git a/ui/app_list/search/tokenized_string.cc b/ui/app_list/search/tokenized_string.cc
index 232b3e1cf534a39dab2fa16d35cb0f0b72777163..887fe86613a6f30a956af0c429d2642444080444 100644
--- a/ui/app_list/search/tokenized_string.cc
+++ b/ui/app_list/search/tokenized_string.cc
@@ -38,9 +38,9 @@ void TokenizedString::Tokenize() {
const size_t word_start = break_iter.prev();
TermBreakIterator term_iter(word);
while (term_iter.Advance()) {
- tokens_.push_back(base::i18n::ToLower(term_iter.GetCurrentTerm()));
- mappings_.push_back(gfx::Range(word_start + term_iter.prev(),
- word_start + term_iter.pos()));
+ tokens_.emplace_back(base::i18n::ToLower(term_iter.GetCurrentTerm()));
+ mappings_.emplace_back(word_start + term_iter.prev(),
+ word_start + term_iter.pos());
}
}
}
« no previous file with comments | « ui/app_list/search/mixer.cc ('k') | ui/app_list/search_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698