Skip to content

Commit 4d24499

Browse files
Maks OrlovichChromium LUCI CQ
Maks Orlovich
authored and
Chromium LUCI CQ
committed
Code health: port away from deprecated ListValue::GetString
This is a portion for /components/omnibox. (And in some cases also adjust away from other deprecated Value APIs, when convenient/nearby) This CL was uploaded by git cl split. [email protected] Bug: 1187090 Change-Id: Ib4ee847be8b545ecb2f185b280aa3b793f5ab94b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3306900 Auto-Submit: Maksim Orlovich <[email protected]> Reviewed-by: Orin Jaworski <[email protected]> Commit-Queue: Maksim Orlovich <[email protected]> Cr-Commit-Position: refs/heads/main@{#946194}
1 parent 45f0c62 commit 4d24499

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

components/omnibox/browser/search_suggestion_parser.cc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -618,8 +618,12 @@ bool SearchSuggestionParser::ParseSuggestResults(
618618
}
619619
}
620620

621-
if (types && types->GetString(index, &type))
622-
match_type = GetAutocompleteMatchType(type);
621+
if (types && index < types->GetList().size() &&
622+
types->GetList()[index].is_string()) {
623+
match_type =
624+
GetAutocompleteMatchType(types->GetList()[index].GetString());
625+
}
626+
623627
std::string deletion_url;
624628
if (suggestion_details) {
625629
const base::Value& suggestion_detail =

0 commit comments

Comments
 (0)