OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_FIELD_TRIAL_H_ | 5 #ifndef COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_FIELD_TRIAL_H_ |
6 #define COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_FIELD_TRIAL_H_ | 6 #define COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_FIELD_TRIAL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 | 104 |
105 // Do not change these values as they need to be in sync with values | 105 // Do not change these values as they need to be in sync with values |
106 // specified in experiment configs on the variations server. | 106 // specified in experiment configs on the variations server. |
107 enum EmphasizeTitlesCondition { | 107 enum EmphasizeTitlesCondition { |
108 EMPHASIZE_WHEN_NONEMPTY = 0, | 108 EMPHASIZE_WHEN_NONEMPTY = 0, |
109 EMPHASIZE_WHEN_TITLE_MATCHES = 1, | 109 EMPHASIZE_WHEN_TITLE_MATCHES = 1, |
110 EMPHASIZE_WHEN_ONLY_TITLE_MATCHES = 2, | 110 EMPHASIZE_WHEN_ONLY_TITLE_MATCHES = 2, |
111 EMPHASIZE_NEVER = 3 | 111 EMPHASIZE_NEVER = 3 |
112 }; | 112 }; |
113 | 113 |
114 // Activates all dynamic field trials. The main difference between | |
115 // the autocomplete dynamic and static field trials is that the former | |
116 // don't require any code changes on the Chrome side as they are controlled | |
117 // on the server side. Chrome binary simply propagates all necessary | |
118 // information through the X-Client-Data header. | |
119 // This method may be called multiple times. | |
120 static void ActivateDynamicTrials(); | |
121 | |
122 // --------------------------------------------------------- | 114 // --------------------------------------------------------- |
123 // For any experiment that's part of the bundled omnibox field trial. | 115 // For any experiment that's part of the bundled omnibox field trial. |
124 | 116 |
125 // Returns a bitmap containing AutocompleteProvider::Type values | 117 // Returns a bitmap containing AutocompleteProvider::Type values |
126 // that should be disabled in AutocompleteController. | 118 // that should be disabled in AutocompleteController. |
127 static int GetDisabledProviderTypes(); | 119 static int GetDisabledProviderTypes(); |
128 | 120 |
129 // Returns whether the user is in any dynamic field trial where the | 121 // Returns whether the user is in any dynamic field trial where the |
130 // group has a the prefix |group_prefix|. | 122 // group has a the prefix |group_prefix|. |
131 static bool HasDynamicFieldTrialGroupPrefix(const char *group_prefix); | 123 static bool HasDynamicFieldTrialGroupPrefix(const char *group_prefix); |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 // prioritize different wildcard contexts, see the implementation. How to | 447 // prioritize different wildcard contexts, see the implementation. How to |
456 // interpret the value is left to the caller; this is rule-dependent. | 448 // interpret the value is left to the caller; this is rule-dependent. |
457 static std::string GetValueForRuleInContext( | 449 static std::string GetValueForRuleInContext( |
458 const std::string& rule, | 450 const std::string& rule, |
459 metrics::OmniboxEventProto::PageClassification page_classification); | 451 metrics::OmniboxEventProto::PageClassification page_classification); |
460 | 452 |
461 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial); | 453 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial); |
462 }; | 454 }; |
463 | 455 |
464 #endif // COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_FIELD_TRIAL_H_ | 456 #endif // COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_FIELD_TRIAL_H_ |
OLD | NEW |