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

Unified Diff: chrome/browser/omnibox/omnibox_field_trial.cc

Issue 67553002: Omnibox Field Trial: Make HQP Score Bookmarks More Highly (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Peter's comments Created 7 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
« no previous file with comments | « chrome/browser/omnibox/omnibox_field_trial.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/omnibox/omnibox_field_trial.cc
diff --git a/chrome/browser/omnibox/omnibox_field_trial.cc b/chrome/browser/omnibox/omnibox_field_trial.cc
index 7bdc7267327f91dc81e129b3ab503931bd202349..18b8ed35a2d1d64a33d05c69362cd0e0230b1b66 100644
--- a/chrome/browser/omnibox/omnibox_field_trial.cc
+++ b/chrome/browser/omnibox/omnibox_field_trial.cc
@@ -305,6 +305,20 @@ bool OmniboxFieldTrial::ReorderForLegalDefaultMatch(
kReorderForLegalDefaultMatchRuleEnabled;
}
+int OmniboxFieldTrial::HQPBookmarkValue() {
+ std::string bookmark_value_str = chrome_variations::
+ GetVariationParamValue(kBundledExperimentFieldTrialName,
+ kHQPBookmarkValueRule);
+ if (bookmark_value_str.empty())
+ return 1;
+ // This is a best-effort conversion; we trust the hand-crafted parameters
+ // downloaded from the server to be perfect. There's no need for handle
+ // errors smartly.
+ int bookmark_value;
+ base::StringToInt(bookmark_value_str, &bookmark_value);
+ return bookmark_value;
+}
+
const char OmniboxFieldTrial::kBundledExperimentFieldTrialName[] =
"OmniboxBundledExperimentV1";
const char OmniboxFieldTrial::kShortcutsScoringMaxRelevanceRule[] =
@@ -314,6 +328,8 @@ const char OmniboxFieldTrial::kDemoteByTypeRule[] = "DemoteByType";
const char OmniboxFieldTrial::kUndemotableTopTypeRule[] = "UndemotableTopTypes";
const char OmniboxFieldTrial::kReorderForLegalDefaultMatchRule[] =
"ReorderForLegalDefaultMatch";
+const char OmniboxFieldTrial::kHQPBookmarkValueRule[] =
+ "HQPBookmarkValue";
const char OmniboxFieldTrial::kReorderForLegalDefaultMatchRuleEnabled[] =
"ReorderForLegalDefaultMatch";
« no previous file with comments | « chrome/browser/omnibox/omnibox_field_trial.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698