diff options
author | sreeram@chromium.org <sreeram@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-05 18:47:46 +0000 |
---|---|---|
committer | sreeram@chromium.org <sreeram@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-05 18:47:46 +0000 |
commit | 749e7ae0e75fbafc07e9595c097570dcc18cb0a9 (patch) | |
tree | 9c933f3aa511f4354a57a70be67ea85902e68c2b /chrome/browser/instant | |
parent | 1e83f35641d6e2a5a64109c686b10aec4cd91ffa (diff) | |
download | chromium_src-749e7ae0e75fbafc07e9595c097570dcc18cb0a9.zip chromium_src-749e7ae0e75fbafc07e9595c097570dcc18cb0a9.tar.gz chromium_src-749e7ae0e75fbafc07e9595c097570dcc18cb0a9.tar.bz2 |
Add a method to check if an AutocompleteMatch is of a search type.
BUG=none
R=pkasting@chromium.org,dominich@chromium.org,sky@chromium.org
TEST=none; no change in functionality.
Review URL: https://chromiumcodereview.appspot.com/10837365
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154994 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/instant')
-rw-r--r-- | chrome/browser/instant/instant_controller.cc | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/chrome/browser/instant/instant_controller.cc b/chrome/browser/instant/instant_controller.cc index 7d93605..4f116c4 100644 --- a/chrome/browser/instant/instant_controller.cc +++ b/chrome/browser/instant/instant_controller.cc @@ -271,11 +271,7 @@ void InstantController::HandleAutocompleteResults( match != (*provider)->matches().end(); ++match) { InstantAutocompleteResult result; result.provider = UTF8ToUTF16((*provider)->name()); - result.is_search = - match->type == AutocompleteMatch::SEARCH_WHAT_YOU_TYPED || - match->type == AutocompleteMatch::SEARCH_HISTORY || - match->type == AutocompleteMatch::SEARCH_SUGGEST || - match->type == AutocompleteMatch::SEARCH_OTHER_ENGINE; + result.is_search = AutocompleteMatch::IsSearchType(match->type); result.contents = match->description; result.destination_url = match->destination_url; result.relevance = match->relevance; |