Chromium Code Reviews| 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_BROWSER_OMNIBOX_FIELD_TRIAL_H_ | 5 #ifndef COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_FIELD_TRIAL_H_ |
| 6 #define COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_FIELD_TRIAL_H_ | 6 #define COMPONENTS_OMNIBOX_BROWSER_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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 313 // bundled omnibox field trial. | 313 // bundled omnibox field trial. |
| 314 | 314 |
| 315 // Returns true if HistoryURL provider should prohibit the URL-what-you- | 315 // Returns true if HistoryURL provider should prohibit the URL-what-you- |
| 316 // typed match from being the legal default match for non-URL inputs. | 316 // typed match from being the legal default match for non-URL inputs. |
| 317 // If this behavior is active, some code in AutocompleteInput::Parse() also | 317 // If this behavior is active, some code in AutocompleteInput::Parse() also |
| 318 // gets disabled; this code is unnecessary given the not-allowed-to-be- | 318 // gets disabled; this code is unnecessary given the not-allowed-to-be- |
| 319 // default constraint. Returns false if the experiment isn't active. | 319 // default constraint. Returns false if the experiment isn't active. |
| 320 static bool PreventUWYTDefaultForNonURLInputs(); | 320 static bool PreventUWYTDefaultForNonURLInputs(); |
| 321 | 321 |
| 322 // --------------------------------------------------------- | 322 // --------------------------------------------------------- |
| 323 // For the aggressive keyword matching experiment that's part of the bundled | |
| 324 // omnibox field trial. | |
| 325 | |
| 326 // Return true if KeywordProvider (via TemplateURLService), for auto- | |
|
Peter Kasting
2015/11/09 23:11:14
Nit: Return -> Returns
Mark P
2015/11/11 07:41:00
Done.
| |
| 327 // generated keywords, should consider the registry (e.g., co.uk) an | |
| 328 // important part of the keyword name for matching purposes. Returns true | |
|
Peter Kasting
2015/11/09 23:11:15
Nit: Awkward, how about:
Returns whether the Keyw
Mark P
2015/11/11 07:41:00
This isn't correct. It can match against them eve
| |
| 329 // if the experiment isn't active. | |
| 330 static bool KeywordRequiresRegistry(); | |
| 331 | |
| 332 // Return true if KeywordProvider (via TemplateURLService), for auto- | |
|
Peter Kasting
2015/11/09 23:11:14
Nit: Return -> Returns
Mark P
2015/11/11 07:41:00
Done.
| |
| 333 // generated keywords, should return a keyword if the user starts typing | |
| 334 // the domain name portion, skipping any host before the domain name. | |
| 335 // In other words, returns whether the prefix before the domain name should | |
| 336 // be considered important for matching purposes. Returns true if the | |
|
Peter Kasting
2015/11/09 23:11:14
Nit: Awkward, how about:
For autogenerated keywor
Mark P
2015/11/11 07:41:00
Revised somewhat in the direction you suggested.
| |
| 337 // experiment isn't active. | |
| 338 static bool KeywordRequiresPrefixBeforeDomain(); | |
| 339 | |
| 340 // For the relevance score that KeywordProvider should assign to keywords | |
|
Peter Kasting
2015/11/09 23:11:15
Nit: For -> Returns
Mark P
2015/11/11 07:41:00
Done.
| |
| 341 // with nearly-complete matches, i.e., the user has typed all of the | |
| 342 // important part of the keyword. Returns -1 if the experiment isn't active. | |
| 343 static int KeywordScoreForNearlyCompleteMatch(); | |
| 344 | |
| 345 // --------------------------------------------------------- | |
| 323 // Exposed publicly for the sake of unittests. | 346 // Exposed publicly for the sake of unittests. |
| 324 static const char kBundledExperimentFieldTrialName[]; | 347 static const char kBundledExperimentFieldTrialName[]; |
| 325 // Rule names used by the bundled experiment. | 348 // Rule names used by the bundled experiment. |
| 326 static const char kDisableProvidersRule[]; | 349 static const char kDisableProvidersRule[]; |
| 327 static const char kShortcutsScoringMaxRelevanceRule[]; | 350 static const char kShortcutsScoringMaxRelevanceRule[]; |
| 328 static const char kSearchHistoryRule[]; | 351 static const char kSearchHistoryRule[]; |
| 329 static const char kDemoteByTypeRule[]; | 352 static const char kDemoteByTypeRule[]; |
| 330 static const char kHQPBookmarkValueRule[]; | 353 static const char kHQPBookmarkValueRule[]; |
| 331 static const char kHQPDiscountFrecencyWhenFewVisitsRule[]; | 354 static const char kHQPDiscountFrecencyWhenFewVisitsRule[]; |
| 332 static const char kHQPAllowMatchInTLDRule[]; | 355 static const char kHQPAllowMatchInTLDRule[]; |
| 333 static const char kHQPAllowMatchInSchemeRule[]; | 356 static const char kHQPAllowMatchInSchemeRule[]; |
| 334 static const char kZeroSuggestRule[]; | 357 static const char kZeroSuggestRule[]; |
| 335 static const char kZeroSuggestVariantRule[]; | 358 static const char kZeroSuggestVariantRule[]; |
| 336 static const char kSuggestVariantRule[]; | 359 static const char kSuggestVariantRule[]; |
| 337 static const char kDisableResultsCachingRule[]; | 360 static const char kDisableResultsCachingRule[]; |
| 338 static const char kMeasureSuggestPollingDelayFromLastKeystrokeRule[]; | 361 static const char kMeasureSuggestPollingDelayFromLastKeystrokeRule[]; |
| 339 static const char kSuggestPollingDelayMsRule[]; | 362 static const char kSuggestPollingDelayMsRule[]; |
| 340 static const char kHQPFixFrequencyScoringBugsRule[]; | 363 static const char kHQPFixFrequencyScoringBugsRule[]; |
| 341 static const char kHQPNumTitleWordsRule[]; | 364 static const char kHQPNumTitleWordsRule[]; |
| 342 static const char kHQPAlsoDoHUPLikeScoringRule[]; | 365 static const char kHQPAlsoDoHUPLikeScoringRule[]; |
| 343 static const char kPreventUWYTDefaultForNonURLInputsRule[]; | 366 static const char kPreventUWYTDefaultForNonURLInputsRule[]; |
| 367 static const char kKeywordRequiresRegistryRule[]; | |
| 368 static const char kKeywordRequiresPrefixBeforeDomainRule[]; | |
| 369 static const char kKeywordScoreForNearlyCompleteMatchRule[]; | |
| 344 | 370 |
| 345 // Parameter names used by the HUP new scoring experiments. | 371 // Parameter names used by the HUP new scoring experiments. |
| 346 static const char kHUPNewScoringEnabledParam[]; | 372 static const char kHUPNewScoringEnabledParam[]; |
| 347 static const char kHUPNewScoringTypedCountRelevanceCapParam[]; | 373 static const char kHUPNewScoringTypedCountRelevanceCapParam[]; |
| 348 static const char kHUPNewScoringTypedCountHalfLifeTimeParam[]; | 374 static const char kHUPNewScoringTypedCountHalfLifeTimeParam[]; |
| 349 static const char kHUPNewScoringTypedCountScoreBucketsParam[]; | 375 static const char kHUPNewScoringTypedCountScoreBucketsParam[]; |
| 350 static const char kHUPNewScoringTypedCountUseDecayFactorParam[]; | 376 static const char kHUPNewScoringTypedCountUseDecayFactorParam[]; |
| 351 static const char kHUPNewScoringVisitedCountRelevanceCapParam[]; | 377 static const char kHUPNewScoringVisitedCountRelevanceCapParam[]; |
| 352 static const char kHUPNewScoringVisitedCountHalfLifeTimeParam[]; | 378 static const char kHUPNewScoringVisitedCountHalfLifeTimeParam[]; |
| 353 static const char kHUPNewScoringVisitedCountScoreBucketsParam[]; | 379 static const char kHUPNewScoringVisitedCountScoreBucketsParam[]; |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 382 // prioritize different wildcard contexts, see the implementation. How to | 408 // prioritize different wildcard contexts, see the implementation. How to |
| 383 // interpret the value is left to the caller; this is rule-dependent. | 409 // interpret the value is left to the caller; this is rule-dependent. |
| 384 static std::string GetValueForRuleInContext( | 410 static std::string GetValueForRuleInContext( |
| 385 const std::string& rule, | 411 const std::string& rule, |
| 386 metrics::OmniboxEventProto::PageClassification page_classification); | 412 metrics::OmniboxEventProto::PageClassification page_classification); |
| 387 | 413 |
| 388 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial); | 414 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial); |
| 389 }; | 415 }; |
| 390 | 416 |
| 391 #endif // COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_FIELD_TRIAL_H_ | 417 #endif // COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_FIELD_TRIAL_H_ |
| OLD | NEW |