Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(406)

Unified Diff: components/omnibox/browser/omnibox_field_trial.h

Issue 1411543011: Omnibox: Make Keyword Provide More Generous with Matching (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: finish converting AddToMap() calls Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/omnibox/browser/omnibox_field_trial.h
diff --git a/components/omnibox/browser/omnibox_field_trial.h b/components/omnibox/browser/omnibox_field_trial.h
index b6e354993d5d8c59383ce63ebb299987de581cb9..674170f0a5fb23c42241a36de174b20507a28cbe 100644
--- a/components/omnibox/browser/omnibox_field_trial.h
+++ b/components/omnibox/browser/omnibox_field_trial.h
@@ -320,6 +320,28 @@ class OmniboxFieldTrial {
static bool PreventUWYTDefaultForNonURLInputs();
// ---------------------------------------------------------
+ // For the aggressive keyword matching experiment that's part of the bundled
+ // omnibox field trial.
+
+ // Returns whether KeywordProvider should consider the registry portion
+ // (e.g., co.uk) of keywords that look like hostnames as an important part of
+ // the keyword name for matching purposes. Returns true if the experiment
+ // isn't active.
+ static bool KeywordRequiresRegistry();
+
+ // For keywords that look like hostnames, returns whether KeywordProvider
+ // should require users to type a prefix of the hostname to match against
+ // them, rather than just the domain name portion. In other words, returns
+ // whether the prefix before the domain name should be considered important
+ // for matching purposes. Returns true if the experiment isn't active.
+ static bool KeywordRequiresPrefixMatch();
+
+ // Returns the relevance score that KeywordProvider should assign to keywords
+ // with sufficiently-complete matches, i.e., the user has typed all of the
+ // important part of the keyword. Returns -1 if the experiment isn't active.
+ static int KeywordScoreForSufficientlyCompleteMatch();
+
+ // ---------------------------------------------------------
// Exposed publicly for the sake of unittests.
static const char kBundledExperimentFieldTrialName[];
// Rule names used by the bundled experiment.
@@ -341,6 +363,9 @@ class OmniboxFieldTrial {
static const char kHQPNumTitleWordsRule[];
static const char kHQPAlsoDoHUPLikeScoringRule[];
static const char kPreventUWYTDefaultForNonURLInputsRule[];
+ static const char kKeywordRequiresRegistryRule[];
+ static const char kKeywordRequiresPrefixMatchRule[];
+ static const char kKeywordScoreForSufficientlyCompleteMatchRule[];
// Parameter names used by the HUP new scoring experiments.
static const char kHUPNewScoringEnabledParam[];

Powered by Google App Engine
This is Rietveld 408576698