OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_ | 5 #ifndef CHROME_BROWSER_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_ |
6 #define CHROME_BROWSER_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_ | 6 #define CHROME_BROWSER_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 static bool InStopTimerFieldTrialExperimentGroup(); | 90 static bool InStopTimerFieldTrialExperimentGroup(); |
91 | 91 |
92 // --------------------------------------------------------- | 92 // --------------------------------------------------------- |
93 // For the ZeroSuggestProvider field trial. | 93 // For the ZeroSuggestProvider field trial. |
94 | 94 |
95 // Returns whether the user is in any field trial where the | 95 // Returns whether the user is in any field trial where the |
96 // ZeroSuggestProvider should be used to get suggestions when the | 96 // ZeroSuggestProvider should be used to get suggestions when the |
97 // user clicks on the omnibox but has not typed anything yet. | 97 // user clicks on the omnibox but has not typed anything yet. |
98 static bool InZeroSuggestFieldTrial(); | 98 static bool InZeroSuggestFieldTrial(); |
99 | 99 |
| 100 // --------------------------------------------------------- |
| 101 // For the ShortcutsScoring field trial. |
| 102 |
| 103 // If the field trial is active and the user is in an experiment |
| 104 // group, extract from the experiment group name the maximum |
| 105 // relevance score ShortcutsProvider:: CalculateScore() can return. |
| 106 // Returns true on a successful extraction. If the extraction failed, |
| 107 // if the field trial is not active, etc., returns false. |
| 108 // CalculateScore()'s return value is a product of this maximum |
| 109 // relevance score and some attenuating factors that are all between |
| 110 // 0 and 1. (Note that Shortcuts results may have their scores |
| 111 // reduced later if the assigned score is higher than allowed for |
| 112 // non-inlineable results. Shortcuts results are not allowed to be |
| 113 // inlined.) |
| 114 static bool ShortcutsScoringMaxRelevance(int* max_relevance); |
| 115 |
100 private: | 116 private: |
101 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial); | 117 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial); |
102 }; | 118 }; |
103 | 119 |
104 #endif // CHROME_BROWSER_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_ | 120 #endif // CHROME_BROWSER_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_ |
OLD | NEW |