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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
274 // --------------------------------------------------------- | 274 // --------------------------------------------------------- |
275 // For the DisplayHintTextWhenPossible experiment that's part of the | 275 // For the DisplayHintTextWhenPossible experiment that's part of the |
276 // bundled omnibox field trial. | 276 // bundled omnibox field trial. |
277 | 277 |
278 // Returns true if the omnibox should display hint text (Search | 278 // Returns true if the omnibox should display hint text (Search |
279 // <search engine> or type URL) when possible (i.e., the omnibox | 279 // <search engine> or type URL) when possible (i.e., the omnibox |
280 // is otherwise non-empty). | 280 // is otherwise non-empty). |
281 static bool DisplayHintTextWhenPossible(); | 281 static bool DisplayHintTextWhenPossible(); |
282 | 282 |
283 // --------------------------------------------------------- | 283 // --------------------------------------------------------- |
284 // For Search Provider related experiments. | |
Mark P
2014/10/21 21:28:22
nit: SearchProvider
Bart N.
2014/10/22 01:19:08
Done.
| |
285 | |
286 // Returns true if the search provider should not be caching results. | |
287 static bool DisableResultsCaching(); | |
288 | |
289 // Returns how the search provider should poll Suggest. Currently, we support | |
290 // measuring polling delay since the last keystroke or last suggest request. | |
291 static void GetSuggestPollingStrategy(bool* since_the_last_request, | |
292 int* polling_delay_ms); | |
293 | |
294 // --------------------------------------------------------- | |
284 // Exposed publicly for the sake of unittests. | 295 // Exposed publicly for the sake of unittests. |
285 static const char kBundledExperimentFieldTrialName[]; | 296 static const char kBundledExperimentFieldTrialName[]; |
286 // Rule names used by the bundled experiment. | 297 // Rule names used by the bundled experiment. |
287 static const char kShortcutsScoringMaxRelevanceRule[]; | 298 static const char kShortcutsScoringMaxRelevanceRule[]; |
288 static const char kSearchHistoryRule[]; | 299 static const char kSearchHistoryRule[]; |
289 static const char kDemoteByTypeRule[]; | 300 static const char kDemoteByTypeRule[]; |
290 static const char kHQPBookmarkValueRule[]; | 301 static const char kHQPBookmarkValueRule[]; |
291 static const char kHQPDiscountFrecencyWhenFewVisitsRule[]; | 302 static const char kHQPDiscountFrecencyWhenFewVisitsRule[]; |
292 static const char kHQPAllowMatchInTLDRule[]; | 303 static const char kHQPAllowMatchInTLDRule[]; |
293 static const char kHQPAllowMatchInSchemeRule[]; | 304 static const char kHQPAllowMatchInSchemeRule[]; |
294 static const char kZeroSuggestRule[]; | 305 static const char kZeroSuggestRule[]; |
295 static const char kZeroSuggestVariantRule[]; | 306 static const char kZeroSuggestVariantRule[]; |
296 static const char kDisableInliningRule[]; | 307 static const char kDisableInliningRule[]; |
297 static const char kAnswersInSuggestRule[]; | 308 static const char kAnswersInSuggestRule[]; |
298 static const char kAddUWYTMatchEvenIfPromotedURLsRule[]; | 309 static const char kAddUWYTMatchEvenIfPromotedURLsRule[]; |
299 static const char kDisplayHintTextWhenPossibleRule[]; | 310 static const char kDisplayHintTextWhenPossibleRule[]; |
311 // Search Provider experiments. | |
Mark P
2014/10/21 21:28:22
nit: comment unnecessary
(we omit all similar comm
Bart N.
2014/10/22 01:19:08
Done.
| |
312 static const char kDisableResultsCachingRule[]; | |
313 static const char kSuggestPollingDelaySinceTheLastRequestRule[]; | |
Mark P
2014/10/21 21:28:22
nit: I'd prefer this rule name had a verb such as
Bart N.
2014/10/22 01:19:08
Done.
| |
314 static const char kSuggestPollingDelayMsRule[]; | |
300 | 315 |
301 // Parameter names used by the HUP new scoring experiments. | 316 // Parameter names used by the HUP new scoring experiments. |
302 static const char kHUPNewScoringEnabledParam[]; | 317 static const char kHUPNewScoringEnabledParam[]; |
303 static const char kHUPNewScoringTypedCountRelevanceCapParam[]; | 318 static const char kHUPNewScoringTypedCountRelevanceCapParam[]; |
304 static const char kHUPNewScoringTypedCountHalfLifeTimeParam[]; | 319 static const char kHUPNewScoringTypedCountHalfLifeTimeParam[]; |
305 static const char kHUPNewScoringTypedCountScoreBucketsParam[]; | 320 static const char kHUPNewScoringTypedCountScoreBucketsParam[]; |
306 static const char kHUPNewScoringVisitedCountRelevanceCapParam[]; | 321 static const char kHUPNewScoringVisitedCountRelevanceCapParam[]; |
307 static const char kHUPNewScoringVisitedCountHalfLifeTimeParam[]; | 322 static const char kHUPNewScoringVisitedCountHalfLifeTimeParam[]; |
308 static const char kHUPNewScoringVisitedCountScoreBucketsParam[]; | 323 static const char kHUPNewScoringVisitedCountScoreBucketsParam[]; |
309 | 324 |
(...skipping 16 matching lines...) Expand all Loading... | |
326 // prioritize different wildcard contexts, see the implementation. How to | 341 // prioritize different wildcard contexts, see the implementation. How to |
327 // interpret the value is left to the caller; this is rule-dependent. | 342 // interpret the value is left to the caller; this is rule-dependent. |
328 static std::string GetValueForRuleInContext( | 343 static std::string GetValueForRuleInContext( |
329 const std::string& rule, | 344 const std::string& rule, |
330 metrics::OmniboxEventProto::PageClassification page_classification); | 345 metrics::OmniboxEventProto::PageClassification page_classification); |
331 | 346 |
332 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial); | 347 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial); |
333 }; | 348 }; |
334 | 349 |
335 #endif // COMPONENTS_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_ | 350 #endif // COMPONENTS_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_ |
OLD | NEW |