Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(885)

Side by Side Diff: components/omnibox/browser/omnibox_field_trial.h

Issue 2591053002: Show PhysicalWebProvider suggestions with omnibox input (Closed)
Patch Set: enable experiment in unit tests Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/omnibox/browser/BUILD.gn ('k') | components/omnibox/browser/omnibox_field_trial.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 // field trial. 367 // field trial.
368 368
369 // Returns the conditions under which the UI code should display the title 369 // Returns the conditions under which the UI code should display the title
370 // of a URL more prominently than the URL for an input of type |input_type|. 370 // of a URL more prominently than the URL for an input of type |input_type|.
371 // Normally the URL is displayed more prominently. Returns NEVER_EMPHASIZE 371 // Normally the URL is displayed more prominently. Returns NEVER_EMPHASIZE
372 // if the experiment isn't active. 372 // if the experiment isn't active.
373 static EmphasizeTitlesCondition GetEmphasizeTitlesConditionForInput( 373 static EmphasizeTitlesCondition GetEmphasizeTitlesConditionForInput(
374 metrics::OmniboxInputType::Type input_type); 374 metrics::OmniboxInputType::Type input_type);
375 375
376 // --------------------------------------------------------- 376 // ---------------------------------------------------------
377 // For PhysicalWebProvider related experiments.
378
379 // Returns whether the user is in a Physical Web field trial where the
380 // PhysicalWebProvider should be used to get suggestions when the user clicks
381 // on the omnibox but has not typed anything yet.
382 static bool InPhysicalWebZeroSuggestFieldTrial();
383
384 // Returns whether the user is in a Physical Web field trial and URL-based
385 // suggestions can continue to appear after the user has started typing.
386 static bool InPhysicalWebAfterTypingFieldTrial();
387
388 // Returns the base relevance score for Physical Web omnibox suggestions when
389 // the user has clicked on the omnibox but has not typed anything yet.
390 static int GetPhysicalWebZeroSuggestBaseRelevance();
391
392 // Returns the base relevance score for Physical Web omnibox suggestions when
393 // the user has started typing in the omnibox.
394 static int GetPhysicalWebAfterTypingBaseRelevance();
395
396 // ---------------------------------------------------------
377 // Exposed publicly for the sake of unittests. 397 // Exposed publicly for the sake of unittests.
378 static const char kBundledExperimentFieldTrialName[]; 398 static const char kBundledExperimentFieldTrialName[];
379 // Rule names used by the bundled experiment. 399 // Rule names used by the bundled experiment.
380 static const char kDisableProvidersRule[]; 400 static const char kDisableProvidersRule[];
381 static const char kShortcutsScoringMaxRelevanceRule[]; 401 static const char kShortcutsScoringMaxRelevanceRule[];
382 static const char kSearchHistoryRule[]; 402 static const char kSearchHistoryRule[];
383 static const char kDemoteByTypeRule[]; 403 static const char kDemoteByTypeRule[];
384 static const char kHQPBookmarkValueRule[]; 404 static const char kHQPBookmarkValueRule[];
385 static const char kHQPTypedValueRule[]; 405 static const char kHQPTypedValueRule[];
386 static const char kHQPDiscountFrecencyWhenFewVisitsRule[]; 406 static const char kHQPDiscountFrecencyWhenFewVisitsRule[];
(...skipping 11 matching lines...) Expand all
398 static const char kHQPNumMatchesScoresRule[]; 418 static const char kHQPNumMatchesScoresRule[];
399 static const char kHQPNumTitleWordsRule[]; 419 static const char kHQPNumTitleWordsRule[];
400 static const char kHQPAlsoDoHUPLikeScoringRule[]; 420 static const char kHQPAlsoDoHUPLikeScoringRule[];
401 static const char kHUPSearchDatabaseRule[]; 421 static const char kHUPSearchDatabaseRule[];
402 static const char kPreventUWYTDefaultForNonURLInputsRule[]; 422 static const char kPreventUWYTDefaultForNonURLInputsRule[];
403 static const char kKeywordRequiresRegistryRule[]; 423 static const char kKeywordRequiresRegistryRule[];
404 static const char kKeywordRequiresPrefixMatchRule[]; 424 static const char kKeywordRequiresPrefixMatchRule[];
405 static const char kKeywordScoreForSufficientlyCompleteMatchRule[]; 425 static const char kKeywordScoreForSufficientlyCompleteMatchRule[];
406 static const char kHQPAllowDupMatchesForScoringRule[]; 426 static const char kHQPAllowDupMatchesForScoringRule[];
407 static const char kEmphasizeTitlesRule[]; 427 static const char kEmphasizeTitlesRule[];
428 static const char kPhysicalWebZeroSuggestRule[];
429 static const char kPhysicalWebAfterTypingRule[];
408 430
409 // Parameter names used by the HUP new scoring experiments. 431 // Parameter names used by the HUP new scoring experiments.
410 static const char kHUPNewScoringEnabledParam[]; 432 static const char kHUPNewScoringEnabledParam[];
411 static const char kHUPNewScoringTypedCountRelevanceCapParam[]; 433 static const char kHUPNewScoringTypedCountRelevanceCapParam[];
412 static const char kHUPNewScoringTypedCountHalfLifeTimeParam[]; 434 static const char kHUPNewScoringTypedCountHalfLifeTimeParam[];
413 static const char kHUPNewScoringTypedCountScoreBucketsParam[]; 435 static const char kHUPNewScoringTypedCountScoreBucketsParam[];
414 static const char kHUPNewScoringTypedCountUseDecayFactorParam[]; 436 static const char kHUPNewScoringTypedCountUseDecayFactorParam[];
415 static const char kHUPNewScoringVisitedCountRelevanceCapParam[]; 437 static const char kHUPNewScoringVisitedCountRelevanceCapParam[];
416 static const char kHUPNewScoringVisitedCountHalfLifeTimeParam[]; 438 static const char kHUPNewScoringVisitedCountHalfLifeTimeParam[];
417 static const char kHUPNewScoringVisitedCountScoreBucketsParam[]; 439 static const char kHUPNewScoringVisitedCountScoreBucketsParam[];
418 static const char kHUPNewScoringVisitedCountUseDecayFactorParam[]; 440 static const char kHUPNewScoringVisitedCountUseDecayFactorParam[];
419 441
420 // Parameter names used by the HQP experimental scoring experiments. 442 // Parameter names used by the HQP experimental scoring experiments.
421 static const char kHQPExperimentalScoringBucketsParam[]; 443 static const char kHQPExperimentalScoringBucketsParam[];
422 static const char kHQPExperimentalScoringTopicalityThresholdParam[]; 444 static const char kHQPExperimentalScoringTopicalityThresholdParam[];
423 445
446 // Parameter names used by the Physical Web experimental scoring experiments.
447 static const char kPhysicalWebZeroSuggestBaseRelevanceParam[];
448 static const char kPhysicalWebAfterTypingBaseRelevanceParam[];
449
424 // The amount of time to wait before sending a new suggest request after the 450 // The amount of time to wait before sending a new suggest request after the
425 // previous one unless overridden by a field trial parameter. 451 // previous one unless overridden by a field trial parameter.
426 // Non-const because some unittests modify this value. 452 // Non-const because some unittests modify this value.
427 static int kDefaultMinimumTimeBetweenSuggestQueriesMs; 453 static int kDefaultMinimumTimeBetweenSuggestQueriesMs;
428 454
429 private: 455 private:
430 friend class OmniboxFieldTrialTest; 456 friend class OmniboxFieldTrialTest;
431 457
432 // The bundled omnibox experiment comes with a set of parameters 458 // The bundled omnibox experiment comes with a set of parameters
433 // (key-value pairs). Each key indicates a certain rule that applies in 459 // (key-value pairs). Each key indicates a certain rule that applies in
(...skipping 11 matching lines...) Expand all
445 // prioritize different wildcard contexts, see the implementation. How to 471 // prioritize different wildcard contexts, see the implementation. How to
446 // interpret the value is left to the caller; this is rule-dependent. 472 // interpret the value is left to the caller; this is rule-dependent.
447 static std::string GetValueForRuleInContext( 473 static std::string GetValueForRuleInContext(
448 const std::string& rule, 474 const std::string& rule,
449 metrics::OmniboxEventProto::PageClassification page_classification); 475 metrics::OmniboxEventProto::PageClassification page_classification);
450 476
451 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial); 477 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial);
452 }; 478 };
453 479
454 #endif // COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_FIELD_TRIAL_H_ 480 #endif // COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_FIELD_TRIAL_H_
OLDNEW
« no previous file with comments | « components/omnibox/browser/BUILD.gn ('k') | components/omnibox/browser/omnibox_field_trial.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698