From 884df059359ecd04dab90ce3e05f4b2a341c2bd3 Mon Sep 17 00:00:00 2001 From: "mpearson@chromium.org" Date: Sun, 9 Feb 2014 03:22:22 +0000 Subject: Omnibox: Pass Input Box Type to AutocompleteClassifier (where possible and reasonable) This is a resubmission of https://codereview.chromium.org/138173007/ that should have fixed the gtk compile error. Previously, the input box type (a.k.a. current page classification) (search results page doing search term replacement, arbitrary URL, new tab page omnibox, new tab page fakebox, etc.) was not passed to AutocompleteClassifier. This adds plumbing to pass the variable to the classifier in some cases. (Some other cases I decided were too much of a hassle to fix, and not important.) TBR=brettw,pkasting brettw: for changes to chrome/browser/tab_contents/render_view_context_menu.cc pkasting: because he already reviewed it BUG=265678 Review URL: https://codereview.chromium.org/157033005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249982 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/tab_contents/render_view_context_menu.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'chrome/browser/tab_contents') diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc index 628d903..f2db25e 100644 --- a/chrome/browser/tab_contents/render_view_context_menu.cc +++ b/chrome/browser/tab_contents/render_view_context_menu.cc @@ -23,6 +23,7 @@ #include "chrome/browser/app_mode/app_mode_utils.h" #include "chrome/browser/autocomplete/autocomplete_classifier.h" #include "chrome/browser/autocomplete/autocomplete_classifier_factory.h" +#include "chrome/browser/autocomplete/autocomplete_input.h" #include "chrome/browser/autocomplete/autocomplete_match.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/chrome_notification_types.h" @@ -1013,7 +1014,8 @@ void RenderViewContextMenu::AppendSearchProvider() { AutocompleteMatch match; AutocompleteClassifierFactory::GetForProfile(profile_)->Classify( - params_.selection_text, false, false, &match, NULL); + params_.selection_text, false, false, AutocompleteInput::INVALID_SPEC, + &match, NULL); selection_navigation_url_ = match.destination_url; if (!selection_navigation_url_.is_valid()) return; -- cgit v1.1