Commit 9a5a46b6 authored by Toni Barzic's avatar Toni Barzic Committed by Commit Bot

Fix notreached in OmniboxResult::GetSearchResultType

The method was not handling BOOKMARK_TITLE match type, even though it
can be added to app list search results.

BUG=1084862

Change-Id: I2d805f4553b12dede90226a8bb2150b2b26aff8d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2349969Reviewed-by: default avatarTony Yeoman <tby@chromium.org>
Commit-Queue: Toni Baržić <tbarzic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#797111}
parent 94f0cae7
......@@ -206,6 +206,8 @@ ash::SearchResultType OmniboxResult::GetSearchResultType() const {
return ash::OMNIBOX_SEARCH_SUGGEST;
case AutocompleteMatchType::SEARCH_SUGGEST_PERSONALIZED:
return ash::OMNIBOX_SUGGEST_PERSONALIZED;
case AutocompleteMatchType::BOOKMARK_TITLE:
return ash::OMNIBOX_BOOKMARK;
case AutocompleteMatchType::HISTORY_KEYWORD:
case AutocompleteMatchType::NAVSUGGEST:
......@@ -214,7 +216,6 @@ ash::SearchResultType OmniboxResult::GetSearchResultType() const {
case AutocompleteMatchType::SEARCH_SUGGEST_PROFILE:
case AutocompleteMatchType::SEARCH_OTHER_ENGINE:
case AutocompleteMatchType::CONTACT_DEPRECATED:
case AutocompleteMatchType::BOOKMARK_TITLE:
case AutocompleteMatchType::NAVSUGGEST_PERSONALIZED:
case AutocompleteMatchType::CALCULATOR:
case AutocompleteMatchType::CLIPBOARD_URL:
......@@ -230,7 +231,7 @@ ash::SearchResultType OmniboxResult::GetSearchResultType() const {
case AutocompleteMatchType::HISTORY_BODY:
case AutocompleteMatchType::TILE_SUGGESTION:
case AutocompleteMatchType::NUM_TYPES:
NOTREACHED();
NOTREACHED() << match_.type;
return ash::SEARCH_RESULT_TYPE_BOUNDARY;
}
}
......
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