Chromium Code Reviews| 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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 303 // (if valid and reasonable) even if the provider has good inline | 303 // (if valid and reasonable) even if the provider has good inline |
| 304 // autocompletions to offer. Normally HistoryURL does not add the UWYT match | 304 // autocompletions to offer. Normally HistoryURL does not add the UWYT match |
| 305 // if there are good inline autocompletions, as the user could simply hit | 305 // if there are good inline autocompletions, as the user could simply hit |
| 306 // backspace to delete the completion and get the what-you-typed match. | 306 // backspace to delete the completion and get the what-you-typed match. |
| 307 // However, for the disabling inlining experiment we want to have the UWYT | 307 // However, for the disabling inlining experiment we want to have the UWYT |
| 308 // always explicitly displayed at an option if possible. Returns false if | 308 // always explicitly displayed at an option if possible. Returns false if |
| 309 // the experiment isn't active. | 309 // the experiment isn't active. |
| 310 static bool AddUWYTMatchEvenIfPromotedURLs(); | 310 static bool AddUWYTMatchEvenIfPromotedURLs(); |
| 311 | 311 |
| 312 // --------------------------------------------------------- | 312 // --------------------------------------------------------- |
| 313 // For the DisplayHintTextWhenPossible experiment that's part of the | |
| 314 // bundled omnibox field trial. | |
| 315 | |
| 316 // Returns true of the omnibox should display hint text (Search | |
|
Peter Kasting
2014/07/09 01:14:41
Nit: of -> if
(I passed your secret test to see i
Mark P
2014/07/09 19:22:16
Done.
| |
| 317 // <search engine> or type URL) when possible (i.e., the omnibox | |
| 318 // is otherwise non-empty). | |
| 319 static bool DisplayHintTextWhenPossible(); | |
| 320 | |
| 321 // --------------------------------------------------------- | |
| 313 // Exposed publicly for the sake of unittests. | 322 // Exposed publicly for the sake of unittests. |
| 314 static const char kBundledExperimentFieldTrialName[]; | 323 static const char kBundledExperimentFieldTrialName[]; |
| 315 // Rule names used by the bundled experiment. | 324 // Rule names used by the bundled experiment. |
| 316 static const char kShortcutsScoringMaxRelevanceRule[]; | 325 static const char kShortcutsScoringMaxRelevanceRule[]; |
| 317 static const char kSearchHistoryRule[]; | 326 static const char kSearchHistoryRule[]; |
| 318 static const char kDemoteByTypeRule[]; | 327 static const char kDemoteByTypeRule[]; |
| 319 static const char kHQPBookmarkValueRule[]; | 328 static const char kHQPBookmarkValueRule[]; |
| 320 static const char kHQPDiscountFrecencyWhenFewVisitsRule[]; | 329 static const char kHQPDiscountFrecencyWhenFewVisitsRule[]; |
| 321 static const char kHQPAllowMatchInTLDRule[]; | 330 static const char kHQPAllowMatchInTLDRule[]; |
| 322 static const char kHQPAllowMatchInSchemeRule[]; | 331 static const char kHQPAllowMatchInSchemeRule[]; |
| 323 static const char kZeroSuggestRule[]; | 332 static const char kZeroSuggestRule[]; |
| 324 static const char kZeroSuggestVariantRule[]; | 333 static const char kZeroSuggestVariantRule[]; |
| 325 static const char kBookmarksIndexURLsRule[]; | 334 static const char kBookmarksIndexURLsRule[]; |
| 326 static const char kDisableInliningRule[]; | 335 static const char kDisableInliningRule[]; |
| 327 static const char kAnswersInSuggestRule[]; | 336 static const char kAnswersInSuggestRule[]; |
| 328 static const char kAddUWYTMatchEvenIfPromotedURLsRule[]; | 337 static const char kAddUWYTMatchEvenIfPromotedURLsRule[]; |
| 338 static const char kDisplayHintTextWhenPossibleRule[]; | |
| 329 | 339 |
| 330 // Parameter names used by the HUP new scoring experiments. | 340 // Parameter names used by the HUP new scoring experiments. |
| 331 static const char kHUPNewScoringEnabledParam[]; | 341 static const char kHUPNewScoringEnabledParam[]; |
| 332 static const char kHUPNewScoringTypedCountRelevanceCapParam[]; | 342 static const char kHUPNewScoringTypedCountRelevanceCapParam[]; |
| 333 static const char kHUPNewScoringTypedCountHalfLifeTimeParam[]; | 343 static const char kHUPNewScoringTypedCountHalfLifeTimeParam[]; |
| 334 static const char kHUPNewScoringTypedCountScoreBucketsParam[]; | 344 static const char kHUPNewScoringTypedCountScoreBucketsParam[]; |
| 335 static const char kHUPNewScoringVisitedCountRelevanceCapParam[]; | 345 static const char kHUPNewScoringVisitedCountRelevanceCapParam[]; |
| 336 static const char kHUPNewScoringVisitedCountHalfLifeTimeParam[]; | 346 static const char kHUPNewScoringVisitedCountHalfLifeTimeParam[]; |
| 337 static const char kHUPNewScoringVisitedCountScoreBucketsParam[]; | 347 static const char kHUPNewScoringVisitedCountScoreBucketsParam[]; |
| 338 | 348 |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 355 // prioritize different wildcard contexts, see the implementation. How to | 365 // prioritize different wildcard contexts, see the implementation. How to |
| 356 // interpret the value is left to the caller; this is rule-dependent. | 366 // interpret the value is left to the caller; this is rule-dependent. |
| 357 static std::string GetValueForRuleInContext( | 367 static std::string GetValueForRuleInContext( |
| 358 const std::string& rule, | 368 const std::string& rule, |
| 359 metrics::OmniboxEventProto::PageClassification page_classification); | 369 metrics::OmniboxEventProto::PageClassification page_classification); |
| 360 | 370 |
| 361 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial); | 371 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial); |
| 362 }; | 372 }; |
| 363 | 373 |
| 364 #endif // CHROME_BROWSER_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_ | 374 #endif // CHROME_BROWSER_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_ |
| OLD | NEW |