| 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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 // --------------------------------------------------------- | 233 // --------------------------------------------------------- |
| 234 // For the HQPAllowMatchInScheme experiment that's part of the | 234 // For the HQPAllowMatchInScheme experiment that's part of the |
| 235 // bundled omnibox field trial. | 235 // bundled omnibox field trial. |
| 236 | 236 |
| 237 // Returns true if HQP should allow an input term to match in the | 237 // Returns true if HQP should allow an input term to match in the |
| 238 // scheme (e.g., http://) of a URL. Returns false if the allow | 238 // scheme (e.g., http://) of a URL. Returns false if the allow |
| 239 // match in scheme experiment isn't active. | 239 // match in scheme experiment isn't active. |
| 240 static bool HQPAllowMatchInSchemeValue(); | 240 static bool HQPAllowMatchInSchemeValue(); |
| 241 | 241 |
| 242 // --------------------------------------------------------- | 242 // --------------------------------------------------------- |
| 243 // For the DisableInlining experiment that's part of the bundled omnibox | |
| 244 // field trial. | |
| 245 | |
| 246 // Returns true if AutocompleteResult should prevent any suggestion with | |
| 247 // a non-empty |inline_autocomplete| from being the default match. In | |
| 248 // other words, prevent an inline autocompletion from appearing as the | |
| 249 // top suggestion / within the omnibox itself, reordering matches as | |
| 250 // necessary to make this true. Returns false if the experiment isn't | |
| 251 // active. | |
| 252 static bool DisableInlining(); | |
| 253 | |
| 254 // --------------------------------------------------------- | |
| 255 // For the AnswersInSuggest experiment that's part of the bundled omnibox | 243 // For the AnswersInSuggest experiment that's part of the bundled omnibox |
| 256 // field trial. | 244 // field trial. |
| 257 | 245 |
| 258 // Returns true if the AnswersInSuggest feature should be enabled causing | 246 // Returns true if the AnswersInSuggest feature should be enabled causing |
| 259 // query responses such as current weather conditions or stock quotes | 247 // query responses such as current weather conditions or stock quotes |
| 260 // to be provided in the Omnibox suggestion list. Considers both the | 248 // to be provided in the Omnibox suggestion list. Considers both the |
| 261 // field trial state as well as the overriding command-line flags. | 249 // field trial state as well as the overriding command-line flags. |
| 262 static bool EnableAnswersInSuggest(); | 250 static bool EnableAnswersInSuggest(); |
| 263 | 251 |
| 264 // --------------------------------------------------------- | 252 // --------------------------------------------------------- |
| 265 // For the AddUWYTMatchEvenIfPromotedURLs experiment that's part of the | |
| 266 // bundled omnibox field trial. | |
| 267 | |
| 268 // Returns true if HistoryURL Provider should add the URL-what-you-typed match | |
| 269 // (if valid and reasonable) even if the provider has good inline | |
| 270 // autocompletions to offer. Normally HistoryURL does not add the UWYT match | |
| 271 // if there are good inline autocompletions, as the user could simply hit | |
| 272 // backspace to delete the completion and get the what-you-typed match. | |
| 273 // However, for the disabling inlining experiment we want to have the UWYT | |
| 274 // always explicitly displayed at an option if possible. Returns false if | |
| 275 // the experiment isn't active. | |
| 276 static bool AddUWYTMatchEvenIfPromotedURLs(); | |
| 277 | |
| 278 // --------------------------------------------------------- | |
| 279 // For the DisplayHintTextWhenPossible experiment that's part of the | 253 // For the DisplayHintTextWhenPossible experiment that's part of the |
| 280 // bundled omnibox field trial. | 254 // bundled omnibox field trial. |
| 281 | 255 |
| 282 // Returns true if the omnibox should display hint text (Search | 256 // Returns true if the omnibox should display hint text (Search |
| 283 // <search engine> or type URL) when possible (i.e., the omnibox | 257 // <search engine> or type URL) when possible (i.e., the omnibox |
| 284 // is otherwise non-empty). | 258 // is otherwise non-empty). |
| 285 static bool DisplayHintTextWhenPossible(); | 259 static bool DisplayHintTextWhenPossible(); |
| 286 | 260 |
| 287 // --------------------------------------------------------- | 261 // --------------------------------------------------------- |
| 288 // For SearchProvider related experiments. | 262 // For SearchProvider related experiments. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 302 static const char kDisableProvidersRule[]; | 276 static const char kDisableProvidersRule[]; |
| 303 static const char kShortcutsScoringMaxRelevanceRule[]; | 277 static const char kShortcutsScoringMaxRelevanceRule[]; |
| 304 static const char kSearchHistoryRule[]; | 278 static const char kSearchHistoryRule[]; |
| 305 static const char kDemoteByTypeRule[]; | 279 static const char kDemoteByTypeRule[]; |
| 306 static const char kHQPBookmarkValueRule[]; | 280 static const char kHQPBookmarkValueRule[]; |
| 307 static const char kHQPDiscountFrecencyWhenFewVisitsRule[]; | 281 static const char kHQPDiscountFrecencyWhenFewVisitsRule[]; |
| 308 static const char kHQPAllowMatchInTLDRule[]; | 282 static const char kHQPAllowMatchInTLDRule[]; |
| 309 static const char kHQPAllowMatchInSchemeRule[]; | 283 static const char kHQPAllowMatchInSchemeRule[]; |
| 310 static const char kZeroSuggestRule[]; | 284 static const char kZeroSuggestRule[]; |
| 311 static const char kZeroSuggestVariantRule[]; | 285 static const char kZeroSuggestVariantRule[]; |
| 312 static const char kDisableInliningRule[]; | |
| 313 static const char kAnswersInSuggestRule[]; | 286 static const char kAnswersInSuggestRule[]; |
| 314 static const char kAddUWYTMatchEvenIfPromotedURLsRule[]; | |
| 315 static const char kDisplayHintTextWhenPossibleRule[]; | 287 static const char kDisplayHintTextWhenPossibleRule[]; |
| 316 static const char kDisableResultsCachingRule[]; | 288 static const char kDisableResultsCachingRule[]; |
| 317 static const char kMeasureSuggestPollingDelayFromLastKeystrokeRule[]; | 289 static const char kMeasureSuggestPollingDelayFromLastKeystrokeRule[]; |
| 318 static const char kSuggestPollingDelayMsRule[]; | 290 static const char kSuggestPollingDelayMsRule[]; |
| 319 | 291 |
| 320 // Parameter names used by the HUP new scoring experiments. | 292 // Parameter names used by the HUP new scoring experiments. |
| 321 static const char kHUPNewScoringEnabledParam[]; | 293 static const char kHUPNewScoringEnabledParam[]; |
| 322 static const char kHUPNewScoringTypedCountRelevanceCapParam[]; | 294 static const char kHUPNewScoringTypedCountRelevanceCapParam[]; |
| 323 static const char kHUPNewScoringTypedCountHalfLifeTimeParam[]; | 295 static const char kHUPNewScoringTypedCountHalfLifeTimeParam[]; |
| 324 static const char kHUPNewScoringTypedCountScoreBucketsParam[]; | 296 static const char kHUPNewScoringTypedCountScoreBucketsParam[]; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 350 // prioritize different wildcard contexts, see the implementation. How to | 322 // prioritize different wildcard contexts, see the implementation. How to |
| 351 // interpret the value is left to the caller; this is rule-dependent. | 323 // interpret the value is left to the caller; this is rule-dependent. |
| 352 static std::string GetValueForRuleInContext( | 324 static std::string GetValueForRuleInContext( |
| 353 const std::string& rule, | 325 const std::string& rule, |
| 354 metrics::OmniboxEventProto::PageClassification page_classification); | 326 metrics::OmniboxEventProto::PageClassification page_classification); |
| 355 | 327 |
| 356 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial); | 328 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial); |
| 357 }; | 329 }; |
| 358 | 330 |
| 359 #endif // COMPONENTS_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_ | 331 #endif // COMPONENTS_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_ |
| OLD | NEW |