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 | 10 |
10 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
11 | 12 |
12 // This class manages the Omnibox field trials. | 13 // This class manages the Omnibox field trials. |
13 class OmniboxFieldTrial { | 14 class OmniboxFieldTrial { |
14 public: | 15 public: |
15 // Creates the static field trial groups. | 16 // Creates the static field trial groups. |
16 // *** MUST NOT BE CALLED MORE THAN ONCE. *** | 17 // *** MUST NOT BE CALLED MORE THAN ONCE. *** |
17 static void ActivateStaticTrials(); | 18 static void ActivateStaticTrials(); |
18 | 19 |
(...skipping 22 matching lines...) Expand all Loading... |
41 static bool InDisallowInlineHQPFieldTrial(); | 42 static bool InDisallowInlineHQPFieldTrial(); |
42 | 43 |
43 // Returns whether the user should get the experiment setup or | 44 // Returns whether the user should get the experiment setup or |
44 // the default setup for this field trial. The experiment | 45 // the default setup for this field trial. The experiment |
45 // group prohibits inlining suggestions. | 46 // group prohibits inlining suggestions. |
46 static bool InDisallowInlineHQPFieldTrialExperimentGroup(); | 47 static bool InDisallowInlineHQPFieldTrialExperimentGroup(); |
47 | 48 |
48 // --------------------------------------------------------- | 49 // --------------------------------------------------------- |
49 // For the suggest field trial. | 50 // For the suggest field trial. |
50 | 51 |
51 // Fills in |field_trial_hash| with a hash of the active suggest field trial | 52 // Populates |field_trial_hash| with hashes of the active suggest field trial |
52 // name, if any. Returns true if the suggest field trial was active and | 53 // names, if any. Returns true if there was at least one active trial. |
53 // |field_trial_hash| was initialized. | 54 static bool GetActiveSuggestFieldTrialHashes( |
54 static bool GetActiveSuggestFieldTrialHash(uint32* field_trial_hash); | 55 std::vector<uint32>* field_trial_hash); |
55 | 56 |
56 // --------------------------------------------------------- | 57 // --------------------------------------------------------- |
57 // For the History Quick Provider new scoring field trial. | 58 // For the History Quick Provider new scoring field trial. |
58 | 59 |
59 // Returns whether the user is in any field trial group for this | 60 // Returns whether the user is in any field trial group for this |
60 // field trial. False indicates that the field trial wasn't | 61 // field trial. False indicates that the field trial wasn't |
61 // successfully created for some reason. | 62 // successfully created for some reason. |
62 static bool InHQPNewScoringFieldTrial(); | 63 static bool InHQPNewScoringFieldTrial(); |
63 | 64 |
64 // Returns whether the user should get the experimental setup or | 65 // Returns whether the user should get the experimental setup or |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 // URL database and directs HistoryQuick provider to calculate both | 106 // URL database and directs HistoryQuick provider to calculate both |
106 // HUP-style and HQP-style scores for matches, then return whichever | 107 // HUP-style and HQP-style scores for matches, then return whichever |
107 // is larger. | 108 // is larger. |
108 static bool InHQPReplaceHUPScoringFieldTrialExperimentGroup(); | 109 static bool InHQPReplaceHUPScoringFieldTrialExperimentGroup(); |
109 | 110 |
110 private: | 111 private: |
111 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial); | 112 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial); |
112 }; | 113 }; |
113 | 114 |
114 #endif // CHROME_BROWSER_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_ | 115 #endif // CHROME_BROWSER_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_ |
OLD | NEW |