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

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

Issue 18878007: Omnibox: Make the Controller Reorder Matches for Inlining (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 4 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: 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 5f3457b8c0c7a1f657914f9b758c3bab5619a327..f41a9ebbc663b513e83f984fdeee41fbeea0d02b 100644
--- a/chrome/browser/omnibox/omnibox_field_trial.cc
+++ b/chrome/browser/omnibox/omnibox_field_trial.cc
@@ -24,11 +24,6 @@ const char kHUPCreateShorterMatchFieldTrialName[] =
"OmniboxHUPCreateShorterMatch";
const char kStopTimerFieldTrialName[] = "OmniboxStopTimer";
const char kShortcutsScoringFieldTrialName[] = "OmniboxShortcutsScoring";
-const char kBundledExperimentFieldTrialName[] = "OmniboxBundledExperimentV1";
-
-// Rule names used by the bundled experiment.
-const char kSearchHistoryRule[] = "SearchHistory";
-const char kDemoteByTypeRule[] = "DemoteByType";
// The autocomplete dynamic field trial name prefix. Each field trial is
// configured dynamically and is retrieved automatically by Chrome during
@@ -265,6 +260,22 @@ void OmniboxFieldTrial::GetDemotionsByType(
}
}
+bool OmniboxFieldTrial::ReorderForLegalDefaultMatch(
+ AutocompleteInput::PageClassification current_page_classification) {
+ return OmniboxFieldTrial::GetValueForRuleInContext(
+ kReorderForLegalDefaultMatchRule, current_page_classification) ==
+ kReorderForLegalDefaultMatchRuleEnabled;
+}
+
+const char OmniboxFieldTrial::kBundledExperimentFieldTrialName[] =
+ "OmniboxBundledExperimentV1";
+const char OmniboxFieldTrial::kSearchHistoryRule[] = "SearchHistory";
+const char OmniboxFieldTrial::kDemoteByTypeRule[] = "DemoteByType";
+const char OmniboxFieldTrial::kReorderForLegalDefaultMatchRule[] =
+ "ReorderForLegalDefaultMatch";
+const char OmniboxFieldTrial::kReorderForLegalDefaultMatchRuleEnabled[] =
+ "ReorderForLegalDefaultMatch";
+
// Background and implementation details:
//
// Each experiment group in any field trial can come with an optional set of

Powered by Google App Engine
This is Rietveld 408576698