Commit f4ed7b1f authored by Jia's avatar Jia Committed by Commit Bot

[cros-fuzzy-app] Remove unnecessary check.

Doing some cleanup as part of search consolidation.

FuzzyTokenizedStringMatch::IsRelevant already checks case-insensitve
matches between query & text:
https://cs.chromium.org/chromium/src/chrome/common/string_matching/fuzzy_tokenized_string_match.cc?g=0&l=278-287

Hence we don't need to repeat the check. Note
(i). |query_terms| is tokenized string of |query_|.
(ii). |indexed_name| is tokenized string of |app->name()|.

Bug: 990684
Change-Id: I91ec0d659e9c7f92a84264c0243b5569b0f88bb2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2089442Reviewed-by: default avatarThanh Nguyen <thanhdng@chromium.org>
Reviewed-by: default avatarTrent Apted <tapted@chromium.org>
Commit-Queue: Jia Meng <jiameng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#748063}
parent b256ed1f
...@@ -567,8 +567,7 @@ void AppSearchProvider::UpdateQueriedResults() { ...@@ -567,8 +567,7 @@ void AppSearchProvider::UpdateQueriedResults() {
if (match.IsRelevant(query_terms, *indexed_name, kRelevanceThreshold, if (match.IsRelevant(query_terms, *indexed_name, kRelevanceThreshold,
kUsePrefixOnly, kUseWeightedRatio, kUseEditDistance, kUsePrefixOnly, kUseWeightedRatio, kUseEditDistance,
kPartialMatchPenaltyRate) || kPartialMatchPenaltyRate) ||
app->MatchSearchableText(query_terms, use_exact_match) || app->MatchSearchableText(query_terms, use_exact_match)) {
base::EqualsCaseInsensitiveASCII(query_, app->name())) {
std::unique_ptr<AppResult> result = app->data_source()->CreateResult( std::unique_ptr<AppResult> result = app->data_source()->CreateResult(
app->id(), list_controller_, false); app->id(), list_controller_, false);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment