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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 296 // are stored in string form giving mapping from (topicality_score, | 296 // are stored in string form giving mapping from (topicality_score, |
| 297 // frequency_score) to final relevance score. Please see GetRelevancyScore() | 297 // frequency_score) to final relevance score. Please see GetRelevancyScore() |
| 298 // under chrome/browser/history::ScoredHistoryMatch for details. | 298 // under chrome/browser/history::ScoredHistoryMatch for details. |
| 299 static std::string HQPExperimentalScoringBuckets(); | 299 static std::string HQPExperimentalScoringBuckets(); |
| 300 | 300 |
| 301 // Returns the topicality threshold for HQP experiments. Returns a default | 301 // Returns the topicality threshold for HQP experiments. Returns a default |
| 302 // value of 0.8 if no threshold is specified in the field trial. | 302 // value of 0.8 if no threshold is specified in the field trial. |
| 303 static float HQPExperimentalTopicalityThreshold(); | 303 static float HQPExperimentalTopicalityThreshold(); |
| 304 | 304 |
| 305 // --------------------------------------------------------- | 305 // --------------------------------------------------------- |
| 306 // For experitment to limit HQP url indexing that's part of the bundled | |
|
Mark P
2017/05/10 17:23:09
nit: typo (experitment)
ssid
2017/05/10 19:47:58
Done.
| |
| 307 // omnibox field trial. | |
| 308 | |
| 309 // Returns the maximum number of history urls to index for HQP at the startup. | |
| 310 // Note: this limit is only applied at startup and more urls can be indexed | |
| 311 // during the session. Returns -1 if limit is not set by trials. | |
| 312 static int MaxNumHQPUrlsIndexedAtStartup(); | |
| 313 | |
| 314 // --------------------------------------------------------- | |
| 306 // For the HQPFixFrequencyScoring experiment that's part of the | 315 // For the HQPFixFrequencyScoring experiment that's part of the |
| 307 // bundled omnibox field trial. | 316 // bundled omnibox field trial. |
| 308 | 317 |
| 309 // Returns true if HQP should apply the bug fix to discount the visits to | 318 // Returns true if HQP should apply the bug fix to discount the visits to |
| 310 // pages visited less than ten times. | 319 // pages visited less than ten times. |
| 311 static bool HQPFixFewVisitsBug(); | 320 static bool HQPFixFewVisitsBug(); |
| 312 | 321 |
| 313 // Returns true if HQP should use the weighted sum when computing frequency | 322 // Returns true if HQP should use the weighted sum when computing frequency |
| 314 // scores. False means to use the weighted average. Returns false if the | 323 // scores. False means to use the weighted average. Returns false if the |
| 315 // experiment isn't active. | 324 // experiment isn't active. |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 482 static const char kHUPNewScoringVisitedCountUseDecayFactorParam[]; | 491 static const char kHUPNewScoringVisitedCountUseDecayFactorParam[]; |
| 483 | 492 |
| 484 // Parameter names used by the HQP experimental scoring experiments. | 493 // Parameter names used by the HQP experimental scoring experiments. |
| 485 static const char kHQPExperimentalScoringBucketsParam[]; | 494 static const char kHQPExperimentalScoringBucketsParam[]; |
| 486 static const char kHQPExperimentalScoringTopicalityThresholdParam[]; | 495 static const char kHQPExperimentalScoringTopicalityThresholdParam[]; |
| 487 | 496 |
| 488 // Parameter names used by the Physical Web experimental scoring experiments. | 497 // Parameter names used by the Physical Web experimental scoring experiments. |
| 489 static const char kPhysicalWebZeroSuggestBaseRelevanceParam[]; | 498 static const char kPhysicalWebZeroSuggestBaseRelevanceParam[]; |
| 490 static const char kPhysicalWebAfterTypingBaseRelevanceParam[]; | 499 static const char kPhysicalWebAfterTypingBaseRelevanceParam[]; |
| 491 | 500 |
| 501 // Parameter name used by the experiment that limits the number of history | |
| 502 // urls indexed for suggestions. | |
| 503 static const char kMaxNumHQPUrlsIndexedAtStartupParam[]; | |
| 504 | |
| 492 // Parameter names used by the experiment redirecting Zero Suggestion requests | 505 // Parameter names used by the experiment redirecting Zero Suggestion requests |
| 493 // to a service provided by the Chrome team. | 506 // to a service provided by the Chrome team. |
| 494 static const char kZeroSuggestRedirectToChromeServerAddressParam[]; | 507 static const char kZeroSuggestRedirectToChromeServerAddressParam[]; |
| 495 static const char kZeroSuggestRedirectToChromeAdditionalFieldsParam[]; | 508 static const char kZeroSuggestRedirectToChromeAdditionalFieldsParam[]; |
| 496 | 509 |
| 497 // The amount of time to wait before sending a new suggest request after the | 510 // The amount of time to wait before sending a new suggest request after the |
| 498 // previous one unless overridden by a field trial parameter. | 511 // previous one unless overridden by a field trial parameter. |
| 499 // Non-const because some unittests modify this value. | 512 // Non-const because some unittests modify this value. |
| 500 static int kDefaultMinimumTimeBetweenSuggestQueriesMs; | 513 static int kDefaultMinimumTimeBetweenSuggestQueriesMs; |
| 501 | 514 |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 518 // prioritize different wildcard contexts, see the implementation. How to | 531 // prioritize different wildcard contexts, see the implementation. How to |
| 519 // interpret the value is left to the caller; this is rule-dependent. | 532 // interpret the value is left to the caller; this is rule-dependent. |
| 520 static std::string GetValueForRuleInContext( | 533 static std::string GetValueForRuleInContext( |
| 521 const std::string& rule, | 534 const std::string& rule, |
| 522 metrics::OmniboxEventProto::PageClassification page_classification); | 535 metrics::OmniboxEventProto::PageClassification page_classification); |
| 523 | 536 |
| 524 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial); | 537 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial); |
| 525 }; | 538 }; |
| 526 | 539 |
| 527 #endif // COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_FIELD_TRIAL_H_ | 540 #endif // COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_FIELD_TRIAL_H_ |
| OLD | NEW |