Index: chrome/browser/autocomplete/autocomplete.cc |
=================================================================== |
--- chrome/browser/autocomplete/autocomplete.cc (revision 43988) |
+++ chrome/browser/autocomplete/autocomplete.cc (working copy) |
@@ -513,6 +513,31 @@ |
} |
} |
+bool AutocompleteMatch::IsSearchType() const { |
+ switch (type) { |
+ case URL_WHAT_YOU_TYPED: |
+ case HISTORY_URL: |
+ case HISTORY_TITLE: |
+ case HISTORY_BODY: |
+ case HISTORY_KEYWORD: |
+ case NAVSUGGEST: |
+ return false; |
+ |
+ case SEARCH_WHAT_YOU_TYPED: |
+ case SEARCH_HISTORY: |
+ case SEARCH_SUGGEST: |
+ return true; |
+ |
+ case SEARCH_OTHER_ENGINE: |
+ case OPEN_HISTORY_PAGE: |
+ return false; |
+ |
+ default: |
+ NOTREACHED(); |
+ return false; |
+ } |
+} |
+ |
#ifndef NDEBUG |
void AutocompleteMatch::Validate() const { |
ValidateClassifications(contents, contents_class); |
@@ -951,7 +976,7 @@ |
match.relevance = -match.relevance; |
latest_result_.AddMatch(match); |
return; |
- } // else, fall through and add item. |
+ } // else, fall through and add item. |
} |
AutocompleteMatch match(NULL, 0, false, AutocompleteMatch::OPEN_HISTORY_PAGE); |