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 <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 // --------------------------------------------------------- | 252 // --------------------------------------------------------- |
253 // For the HQPAllowMatchInScheme experiment that's part of the | 253 // For the HQPAllowMatchInScheme experiment that's part of the |
254 // bundled omnibox field trial. | 254 // bundled omnibox field trial. |
255 | 255 |
256 // Returns true if HQP should allow an input term to match in the | 256 // Returns true if HQP should allow an input term to match in the |
257 // scheme (e.g., http://) of a URL. Returns false if the allow | 257 // scheme (e.g., http://) of a URL. Returns false if the allow |
258 // match in scheme experiment isn't active. | 258 // match in scheme experiment isn't active. |
259 static bool HQPAllowMatchInSchemeValue(); | 259 static bool HQPAllowMatchInSchemeValue(); |
260 | 260 |
261 // --------------------------------------------------------- | 261 // --------------------------------------------------------- |
| 262 // For the DisplayHintTextWhenPossible experiment that's part of the |
| 263 // bundled omnibox field trial. |
| 264 |
| 265 // Returns true of the omnibox should display hint text (Search |
| 266 // <search engine> or type URL) when possible (i.e., the omnibox |
| 267 // is otherwise non-empty). |
| 268 static bool DisplayHintTextWhenPossible(); |
| 269 |
| 270 // --------------------------------------------------------- |
262 // Exposed publicly for the sake of unittests. | 271 // Exposed publicly for the sake of unittests. |
263 static const char kBundledExperimentFieldTrialName[]; | 272 static const char kBundledExperimentFieldTrialName[]; |
264 // Rule names used by the bundled experiment. | 273 // Rule names used by the bundled experiment. |
| 274 static const char kDisplayHintTextWhenPossibleRule[]; |
265 static const char kShortcutsScoringMaxRelevanceRule[]; | 275 static const char kShortcutsScoringMaxRelevanceRule[]; |
266 static const char kSearchHistoryRule[]; | 276 static const char kSearchHistoryRule[]; |
267 static const char kDemoteByTypeRule[]; | 277 static const char kDemoteByTypeRule[]; |
268 static const char kHQPBookmarkValueRule[]; | 278 static const char kHQPBookmarkValueRule[]; |
269 static const char kHQPDiscountFrecencyWhenFewVisitsRule[]; | 279 static const char kHQPDiscountFrecencyWhenFewVisitsRule[]; |
270 static const char kHQPAllowMatchInTLDRule[]; | 280 static const char kHQPAllowMatchInTLDRule[]; |
271 static const char kHQPAllowMatchInSchemeRule[]; | 281 static const char kHQPAllowMatchInSchemeRule[]; |
272 static const char kZeroSuggestRule[]; | 282 static const char kZeroSuggestRule[]; |
273 static const char kZeroSuggestVariantRule[]; | 283 static const char kZeroSuggestVariantRule[]; |
274 | 284 |
(...skipping 25 matching lines...) Expand all Loading... |
300 // prioritize different wildcard contexts, see the implementation. How to | 310 // prioritize different wildcard contexts, see the implementation. How to |
301 // interpret the value is left to the caller; this is rule-dependent. | 311 // interpret the value is left to the caller; this is rule-dependent. |
302 static std::string GetValueForRuleInContext( | 312 static std::string GetValueForRuleInContext( |
303 const std::string& rule, | 313 const std::string& rule, |
304 AutocompleteInput::PageClassification page_classification); | 314 AutocompleteInput::PageClassification page_classification); |
305 | 315 |
306 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial); | 316 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial); |
307 }; | 317 }; |
308 | 318 |
309 #endif // CHROME_BROWSER_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_ | 319 #endif // CHROME_BROWSER_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_ |
OLD | NEW |