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

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

Issue 2864103003: Limit the number of history urls indexed for omnibox suggestions. (Closed)
Patch Set: Fixes. Created 3 years, 7 months 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.cc
diff --git a/components/omnibox/browser/omnibox_field_trial.cc b/components/omnibox/browser/omnibox_field_trial.cc
index 378027ff0bc2748b7e25fac1086ed2b30034d053..11e23c127d5dc7814b8d12b5c271be4bacd734e0 100644
--- a/components/omnibox/browser/omnibox_field_trial.cc
+++ b/components/omnibox/browser/omnibox_field_trial.cc
@@ -632,6 +632,18 @@ int OmniboxFieldTrial::GetPhysicalWebAfterTypingBaseRelevance() {
}
// static
+int OmniboxFieldTrial::MaxNumHistoryUrlsIndexedAtStartup() {
+ std::string param_value(variations::GetVariationParamValue(
+ kBundledExperimentFieldTrialName,
+ kMaxNumHistoryUrlsIndexedAtStartupParam));
+ int num_urls;
+ if (!param_value.empty() && base::StringToInt(param_value, &num_urls))
+ return num_urls;
+ // Default value is set to -1 for unlimited number of urls.
+ return -1;
+}
+
+// static
bool OmniboxFieldTrial::InZeroSuggestRedirectToChromeFieldTrial() {
return base::FeatureList::IsEnabled(omnibox::kZeroSuggestRedirectToChrome);
}
@@ -726,6 +738,9 @@ const char OmniboxFieldTrial::kPhysicalWebZeroSuggestBaseRelevanceParam[] =
const char OmniboxFieldTrial::kPhysicalWebAfterTypingBaseRelevanceParam[] =
"PhysicalWebAfterTypingBaseRelevanceParam";
+const char OmniboxFieldTrial::kMaxNumHistoryUrlsIndexedAtStartupParam[] =
+ "MaxNumHistoryUrlsIndexedAtStartup";
+
const char OmniboxFieldTrial::kZeroSuggestRedirectToChromeServerAddressParam[] =
"ZeroSuggestRedirectToChromeServerAddress";
const char

Powered by Google App Engine
This is Rietveld 408576698