summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete/autocomplete.h
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/autocomplete.h
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/autocomplete.h')
-rw-r--r--chrome/browser/autocomplete/autocomplete.h38
1 files changed, 16 insertions, 22 deletions
diff --git a/chrome/browser/autocomplete/autocomplete.h b/chrome/browser/autocomplete/autocomplete.h
index 1c94cf9..71da6ef 100644
--- a/chrome/browser/autocomplete/autocomplete.h
+++ b/chrome/browser/autocomplete/autocomplete.h
@@ -276,33 +276,27 @@ struct AutocompleteMatch {
typedef std::vector<ACMatchClassification> ACMatchClassifications;
// The type of this match.
- // URL: a url, typically one the user previously entered but it may have
- // also been suggested. This is the default.
- // KEYWORD: a keyword.
- // SEARCH: short cut for typing type into the Google homepage. This should
- // only be used if the full URL is not shown.
enum Type {
- // Something that looks like a URL ("http://foo.com", "internal-server/").
- // This is the default.
- URL,
-
- // A manually created or auto-generated keyword, with or without a query
- // component. Auto-generated keywords may look similar to urls. See
- // keyword_autocomplete.cc.
- KEYWORD,
-
- // A search term or phrase for the user's default search provider
- // ("games", "foo"). These visually look similar to keywords. See
- // google_autocomplete.cc.
- SEARCH,
-
- // Shortcut that takes the user to destinations->history.
- HISTORY_SEARCH
+ URL_WHAT_YOU_TYPED, // The input as a URL.
+ HISTORY_URL, // A past page whose URL contains the input.
+ HISTORY_TITLE, // A past page whose title contains the input.
+ HISTORY_BODY, // A past page whose body contains the input.
+ HISTORY_KEYWORD, // A past page whose keyword contains the input.
+ NAVSUGGEST, // A suggested URL.
+ SEARCH_WHAT_YOU_TYPED, // The input as a search query (with the default
+ // engine).
+ SEARCH_HISTORY, // A past search (with the default engine)
+ // containing the input.
+ SEARCH_SUGGEST, // A suggested search (with the default engine).
+ SEARCH_OTHER_ENGINE, // A search with a non-default engine.
+ OPEN_HISTORY_PAGE, // A synthetic result that opens the history page to
+ // search for the input.
};
AutocompleteMatch(AutocompleteProvider* provider,
int relevance,
- bool deletable);
+ bool deletable,
+ Type type);
// Converts |type| to a string representation. Used in logging.
static std::string TypeToString(Type type);