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