summaryrefslogtreecommitdiffstats
path: root/chrome/browser/omnibox
diff options
context:
space:
mode:
authormpearson@chromium.org <mpearson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-12 22:52:26 +0000
committermpearson@chromium.org <mpearson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-12 22:52:26 +0000
commite9924d1eba9261ca423b149177765100d08b6850 (patch)
tree584aec7cef67ea560ac7e0a8cdbea016dbfb5e09 /chrome/browser/omnibox
parent9670743859060a4703e8ce00864e091fd64540db (diff)
downloadchromium_src-e9924d1eba9261ca423b149177765100d08b6850.zip
chromium_src-e9924d1eba9261ca423b149177765100d08b6850.tar.gz
chromium_src-e9924d1eba9261ca423b149177765100d08b6850.tar.bz2
Omnibox: Discount Frecency Estimates for URLs with <10 Visits
Currently a URL calculates its frecency score using at most its ten most recent visits. This means for instance if a URL was visited once today (and never any other times), the estimated frecency will imply the user visits the URL once every day. This is extremely optimistic. This change introduces an experiment to alter this behavior. In particular, we now pretend the user has ten visits to the URL (even if the actual count is lower), and simply have those additional "visits" not count for anything. This is the first bullet on the attached bug. BUG=327085 Review URL: https://codereview.chromium.org/103783003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240454 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/omnibox')
-rw-r--r--chrome/browser/omnibox/omnibox_field_trial.cc9
-rw-r--r--chrome/browser/omnibox/omnibox_field_trial.h11
2 files changed, 20 insertions, 0 deletions
diff --git a/chrome/browser/omnibox/omnibox_field_trial.cc b/chrome/browser/omnibox/omnibox_field_trial.cc
index 096e244..3d604c4 100644
--- a/chrome/browser/omnibox/omnibox_field_trial.cc
+++ b/chrome/browser/omnibox/omnibox_field_trial.cc
@@ -319,6 +319,13 @@ int OmniboxFieldTrial::HQPBookmarkValue() {
return bookmark_value;
}
+bool OmniboxFieldTrial::HQPDiscountFrecencyWhenFewVisits() {
+ std::string discount_frecency_str = chrome_variations::
+ GetVariationParamValue(kBundledExperimentFieldTrialName,
+ kHQPDiscountFrecencyWhenFewVisitsRule);
+ return discount_frecency_str == "true";
+}
+
bool OmniboxFieldTrial::HQPAllowMatchInTLDValue() {
std::string allow_match_in_tld_str = chrome_variations::
GetVariationParamValue(kBundledExperimentFieldTrialName,
@@ -344,6 +351,8 @@ const char OmniboxFieldTrial::kReorderForLegalDefaultMatchRule[] =
"ReorderForLegalDefaultMatch";
const char OmniboxFieldTrial::kHQPBookmarkValueRule[] =
"HQPBookmarkValue";
+const char OmniboxFieldTrial::kHQPDiscountFrecencyWhenFewVisitsRule[] =
+ "HQPDiscountFrecencyWhenFewVisits";
const char OmniboxFieldTrial::kHQPAllowMatchInTLDRule[] = "HQPAllowMatchInTLD";
const char OmniboxFieldTrial::kHQPAllowMatchInSchemeRule[] =
"HQPAllowMatchInScheme";
diff --git a/chrome/browser/omnibox/omnibox_field_trial.h b/chrome/browser/omnibox/omnibox_field_trial.h
index 8ee0381..9e9ee55 100644
--- a/chrome/browser/omnibox/omnibox_field_trial.h
+++ b/chrome/browser/omnibox/omnibox_field_trial.h
@@ -185,6 +185,16 @@ class OmniboxFieldTrial {
static int HQPBookmarkValue();
// ---------------------------------------------------------
+ // For the HQPDiscountFrecencyWhenFewVisits experiment that's part of
+ // the bundled omnibox field trial.
+
+ // Returns whether to discount the frecency score estimates when a
+ // URL has fewer than ScoredHistoryMatch::kMaxVisitsToScore visits.
+ // See comments in scored_history_match.h for details. Returns false
+ // if the discount frecency experiment isn't active.
+ static bool HQPDiscountFrecencyWhenFewVisits();
+
+ // ---------------------------------------------------------
// For the HQPAllowMatchInTLD experiment that's part of the
// bundled omnibox field trial.
@@ -212,6 +222,7 @@ class OmniboxFieldTrial {
static const char kUndemotableTopTypeRule[];
static const char kReorderForLegalDefaultMatchRule[];
static const char kHQPBookmarkValueRule[];
+ static const char kHQPDiscountFrecencyWhenFewVisitsRule[];
static const char kHQPAllowMatchInTLDRule[];
static const char kHQPAllowMatchInSchemeRule[];
// Rule values.