| 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 // --------------------------------------------------------- | 292 // --------------------------------------------------------- |
| 293 // For the HQPNumTitleWords experiment that's part of the | 293 // For the HQPNumTitleWords experiment that's part of the |
| 294 // bundled omnibox field trial. | 294 // bundled omnibox field trial. |
| 295 | 295 |
| 296 // Returns the number of title words that are allowed to contribute | 296 // Returns the number of title words that are allowed to contribute |
| 297 // to the topicality score. Words later in the title are ignored. | 297 // to the topicality score. Words later in the title are ignored. |
| 298 // Returns 10 as a default if the experiment isn't active. | 298 // Returns 10 as a default if the experiment isn't active. |
| 299 static size_t HQPNumTitleWordsToAllow(); | 299 static size_t HQPNumTitleWordsToAllow(); |
| 300 | 300 |
| 301 // --------------------------------------------------------- | 301 // --------------------------------------------------------- |
| 302 // For the HQPAlsoDoHUPLikeScoring experiment that's part of the | 302 // For the replace HUP experiment that's part of the bundled omnibox field |
| 303 // bundled omnibox field trial. | 303 // trial. |
| 304 | 304 |
| 305 // Returns whether HistoryQuick provider (HQP) should attempt to score | 305 // Returns whether HistoryQuick provider (HQP) should attempt to score |
| 306 // suggestions also with a HistoryURL-provider-like (HUP-like) mode, and | 306 // suggestions also with a HistoryURL-provider-like (HUP-like) mode, and |
| 307 // assign suggestions the max of this score and the normal score. | 307 // assign suggestions the max of this score and the normal score. |
| 308 // Returns false if the experiment isn't active. | 308 // Returns false if the experiment isn't active. |
| 309 static bool HQPAlsoDoHUPLikeScoring(); | 309 static bool HQPAlsoDoHUPLikeScoring(); |
| 310 | 310 |
| 311 // Returns whether HistoryURL provider (HUP) should search its database for |
| 312 // URLs and suggest them. If false, HistoryURL provider merely creates the |
| 313 // URL-what-you-typed match when appropriate. Return true if the experiment |
| 314 // isn't active. |
| 315 static bool HUPSearchDatabase(); |
| 316 |
| 311 // --------------------------------------------------------- | 317 // --------------------------------------------------------- |
| 312 // For the PreventUWYTDefaultForNonURLInputs experiment that's part of the | 318 // For the PreventUWYTDefaultForNonURLInputs experiment that's part of the |
| 313 // bundled omnibox field trial. | 319 // bundled omnibox field trial. |
| 314 | 320 |
| 315 // Returns true if HistoryURL provider should prohibit the URL-what-you- | 321 // Returns true if HistoryURL provider should prohibit the URL-what-you- |
| 316 // typed match from being the legal default match for non-URL inputs. | 322 // typed match from being the legal default match for non-URL inputs. |
| 317 // If this behavior is active, some code in AutocompleteInput::Parse() also | 323 // If this behavior is active, some code in AutocompleteInput::Parse() also |
| 318 // gets disabled; this code is unnecessary given the not-allowed-to-be- | 324 // gets disabled; this code is unnecessary given the not-allowed-to-be- |
| 319 // default constraint. Returns false if the experiment isn't active. | 325 // default constraint. Returns false if the experiment isn't active. |
| 320 static bool PreventUWYTDefaultForNonURLInputs(); | 326 static bool PreventUWYTDefaultForNonURLInputs(); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 static const char kHQPAllowMatchInSchemeRule[]; | 361 static const char kHQPAllowMatchInSchemeRule[]; |
| 356 static const char kZeroSuggestRule[]; | 362 static const char kZeroSuggestRule[]; |
| 357 static const char kZeroSuggestVariantRule[]; | 363 static const char kZeroSuggestVariantRule[]; |
| 358 static const char kSuggestVariantRule[]; | 364 static const char kSuggestVariantRule[]; |
| 359 static const char kDisableResultsCachingRule[]; | 365 static const char kDisableResultsCachingRule[]; |
| 360 static const char kMeasureSuggestPollingDelayFromLastKeystrokeRule[]; | 366 static const char kMeasureSuggestPollingDelayFromLastKeystrokeRule[]; |
| 361 static const char kSuggestPollingDelayMsRule[]; | 367 static const char kSuggestPollingDelayMsRule[]; |
| 362 static const char kHQPFixFrequencyScoringBugsRule[]; | 368 static const char kHQPFixFrequencyScoringBugsRule[]; |
| 363 static const char kHQPNumTitleWordsRule[]; | 369 static const char kHQPNumTitleWordsRule[]; |
| 364 static const char kHQPAlsoDoHUPLikeScoringRule[]; | 370 static const char kHQPAlsoDoHUPLikeScoringRule[]; |
| 371 static const char kHUPSearchDatabaseRule[]; |
| 365 static const char kPreventUWYTDefaultForNonURLInputsRule[]; | 372 static const char kPreventUWYTDefaultForNonURLInputsRule[]; |
| 366 static const char kKeywordRequiresRegistryRule[]; | 373 static const char kKeywordRequiresRegistryRule[]; |
| 367 static const char kKeywordRequiresPrefixMatchRule[]; | 374 static const char kKeywordRequiresPrefixMatchRule[]; |
| 368 static const char kKeywordScoreForSufficientlyCompleteMatchRule[]; | 375 static const char kKeywordScoreForSufficientlyCompleteMatchRule[]; |
| 369 | 376 |
| 370 // Parameter names used by the HUP new scoring experiments. | 377 // Parameter names used by the HUP new scoring experiments. |
| 371 static const char kHUPNewScoringEnabledParam[]; | 378 static const char kHUPNewScoringEnabledParam[]; |
| 372 static const char kHUPNewScoringTypedCountRelevanceCapParam[]; | 379 static const char kHUPNewScoringTypedCountRelevanceCapParam[]; |
| 373 static const char kHUPNewScoringTypedCountHalfLifeTimeParam[]; | 380 static const char kHUPNewScoringTypedCountHalfLifeTimeParam[]; |
| 374 static const char kHUPNewScoringTypedCountScoreBucketsParam[]; | 381 static const char kHUPNewScoringTypedCountScoreBucketsParam[]; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 // prioritize different wildcard contexts, see the implementation. How to | 414 // prioritize different wildcard contexts, see the implementation. How to |
| 408 // interpret the value is left to the caller; this is rule-dependent. | 415 // interpret the value is left to the caller; this is rule-dependent. |
| 409 static std::string GetValueForRuleInContext( | 416 static std::string GetValueForRuleInContext( |
| 410 const std::string& rule, | 417 const std::string& rule, |
| 411 metrics::OmniboxEventProto::PageClassification page_classification); | 418 metrics::OmniboxEventProto::PageClassification page_classification); |
| 412 | 419 |
| 413 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial); | 420 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial); |
| 414 }; | 421 }; |
| 415 | 422 |
| 416 #endif // COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_FIELD_TRIAL_H_ | 423 #endif // COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_FIELD_TRIAL_H_ |
| OLD | NEW |