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

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

Issue 2716273004: Invert description and URL for experimental zero suggest suggestions. (Closed)
Patch Set: Remove unnecessary function. Created 3 years, 10 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
« no previous file with comments | « components/omnibox/browser/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: 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 c959a0f5960977f12b4c8cfcbc07a65ba8f4bbee..f1fa8e04769e215ef744dba4dc3fe861cef575e8 100644
--- a/components/omnibox/browser/omnibox_field_trial.cc
+++ b/components/omnibox/browser/omnibox_field_trial.cc
@@ -539,14 +539,19 @@ int OmniboxFieldTrial::KeywordScoreForSufficientlyCompleteMatch() {
OmniboxFieldTrial::EmphasizeTitlesCondition
OmniboxFieldTrial::GetEmphasizeTitlesConditionForInput(
- metrics::OmniboxInputType::Type input_type) {
- // Look up the parameter named kEmphasizeTitlesRule + ":" + input_type,
+ const AutocompleteInput& input) {
+ // First, check if we should emphasize titles for zero suggest suggestions.
+ if (input.from_omnibox_focus() &&
+ base::FeatureList::IsEnabled(features::kZeroSuggestSwapTitleAndUrl)) {
+ return EMPHASIZE_WHEN_NONEMPTY;
+ }
+ // Look up the parameter named kEmphasizeTitlesRule + ":" + input.type(),
// find its value, and return that value as an enum. If the parameter
// isn't redefined, fall back to the generic rule kEmphasizeTitlesRule + ":*"
std::string value_str(variations::GetVariationParamValue(
kBundledExperimentFieldTrialName,
std::string(kEmphasizeTitlesRule) + "_" +
- base::IntToString(static_cast<int>(input_type))));
+ base::IntToString(static_cast<int>(input.type()))));
if (value_str.empty()) {
value_str = variations::GetVariationParamValue(
kBundledExperimentFieldTrialName,
« no previous file with comments | « components/omnibox/browser/omnibox_field_trial.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698