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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
285 // For the AnswersInSuggest experiment that's part of the bundled omnibox | 285 // For the AnswersInSuggest experiment that's part of the bundled omnibox |
286 // field trial. | 286 // field trial. |
287 | 287 |
288 // Returns true if the AnswersInSuggest feature should be enabled causing | 288 // Returns true if the AnswersInSuggest feature should be enabled causing |
289 // query responses such as current weather conditions or stock quotes | 289 // query responses such as current weather conditions or stock quotes |
290 // to be provided in the Omnibox suggestion list. Considers both the | 290 // to be provided in the Omnibox suggestion list. Considers both the |
291 // field trial state as well as the overriding command-line flags. | 291 // field trial state as well as the overriding command-line flags. |
292 static bool EnableAnswersInSuggest(); | 292 static bool EnableAnswersInSuggest(); |
293 | 293 |
294 // --------------------------------------------------------- | 294 // --------------------------------------------------------- |
295 // For the AddUWYTMatchEvenIfPromotedURLs experiment that's part of the | |
296 // bundled omnibox field trial. | |
297 | |
298 // Returns true if HistoryURL Provider should add the URL-what-you-typed match | |
299 // (if valid and reasonable) even if the provider has good inline | |
300 // autocompletions to offer. Normally HistoryURL does not add the UWYT match | |
301 // if there are good inline autocompletions, as the user could simply hit | |
302 // backspace to delete the completion and get the what-you-typed match. | |
303 // However, in the disable inlining experiment this interaction is a lot more | |
304 // difficult. The user will have to select a not-inlined suggestion and | |
305 // backspace (possibly a lot) to get back to the what-you-typed match. | |
306 // This mode is intended to alleviate the pain by always ensuring that | |
307 // the UWYT match appears somewhere on the list of suggestions. Returns | |
308 // false if the experiment isn't active. | |
Peter Kasting
2014/06/20 21:12:42
This all sort of confuses me. It makes it sound l
Mark P
2014/06/23 22:23:12
This comment attempts to explain what happens when
| |
309 static bool AddUWYTMatchEvenIfPromotedURLs(); | |
310 | |
311 // --------------------------------------------------------- | |
295 // Exposed publicly for the sake of unittests. | 312 // Exposed publicly for the sake of unittests. |
296 static const char kBundledExperimentFieldTrialName[]; | 313 static const char kBundledExperimentFieldTrialName[]; |
297 // Rule names used by the bundled experiment. | 314 // Rule names used by the bundled experiment. |
298 static const char kShortcutsScoringMaxRelevanceRule[]; | 315 static const char kShortcutsScoringMaxRelevanceRule[]; |
299 static const char kSearchHistoryRule[]; | 316 static const char kSearchHistoryRule[]; |
300 static const char kDemoteByTypeRule[]; | 317 static const char kDemoteByTypeRule[]; |
301 static const char kHQPBookmarkValueRule[]; | 318 static const char kHQPBookmarkValueRule[]; |
302 static const char kHQPDiscountFrecencyWhenFewVisitsRule[]; | 319 static const char kHQPDiscountFrecencyWhenFewVisitsRule[]; |
303 static const char kHQPAllowMatchInTLDRule[]; | 320 static const char kHQPAllowMatchInTLDRule[]; |
304 static const char kHQPAllowMatchInSchemeRule[]; | 321 static const char kHQPAllowMatchInSchemeRule[]; |
305 static const char kZeroSuggestRule[]; | 322 static const char kZeroSuggestRule[]; |
306 static const char kZeroSuggestVariantRule[]; | 323 static const char kZeroSuggestVariantRule[]; |
307 static const char kBookmarksIndexURLsRule[]; | 324 static const char kBookmarksIndexURLsRule[]; |
308 static const char kDisableInliningRule[]; | 325 static const char kDisableInliningRule[]; |
309 static const char kAnswersInSuggestRule[]; | 326 static const char kAnswersInSuggestRule[]; |
327 static const char kAddUWYTMatchEvenIfPromotedURLsRule[]; | |
310 | 328 |
311 // Parameter names used by the HUP new scoring experiments. | 329 // Parameter names used by the HUP new scoring experiments. |
312 static const char kHUPNewScoringEnabledParam[]; | 330 static const char kHUPNewScoringEnabledParam[]; |
313 static const char kHUPNewScoringTypedCountRelevanceCapParam[]; | 331 static const char kHUPNewScoringTypedCountRelevanceCapParam[]; |
314 static const char kHUPNewScoringTypedCountHalfLifeTimeParam[]; | 332 static const char kHUPNewScoringTypedCountHalfLifeTimeParam[]; |
315 static const char kHUPNewScoringTypedCountScoreBucketsParam[]; | 333 static const char kHUPNewScoringTypedCountScoreBucketsParam[]; |
316 static const char kHUPNewScoringVisitedCountRelevanceCapParam[]; | 334 static const char kHUPNewScoringVisitedCountRelevanceCapParam[]; |
317 static const char kHUPNewScoringVisitedCountHalfLifeTimeParam[]; | 335 static const char kHUPNewScoringVisitedCountHalfLifeTimeParam[]; |
318 static const char kHUPNewScoringVisitedCountScoreBucketsParam[]; | 336 static const char kHUPNewScoringVisitedCountScoreBucketsParam[]; |
319 | 337 |
(...skipping 16 matching lines...) Expand all Loading... | |
336 // prioritize different wildcard contexts, see the implementation. How to | 354 // prioritize different wildcard contexts, see the implementation. How to |
337 // interpret the value is left to the caller; this is rule-dependent. | 355 // interpret the value is left to the caller; this is rule-dependent. |
338 static std::string GetValueForRuleInContext( | 356 static std::string GetValueForRuleInContext( |
339 const std::string& rule, | 357 const std::string& rule, |
340 AutocompleteInput::PageClassification page_classification); | 358 AutocompleteInput::PageClassification page_classification); |
341 | 359 |
342 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial); | 360 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial); |
343 }; | 361 }; |
344 | 362 |
345 #endif // CHROME_BROWSER_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_ | 363 #endif // CHROME_BROWSER_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_ |
OLD | NEW |