Commit 48569adc authored by dschuyler's avatar dschuyler Committed by Commit bot

Remove and deprecate SEARCH_SUGGEST_ANSWER. This type is no longer used in...

Remove and deprecate SEARCH_SUGGEST_ANSWER.  This type is no longer used in the UI code, since answers can be attached to suggestions of any type.

BUG=430513

Review URL: https://codereview.chromium.org/815273002

Cr-Commit-Position: refs/heads/master@{#314167}
parent 8084a6a0
......@@ -54,9 +54,8 @@ public class OmniboxSuggestion {
SEARCH_SUGGEST_PROFILE (12), // A personalized suggested search for a
// Google+ profile.
SEARCH_OTHER_ENGINE (13), // A search with a non-default engine.
OPEN_HISTORY_PAGE (17), // A synthetic result that opens the history page
OPEN_HISTORY_PAGE (17); // A synthetic result that opens the history page
// to search for the input.
SEARCH_SUGGEST_ANSWER (18); // A short result for a suggested search.
private final int mNativeType;
......
......@@ -84,10 +84,6 @@ void AutocompleteMatchToAssistedQuery(
*subtype = 44;
return;
}
case AutocompleteMatchType::SEARCH_SUGGEST_ANSWER: {
*subtype = 70;
return;
}
case AutocompleteMatchType::NAVSUGGEST: {
// Do not set subtype here; subtype may have been set above.
*type = 5;
......
......@@ -198,8 +198,6 @@ TEST_F(ShortcutsBackendTest, SanitizeMatchCore) {
"", "", AutocompleteMatchType::SEARCH_HISTORY },
{ "0,1", "0,0", AutocompleteMatchType::SEARCH_SUGGEST_PROFILE,
"", "", AutocompleteMatchType::SEARCH_HISTORY },
{ "0,1", "0,0", AutocompleteMatchType::SEARCH_SUGGEST_ANSWER,
"", "", AutocompleteMatchType::SEARCH_HISTORY },
};
for (size_t i = 0; i < arraysize(cases); ++i) {
......
......@@ -53,8 +53,6 @@ OmniboxEventProto::Suggestion::ResultType AsOmniboxEventResultType(
return OmniboxEventProto::Suggestion::SEARCH_SUGGEST_PERSONALIZED;
case AutocompleteMatchType::SEARCH_SUGGEST_PROFILE:
return OmniboxEventProto::Suggestion::SEARCH_SUGGEST_PROFILE;
case AutocompleteMatchType::SEARCH_SUGGEST_ANSWER:
return OmniboxEventProto::Suggestion::SEARCH_SUGGEST_ANSWER;
case AutocompleteMatchType::SEARCH_OTHER_ENGINE:
return OmniboxEventProto::Suggestion::SEARCH_OTHER_ENGINE;
case AutocompleteMatchType::EXTENSION_APP:
......
......@@ -217,7 +217,9 @@ message OmniboxEventProto {
// used by Android GSA for on-device
// suggestion logging.
NAVSUGGEST_PERSONALIZED = 21; // A personalized url.
SEARCH_SUGGEST_ANSWER = 22; // A short result for a suggested search.
SEARCH_SUGGEST_ANSWER = 22; // DEPRECATED. Answers no longer have their
// own type but instead can be attached to
// suggestions of any type.
}
optional ResultType result_type = 2;
......
......@@ -155,7 +155,6 @@ int AutocompleteMatch::TypeToIcon(Type type) {
IDR_OMNIBOX_SEARCH, // CONTACT_DEPRECATED
IDR_OMNIBOX_HTTP, // BOOKMARK_TITLE
IDR_OMNIBOX_HTTP, // NAVSUGGEST_PERSONALIZED
IDR_OMNIBOX_SEARCH, // SEARCH_SUGGEST_ANSWER
};
#else
static const int kIcons[] = {
......@@ -177,7 +176,6 @@ int AutocompleteMatch::TypeToIcon(Type type) {
IDR_OMNIBOX_SEARCH, // CONTACT_DEPRECATED
IDR_OMNIBOX_HTTP, // BOOKMARK_TITLE
IDR_OMNIBOX_HTTP, // NAVSUGGEST_PERSONALIZED
IDR_OMNIBOX_SEARCH, // SEARCH_SUGGEST_ANSWER
};
#endif
static_assert(arraysize(kIcons) == AutocompleteMatchType::NUM_TYPES,
......@@ -353,8 +351,7 @@ bool AutocompleteMatch::IsSpecializedSearchType(Type type) {
return type == AutocompleteMatchType::SEARCH_SUGGEST_ENTITY ||
type == AutocompleteMatchType::SEARCH_SUGGEST_INFINITE ||
type == AutocompleteMatchType::SEARCH_SUGGEST_PERSONALIZED ||
type == AutocompleteMatchType::SEARCH_SUGGEST_PROFILE ||
type == AutocompleteMatchType::SEARCH_SUGGEST_ANSWER;
type == AutocompleteMatchType::SEARCH_SUGGEST_PROFILE;
}
// static
......
......@@ -27,7 +27,6 @@ std::string AutocompleteMatchType::ToString(AutocompleteMatchType::Type type) {
"contact",
"bookmark-title",
"navsuggest-personalized",
"search-suggest-answer",
};
static_assert(arraysize(strings) == AutocompleteMatchType::NUM_TYPES,
"strings array must have NUM_TYPES elements");
......
......@@ -42,7 +42,6 @@ struct AutocompleteMatchType {
BOOKMARK_TITLE = 16, // A bookmark whose title contains the
// input.
NAVSUGGEST_PERSONALIZED = 17, // A personalized suggestion URL.
SEARCH_SUGGEST_ANSWER = 18, // A short result for a suggested search.
NUM_TYPES,
};
......
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