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 14 matching lines...) Expand all Loading... | |
| 25 namespace omnibox { | 25 namespace omnibox { |
| 26 | 26 |
| 27 extern const base::Feature kNewOmniboxAnswerTypes; | 27 extern const base::Feature kNewOmniboxAnswerTypes; |
| 28 extern const base::Feature kOmniboxEntitySuggestions; | 28 extern const base::Feature kOmniboxEntitySuggestions; |
| 29 extern const base::Feature kEnableClipboardProvider; | 29 extern const base::Feature kEnableClipboardProvider; |
| 30 extern const base::Feature kSearchProviderWarmUpOnFocus; | 30 extern const base::Feature kSearchProviderWarmUpOnFocus; |
| 31 extern const base::Feature kSearchProviderContextAllowHttpsUrls; | 31 extern const base::Feature kSearchProviderContextAllowHttpsUrls; |
| 32 extern const base::Feature kZeroSuggestRedirectToChrome; | 32 extern const base::Feature kZeroSuggestRedirectToChrome; |
| 33 extern const base::Feature kZeroSuggestSwapTitleAndUrl; | 33 extern const base::Feature kZeroSuggestSwapTitleAndUrl; |
| 34 extern const base::Feature kDisplayTitleForCurrentUrl; | 34 extern const base::Feature kDisplayTitleForCurrentUrl; |
| 35 extern const base::Feature kUIExperiments; | |
|
Mark P
2017/05/03 18:38:59
Double-check:
Please make sure that if we make thi
tommycli
2017/05/03 18:49:46
Done. I just tested this (one Feature, multiple ab
| |
| 35 } | 36 } |
| 36 | 37 |
| 37 // The set of parameters customizing the HUP scoring. | 38 // The set of parameters customizing the HUP scoring. |
| 38 struct HUPScoringParams { | 39 struct HUPScoringParams { |
| 39 // A set of parameters describing how to cap a given count score. First, | 40 // A set of parameters describing how to cap a given count score. First, |
| 40 // we apply a half-life based decay of the given count and then find the | 41 // we apply a half-life based decay of the given count and then find the |
| 41 // maximum relevance score based on the decay factor or counts specified | 42 // maximum relevance score based on the decay factor or counts specified |
| 42 // in the corresponding bucket list. See comment on |buckets_| for details. | 43 // in the corresponding bucket list. See comment on |buckets_| for details. |
| 43 class ScoreBuckets { | 44 class ScoreBuckets { |
| 44 public: | 45 public: |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 488 | 489 |
| 489 // Parameter names used by the Physical Web experimental scoring experiments. | 490 // Parameter names used by the Physical Web experimental scoring experiments. |
| 490 static const char kPhysicalWebZeroSuggestBaseRelevanceParam[]; | 491 static const char kPhysicalWebZeroSuggestBaseRelevanceParam[]; |
| 491 static const char kPhysicalWebAfterTypingBaseRelevanceParam[]; | 492 static const char kPhysicalWebAfterTypingBaseRelevanceParam[]; |
| 492 | 493 |
| 493 // Parameter names used by the experiment redirecting Zero Suggestion requests | 494 // Parameter names used by the experiment redirecting Zero Suggestion requests |
| 494 // to a service provided by the Chrome team. | 495 // to a service provided by the Chrome team. |
| 495 static const char kZeroSuggestRedirectToChromeServerAddressParam[]; | 496 static const char kZeroSuggestRedirectToChromeServerAddressParam[]; |
| 496 static const char kZeroSuggestRedirectToChromeAdditionalFieldsParam[]; | 497 static const char kZeroSuggestRedirectToChromeAdditionalFieldsParam[]; |
| 497 | 498 |
| 499 // Parameter names used by UI experiments. | |
| 500 static const char kUIExperimentsVerticalMarginParam[]; | |
| 501 | |
| 498 // The amount of time to wait before sending a new suggest request after the | 502 // The amount of time to wait before sending a new suggest request after the |
| 499 // previous one unless overridden by a field trial parameter. | 503 // previous one unless overridden by a field trial parameter. |
| 500 // Non-const because some unittests modify this value. | 504 // Non-const because some unittests modify this value. |
| 501 static int kDefaultMinimumTimeBetweenSuggestQueriesMs; | 505 static int kDefaultMinimumTimeBetweenSuggestQueriesMs; |
| 502 | 506 |
| 503 private: | 507 private: |
| 504 friend class OmniboxFieldTrialTest; | 508 friend class OmniboxFieldTrialTest; |
| 505 | 509 |
| 506 // The bundled omnibox experiment comes with a set of parameters | 510 // The bundled omnibox experiment comes with a set of parameters |
| 507 // (key-value pairs). Each key indicates a certain rule that applies in | 511 // (key-value pairs). Each key indicates a certain rule that applies in |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 519 // prioritize different wildcard contexts, see the implementation. How to | 523 // prioritize different wildcard contexts, see the implementation. How to |
| 520 // interpret the value is left to the caller; this is rule-dependent. | 524 // interpret the value is left to the caller; this is rule-dependent. |
| 521 static std::string GetValueForRuleInContext( | 525 static std::string GetValueForRuleInContext( |
| 522 const std::string& rule, | 526 const std::string& rule, |
| 523 metrics::OmniboxEventProto::PageClassification page_classification); | 527 metrics::OmniboxEventProto::PageClassification page_classification); |
| 524 | 528 |
| 525 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial); | 529 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial); |
| 526 }; | 530 }; |
| 527 | 531 |
| 528 #endif // COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_FIELD_TRIAL_H_ | 532 #endif // COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_FIELD_TRIAL_H_ |
| OLD | NEW |