summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/omnibox/omnibox_edit_model.cc
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/ui/omnibox/omnibox_edit_model.cc
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/ui/omnibox/omnibox_edit_model.cc')
-rw-r--r--chrome/browser/ui/omnibox/omnibox_edit_model.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/chrome/browser/ui/omnibox/omnibox_edit_model.cc b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
index c01095b..dc35335 100644
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
@@ -466,8 +466,8 @@ void OmniboxEditModel::AdjustTextForCopy(int sel_min,
// the user is probably holding down control to cause the copy, which will
// screw up our calculation of the desired_tld.
AutocompleteMatch match;
- AutocompleteClassifierFactory::GetForProfile(profile_)->Classify(*text,
- KeywordIsSelected(), true, &match, NULL);
+ AutocompleteClassifierFactory::GetForProfile(profile_)->Classify(
+ *text, KeywordIsSelected(), true, ClassifyPage(), &match, NULL);
if (AutocompleteMatch::IsSearchType(match.type))
return;
*url = match.destination_url;
@@ -1329,7 +1329,7 @@ void OmniboxEditModel::GetInfoForCurrentText(AutocompleteMatch* match,
} else {
AutocompleteClassifierFactory::GetForProfile(profile_)->Classify(
UserTextFromDisplayText(view_->GetText()), KeywordIsSelected(), true,
- match, alternate_nav_url);
+ ClassifyPage(), match, alternate_nav_url);
}
}
@@ -1427,8 +1427,8 @@ void OmniboxEditModel::ClassifyStringForPasteAndGo(
AutocompleteMatch* match,
GURL* alternate_nav_url) const {
DCHECK(match);
- AutocompleteClassifierFactory::GetForProfile(profile_)->Classify(text,
- false, false, match, alternate_nav_url);
+ AutocompleteClassifierFactory::GetForProfile(profile_)->Classify(
+ text, false, false, ClassifyPage(), match, alternate_nav_url);
}
void OmniboxEditModel::SetFocusState(OmniboxFocusState state,