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

Unified Diff: chrome/browser/autocomplete/autocomplete_match.cc

Issue 165163002: Handle Search suggest subtypes for Shortcuts DB (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Submit candidate Created 6 years, 9 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
Index: chrome/browser/autocomplete/autocomplete_match.cc
diff --git a/chrome/browser/autocomplete/autocomplete_match.cc b/chrome/browser/autocomplete/autocomplete_match.cc
index 4d04019761b178c6218c530cbd411e88a4a4a407..9784dd6893d4921556cfcfd4561262a7ca3b874e 100644
--- a/chrome/browser/autocomplete/autocomplete_match.cc
+++ b/chrome/browser/autocomplete/autocomplete_match.cc
@@ -338,11 +338,16 @@ bool AutocompleteMatch::IsSearchType(Type type) {
return type == AutocompleteMatchType::SEARCH_WHAT_YOU_TYPED ||
type == AutocompleteMatchType::SEARCH_HISTORY ||
type == AutocompleteMatchType::SEARCH_SUGGEST ||
- type == AutocompleteMatchType::SEARCH_SUGGEST_ENTITY ||
+ type == AutocompleteMatchType::SEARCH_OTHER_ENGINE ||
+ IsSpecializedSearchType(type);
+}
+
+// static
+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_OTHER_ENGINE;
+ type == AutocompleteMatchType::SEARCH_SUGGEST_PROFILE;
}
void AutocompleteMatch::ComputeStrippedDestinationURL(Profile* profile) {

Powered by Google App Engine
This is Rietveld 408576698