Commit 5b4a8e5c authored by Siddhartha's avatar Siddhartha Committed by Commit Bot

Omnibox: Launch HQP url limiting experiment

The Experiment results are stated in https://goo.gl/EfU2ti.

BUG=715852

Change-Id: Ic4fc697bc5dcf627a89263e3faf61c78d5b1fb85
Reviewed-on: https://chromium-review.googlesource.com/762343
Commit-Queue: Siddhartha S <ssid@chromium.org>
Reviewed-by: default avatarMark Pearson <mpearson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517060}
parent 7b717e17
......@@ -548,15 +548,27 @@ float OmniboxFieldTrial::HQPExperimentalTopicalityThreshold() {
int OmniboxFieldTrial::MaxNumHQPUrlsIndexedAtStartup() {
const char* param = kMaxNumHQPUrlsIndexedAtStartupOnNonLowEndDevicesParam;
if (base::SysInfo::IsLowEndDevice())
const bool is_low_end_device = base::SysInfo::IsLowEndDevice();
if (is_low_end_device)
param = kMaxNumHQPUrlsIndexedAtStartupOnLowEndDevicesParam;
std::string param_value(variations::GetVariationParamValue(
kBundledExperimentFieldTrialName, param));
int num_urls;
if (base::StringToInt(param_value, &num_urls))
return num_urls;
#if defined(OS_ANDROID)
// Limits on Android are chosen based on experiment results. See
// crbug.com/715852#c18.
constexpr int kMaxNumHQPUrlsIndexedAtStartupOnLowEndDevices = 100;
constexpr int kMaxNumHQPUrlsIndexedAtStartupOnNonLowEndDevices = 1000;
if (is_low_end_device)
return kMaxNumHQPUrlsIndexedAtStartupOnLowEndDevices;
return kMaxNumHQPUrlsIndexedAtStartupOnNonLowEndDevices;
#else
// Default value is set to -1 for unlimited number of urls.
return -1;
#endif // defined(OS_ANDROID)
}
size_t OmniboxFieldTrial::HQPMaxVisitsToScore() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment