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_OMNIBOX_FIELD_TRIAL_H_ | 5 #ifndef COMPONENTS_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_ |
6 #define COMPONENTS_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_ | 6 #define COMPONENTS_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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 // --------------------------------------------------------- | 229 // --------------------------------------------------------- |
230 // For the HQPAllowMatchInScheme experiment that's part of the | 230 // For the HQPAllowMatchInScheme experiment that's part of the |
231 // bundled omnibox field trial. | 231 // bundled omnibox field trial. |
232 | 232 |
233 // Returns true if HQP should allow an input term to match in the | 233 // Returns true if HQP should allow an input term to match in the |
234 // scheme (e.g., http://) of a URL. Returns false if the allow | 234 // scheme (e.g., http://) of a URL. Returns false if the allow |
235 // match in scheme experiment isn't active. | 235 // match in scheme experiment isn't active. |
236 static bool HQPAllowMatchInSchemeValue(); | 236 static bool HQPAllowMatchInSchemeValue(); |
237 | 237 |
238 // --------------------------------------------------------- | 238 // --------------------------------------------------------- |
239 // For the BookmarksIndexURLs experiment that's part of the | |
240 // bundled omnibox field trial. | |
241 | |
242 // Returns true if BookmarkIndex should index the URL of bookmarks | |
243 // (not only the titles) and search for / mark matches in the URLs, | |
244 // and BookmarkProvider should score bookmarks based on both the | |
245 // matches in bookmark title and URL. Returns false if the bookmarks | |
246 // index URLs experiment isn't active. | |
247 static bool BookmarksIndexURLsValue(); | |
248 | |
249 // --------------------------------------------------------- | |
250 // For the DisableInlining experiment that's part of the bundled omnibox | 239 // For the DisableInlining experiment that's part of the bundled omnibox |
251 // field trial. | 240 // field trial. |
252 | 241 |
253 // Returns true if AutocompleteResult should prevent any suggestion with | 242 // Returns true if AutocompleteResult should prevent any suggestion with |
254 // a non-empty |inline_autocomplete| from being the default match. In | 243 // a non-empty |inline_autocomplete| from being the default match. In |
255 // other words, prevent an inline autocompletion from appearing as the | 244 // other words, prevent an inline autocompletion from appearing as the |
256 // top suggestion / within the omnibox itself, reordering matches as | 245 // top suggestion / within the omnibox itself, reordering matches as |
257 // necessary to make this true. Returns false if the experiment isn't | 246 // necessary to make this true. Returns false if the experiment isn't |
258 // active. | 247 // active. |
259 static bool DisableInlining(); | 248 static bool DisableInlining(); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 // Rule names used by the bundled experiment. | 286 // Rule names used by the bundled experiment. |
298 static const char kShortcutsScoringMaxRelevanceRule[]; | 287 static const char kShortcutsScoringMaxRelevanceRule[]; |
299 static const char kSearchHistoryRule[]; | 288 static const char kSearchHistoryRule[]; |
300 static const char kDemoteByTypeRule[]; | 289 static const char kDemoteByTypeRule[]; |
301 static const char kHQPBookmarkValueRule[]; | 290 static const char kHQPBookmarkValueRule[]; |
302 static const char kHQPDiscountFrecencyWhenFewVisitsRule[]; | 291 static const char kHQPDiscountFrecencyWhenFewVisitsRule[]; |
303 static const char kHQPAllowMatchInTLDRule[]; | 292 static const char kHQPAllowMatchInTLDRule[]; |
304 static const char kHQPAllowMatchInSchemeRule[]; | 293 static const char kHQPAllowMatchInSchemeRule[]; |
305 static const char kZeroSuggestRule[]; | 294 static const char kZeroSuggestRule[]; |
306 static const char kZeroSuggestVariantRule[]; | 295 static const char kZeroSuggestVariantRule[]; |
307 static const char kBookmarksIndexURLsRule[]; | |
308 static const char kDisableInliningRule[]; | 296 static const char kDisableInliningRule[]; |
309 static const char kAnswersInSuggestRule[]; | 297 static const char kAnswersInSuggestRule[]; |
310 static const char kAddUWYTMatchEvenIfPromotedURLsRule[]; | 298 static const char kAddUWYTMatchEvenIfPromotedURLsRule[]; |
311 static const char kDisplayHintTextWhenPossibleRule[]; | 299 static const char kDisplayHintTextWhenPossibleRule[]; |
312 | 300 |
313 // Parameter names used by the HUP new scoring experiments. | 301 // Parameter names used by the HUP new scoring experiments. |
314 static const char kHUPNewScoringEnabledParam[]; | 302 static const char kHUPNewScoringEnabledParam[]; |
315 static const char kHUPNewScoringTypedCountRelevanceCapParam[]; | 303 static const char kHUPNewScoringTypedCountRelevanceCapParam[]; |
316 static const char kHUPNewScoringTypedCountHalfLifeTimeParam[]; | 304 static const char kHUPNewScoringTypedCountHalfLifeTimeParam[]; |
317 static const char kHUPNewScoringTypedCountScoreBucketsParam[]; | 305 static const char kHUPNewScoringTypedCountScoreBucketsParam[]; |
(...skipping 20 matching lines...) Expand all Loading... |
338 // prioritize different wildcard contexts, see the implementation. How to | 326 // prioritize different wildcard contexts, see the implementation. How to |
339 // interpret the value is left to the caller; this is rule-dependent. | 327 // interpret the value is left to the caller; this is rule-dependent. |
340 static std::string GetValueForRuleInContext( | 328 static std::string GetValueForRuleInContext( |
341 const std::string& rule, | 329 const std::string& rule, |
342 metrics::OmniboxEventProto::PageClassification page_classification); | 330 metrics::OmniboxEventProto::PageClassification page_classification); |
343 | 331 |
344 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial); | 332 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial); |
345 }; | 333 }; |
346 | 334 |
347 #endif // COMPONENTS_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_ | 335 #endif // COMPONENTS_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_ |
OLD | NEW |