| 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_OMNIBOX_FIELD_TRIAL_H_ | 5 #ifndef COMPONENTS_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_ |
| 6 #define COMPONENTS_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_ | 6 #define COMPONENTS_OMNIBOX_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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 // For the AnswersInSuggest experiment that's part of the bundled omnibox | 243 // For the AnswersInSuggest experiment that's part of the bundled omnibox |
| 244 // field trial. | 244 // field trial. |
| 245 | 245 |
| 246 // Returns true if the AnswersInSuggest feature should be enabled causing | 246 // Returns true if the AnswersInSuggest feature should be enabled causing |
| 247 // query responses such as current weather conditions or stock quotes | 247 // query responses such as current weather conditions or stock quotes |
| 248 // to be provided in the Omnibox suggestion list. Considers both the | 248 // to be provided in the Omnibox suggestion list. Considers both the |
| 249 // field trial state as well as the overriding command-line flags. | 249 // field trial state as well as the overriding command-line flags. |
| 250 static bool EnableAnswersInSuggest(); | 250 static bool EnableAnswersInSuggest(); |
| 251 | 251 |
| 252 // --------------------------------------------------------- | 252 // --------------------------------------------------------- |
| 253 // For the DisplayHintTextWhenPossible experiment that's part of the | |
| 254 // bundled omnibox field trial. | |
| 255 | |
| 256 // Returns true if the omnibox should display hint text (Search | |
| 257 // <search engine> or type URL) when possible (i.e., the omnibox | |
| 258 // is otherwise non-empty). | |
| 259 static bool DisplayHintTextWhenPossible(); | |
| 260 | |
| 261 // --------------------------------------------------------- | |
| 262 // For SearchProvider related experiments. | 253 // For SearchProvider related experiments. |
| 263 | 254 |
| 264 // Returns true if the search provider should not be caching results. | 255 // Returns true if the search provider should not be caching results. |
| 265 static bool DisableResultsCaching(); | 256 static bool DisableResultsCaching(); |
| 266 | 257 |
| 267 // Returns how the search provider should poll Suggest. Currently, we support | 258 // Returns how the search provider should poll Suggest. Currently, we support |
| 268 // measuring polling delay from the last keystroke or last suggest request. | 259 // measuring polling delay from the last keystroke or last suggest request. |
| 269 static void GetSuggestPollingStrategy(bool* from_last_keystroke, | 260 static void GetSuggestPollingStrategy(bool* from_last_keystroke, |
| 270 int* polling_delay_ms); | 261 int* polling_delay_ms); |
| 271 | 262 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 static const char kShortcutsScoringMaxRelevanceRule[]; | 307 static const char kShortcutsScoringMaxRelevanceRule[]; |
| 317 static const char kSearchHistoryRule[]; | 308 static const char kSearchHistoryRule[]; |
| 318 static const char kDemoteByTypeRule[]; | 309 static const char kDemoteByTypeRule[]; |
| 319 static const char kHQPBookmarkValueRule[]; | 310 static const char kHQPBookmarkValueRule[]; |
| 320 static const char kHQPDiscountFrecencyWhenFewVisitsRule[]; | 311 static const char kHQPDiscountFrecencyWhenFewVisitsRule[]; |
| 321 static const char kHQPAllowMatchInTLDRule[]; | 312 static const char kHQPAllowMatchInTLDRule[]; |
| 322 static const char kHQPAllowMatchInSchemeRule[]; | 313 static const char kHQPAllowMatchInSchemeRule[]; |
| 323 static const char kZeroSuggestRule[]; | 314 static const char kZeroSuggestRule[]; |
| 324 static const char kZeroSuggestVariantRule[]; | 315 static const char kZeroSuggestVariantRule[]; |
| 325 static const char kAnswersInSuggestRule[]; | 316 static const char kAnswersInSuggestRule[]; |
| 326 static const char kDisplayHintTextWhenPossibleRule[]; | |
| 327 static const char kDisableResultsCachingRule[]; | 317 static const char kDisableResultsCachingRule[]; |
| 328 static const char kMeasureSuggestPollingDelayFromLastKeystrokeRule[]; | 318 static const char kMeasureSuggestPollingDelayFromLastKeystrokeRule[]; |
| 329 static const char kSuggestPollingDelayMsRule[]; | 319 static const char kSuggestPollingDelayMsRule[]; |
| 330 static const char kHQPFixFrequencyScoringBugsRule[]; | 320 static const char kHQPFixFrequencyScoringBugsRule[]; |
| 331 static const char kHQPNumTitleWordsRule[]; | 321 static const char kHQPNumTitleWordsRule[]; |
| 332 | 322 |
| 333 // Parameter names used by the HUP new scoring experiments. | 323 // Parameter names used by the HUP new scoring experiments. |
| 334 static const char kHUPNewScoringEnabledParam[]; | 324 static const char kHUPNewScoringEnabledParam[]; |
| 335 static const char kHUPNewScoringTypedCountRelevanceCapParam[]; | 325 static const char kHUPNewScoringTypedCountRelevanceCapParam[]; |
| 336 static const char kHUPNewScoringTypedCountHalfLifeTimeParam[]; | 326 static const char kHUPNewScoringTypedCountHalfLifeTimeParam[]; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 // prioritize different wildcard contexts, see the implementation. How to | 358 // prioritize different wildcard contexts, see the implementation. How to |
| 369 // interpret the value is left to the caller; this is rule-dependent. | 359 // interpret the value is left to the caller; this is rule-dependent. |
| 370 static std::string GetValueForRuleInContext( | 360 static std::string GetValueForRuleInContext( |
| 371 const std::string& rule, | 361 const std::string& rule, |
| 372 metrics::OmniboxEventProto::PageClassification page_classification); | 362 metrics::OmniboxEventProto::PageClassification page_classification); |
| 373 | 363 |
| 374 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial); | 364 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial); |
| 375 }; | 365 }; |
| 376 | 366 |
| 377 #endif // COMPONENTS_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_ | 367 #endif // COMPONENTS_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_ |
| OLD | NEW |