summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete/history_url_provider.cc
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-13 00:19:00 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-13 00:19:00 +0000
commit4c1fb7ec9e85150afcbc7f3e0c2cbe788e31e9de (patch)
tree114c7194a922ef8c6dfdea7ebbc38f41abf8588a /chrome/browser/autocomplete/history_url_provider.cc
parentd7cbf44926f66dde008ef8a6b8141ec8a774692c (diff)
downloadchromium_src-4c1fb7ec9e85150afcbc7f3e0c2cbe788e31e9de.zip
chromium_src-4c1fb7ec9e85150afcbc7f3e0c2cbe788e31e9de.tar.gz
chromium_src-4c1fb7ec9e85150afcbc7f3e0c2cbe788e31e9de.tar.bz2
Omnibox metrics logging patch splitout, part 5: Add additional AutocompleteMatch types, and pass a type to the AutocompleteMatch constructor. The added detail in the new types is not used for anything functional; its sole purpose is for metric logging. Someday we could probably update other bits of the code to make use of this, though (e.g. the paste-and-search vs. paste-and-go determinant code).
These are separable changes, but doing either one without the other would have required an annoying number of fragile temporary changes. Review URL: http://codereview.chromium.org/10855 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5329 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/history_url_provider.cc')
-rw-r--r--chrome/browser/autocomplete/history_url_provider.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/browser/autocomplete/history_url_provider.cc b/chrome/browser/autocomplete/history_url_provider.cc
index 01293db..175fca4 100644
--- a/chrome/browser/autocomplete/history_url_provider.cc
+++ b/chrome/browser/autocomplete/history_url_provider.cc
@@ -219,7 +219,8 @@ void HistoryURLProvider::QueryComplete(
void HistoryURLProvider::SuggestExactInput(const AutocompleteInput& input,
bool trim_http) {
AutocompleteMatch match(this,
- CalculateRelevance(input.type(), WHAT_YOU_TYPED, 0), false);
+ CalculateRelevance(input.type(), WHAT_YOU_TYPED, 0), false,
+ AutocompleteMatch::URL_WHAT_YOU_TYPED);
// Try to canonicalize the URL. If this fails, don't create a What You Typed
// suggestion, since it can't be navigated to. We also need this so other
@@ -796,7 +797,7 @@ AutocompleteMatch HistoryURLProvider::HistoryMatchToACMatch(
const history::URLRow& info = history_match.url_info;
AutocompleteMatch match(this,
CalculateRelevance(params->input.type(), match_type, match_number),
- !!info.visit_count());
+ !!info.visit_count(), AutocompleteMatch::HISTORY_URL);
match.destination_url = UTF8ToWide(info.url().possibly_invalid_spec());
match.fill_into_edit = gfx::ElideUrl(info.url(), ChromeFont(), 0,
match_type == WHAT_YOU_TYPED ? std::wstring() : params->languages);