| 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 kUIExperimentMaxAutocompleteMatches; |
| 35 extern const base::Feature kUIExperimentVerticalMargin; | 36 extern const base::Feature kUIExperimentVerticalMargin; |
| 36 } | 37 } |
| 37 | 38 |
| 38 // The set of parameters customizing the HUP scoring. | 39 // The set of parameters customizing the HUP scoring. |
| 39 struct HUPScoringParams { | 40 struct HUPScoringParams { |
| 40 // A set of parameters describing how to cap a given count score. First, | 41 // A set of parameters describing how to cap a given count score. First, |
| 41 // we apply a half-life based decay of the given count and then find the | 42 // we apply a half-life based decay of the given count and then find the |
| 42 // maximum relevance score based on the decay factor or counts specified | 43 // maximum relevance score based on the decay factor or counts specified |
| 43 // in the corresponding bucket list. See comment on |buckets_| for details. | 44 // in the corresponding bucket list. See comment on |buckets_| for details. |
| 44 class ScoreBuckets { | 45 class ScoreBuckets { |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 // Parameter names used by the Physical Web experimental scoring experiments. | 505 // Parameter names used by the Physical Web experimental scoring experiments. |
| 505 static const char kPhysicalWebZeroSuggestBaseRelevanceParam[]; | 506 static const char kPhysicalWebZeroSuggestBaseRelevanceParam[]; |
| 506 static const char kPhysicalWebAfterTypingBaseRelevanceParam[]; | 507 static const char kPhysicalWebAfterTypingBaseRelevanceParam[]; |
| 507 | 508 |
| 508 // Parameter names used by the experiment redirecting Zero Suggestion requests | 509 // Parameter names used by the experiment redirecting Zero Suggestion requests |
| 509 // to a service provided by the Chrome team. | 510 // to a service provided by the Chrome team. |
| 510 static const char kZeroSuggestRedirectToChromeServerAddressParam[]; | 511 static const char kZeroSuggestRedirectToChromeServerAddressParam[]; |
| 511 static const char kZeroSuggestRedirectToChromeAdditionalFieldsParam[]; | 512 static const char kZeroSuggestRedirectToChromeAdditionalFieldsParam[]; |
| 512 | 513 |
| 513 // Parameter names used by UI experiments. | 514 // Parameter names used by UI experiments. |
| 515 static const char kUIMaxAutocompleteMatchesParam[]; |
| 514 static const char kUIVerticalMarginParam[]; | 516 static const char kUIVerticalMarginParam[]; |
| 515 | 517 |
| 516 // The amount of time to wait before sending a new suggest request after the | 518 // The amount of time to wait before sending a new suggest request after the |
| 517 // previous one unless overridden by a field trial parameter. | 519 // previous one unless overridden by a field trial parameter. |
| 518 // Non-const because some unittests modify this value. | 520 // Non-const because some unittests modify this value. |
| 519 static int kDefaultMinimumTimeBetweenSuggestQueriesMs; | 521 static int kDefaultMinimumTimeBetweenSuggestQueriesMs; |
| 520 | 522 |
| 521 private: | 523 private: |
| 522 friend class OmniboxFieldTrialTest; | 524 friend class OmniboxFieldTrialTest; |
| 523 | 525 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 537 // prioritize different wildcard contexts, see the implementation. How to | 539 // prioritize different wildcard contexts, see the implementation. How to |
| 538 // interpret the value is left to the caller; this is rule-dependent. | 540 // interpret the value is left to the caller; this is rule-dependent. |
| 539 static std::string GetValueForRuleInContext( | 541 static std::string GetValueForRuleInContext( |
| 540 const std::string& rule, | 542 const std::string& rule, |
| 541 metrics::OmniboxEventProto::PageClassification page_classification); | 543 metrics::OmniboxEventProto::PageClassification page_classification); |
| 542 | 544 |
| 543 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial); | 545 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial); |
| 544 }; | 546 }; |
| 545 | 547 |
| 546 #endif // COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_FIELD_TRIAL_H_ | 548 #endif // COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_FIELD_TRIAL_H_ |
| OLD | NEW |