summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete/autocomplete_match.cc
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-25 22:31:07 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-25 22:31:07 +0000
commitd30268aa9bd90bd8dd885124cd1eb8f45053c08b (patch)
treeb0b56ec35b800482d5770415b85140d6a2bf2c2c /chrome/browser/autocomplete/autocomplete_match.cc
parentf3a1d40d66739544a90212f92dac4080c3f3df71 (diff)
downloadchromium_src-d30268aa9bd90bd8dd885124cd1eb8f45053c08b.zip
chromium_src-d30268aa9bd90bd8dd885124cd1eb8f45053c08b.tar.gz
chromium_src-d30268aa9bd90bd8dd885124cd1eb8f45053c08b.tar.bz2
Increase number of matches SearchProvider can return to the full popup size,
assuming: (1) Instant Extended is enabled (so we can get metrics comparing before/after) (2) The extra matches come from server-scored suggestions. We allow the highest ranking 3 non-verbatim matches to come from any source, but after that we only allow server-scored matches (and verbatim matches) until we hit the result set limit. This requires extending the Result class in the search provider to track the origin of each match's score, as well as recording this information in the AutocompleteMatch's |additional_info| field. Note that https://codereview.chromium.org/17391005/ will simplify this somewhat since we'll be able to stop worrying about FinalizeInstantQuery() etc. BUG=252506 TEST=With instant extended on, type a query that generates lots of suggestions and see you get a full dropdown worth. R=mpearson@chromium.org, msw@chromium.org Review URL: https://codereview.chromium.org/17382015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208567 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/autocomplete_match.cc')
-rw-r--r--chrome/browser/autocomplete/autocomplete_match.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_match.cc b/chrome/browser/autocomplete/autocomplete_match.cc
index 22a049c..5c45f4b 100644
--- a/chrome/browser/autocomplete/autocomplete_match.cc
+++ b/chrome/browser/autocomplete/autocomplete_match.cc
@@ -436,6 +436,12 @@ void AutocompleteMatch::RecordAdditionalInfo(const std::string& property,
UTF16ToUTF8(base::TimeFormatShortDateAndTime(value)));
}
+std::string AutocompleteMatch::GetAdditionalInfo(
+ const std::string& property) const {
+ AdditionalInfo::const_iterator i(additional_info.find(property));
+ return (i == additional_info.end()) ? std::string() : i->second;
+}
+
#ifndef NDEBUG
void AutocompleteMatch::Validate() const {
ValidateClassifications(contents, contents_class);