summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents
diff options
context:
space:
mode:
authormpearson@chromium.org <mpearson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-09 03:22:22 +0000
committermpearson@chromium.org <mpearson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-09 03:22:22 +0000
commit884df059359ecd04dab90ce3e05f4b2a341c2bd3 (patch)
tree1d72411c68855b78ca5cd98af181852c483feff2 /chrome/browser/tab_contents
parentf70338b02f7a8e070b60fa759e95df24d7d95375 (diff)
downloadchromium_src-884df059359ecd04dab90ce3e05f4b2a341c2bd3.zip
chromium_src-884df059359ecd04dab90ce3e05f4b2a341c2bd3.tar.gz
chromium_src-884df059359ecd04dab90ce3e05f4b2a341c2bd3.tar.bz2
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
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r--chrome/browser/tab_contents/render_view_context_menu.cc4
1 files changed, 3 insertions, 1 deletions
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;