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

Unified Diff: components/omnibox/omnibox_field_trial.h

Issue 645303003: Parametrize Suggest polling strategy and delay. Also add a parameter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed two comments. Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: components/omnibox/omnibox_field_trial.h
diff --git a/components/omnibox/omnibox_field_trial.h b/components/omnibox/omnibox_field_trial.h
index 07377bdc7052aa8085c479d91334ed37bdb3c757..bccc98185afdd0d704b51acffff5559bb0838b87 100644
--- a/components/omnibox/omnibox_field_trial.h
+++ b/components/omnibox/omnibox_field_trial.h
@@ -281,6 +281,17 @@ class OmniboxFieldTrial {
static bool DisplayHintTextWhenPossible();
// ---------------------------------------------------------
+ // For SearchProvider related experiments.
+
+ // Returns true if the search provider should not be caching results.
+ static bool DisableResultsCaching();
+
+ // Returns how the search provider should poll Suggest. Currently, we support
+ // measuring polling delay from the last keystroke or last suggest request.
+ static void GetSuggestPollingStrategy(bool* from_last_keystroke,
+ int* polling_delay_ms);
+
+ // ---------------------------------------------------------
// Exposed publicly for the sake of unittests.
static const char kBundledExperimentFieldTrialName[];
// Rule names used by the bundled experiment.
@@ -297,6 +308,9 @@ class OmniboxFieldTrial {
static const char kAnswersInSuggestRule[];
static const char kAddUWYTMatchEvenIfPromotedURLsRule[];
static const char kDisplayHintTextWhenPossibleRule[];
+ static const char kDisableResultsCachingRule[];
+ static const char kMeasureSuggestPollingDelayFromLastKeystrokeRule[];
+ static const char kSuggestPollingDelayMsRule[];
// Parameter names used by the HUP new scoring experiments.
static const char kHUPNewScoringEnabledParam[];
@@ -307,6 +321,11 @@ class OmniboxFieldTrial {
static const char kHUPNewScoringVisitedCountHalfLifeTimeParam[];
static const char kHUPNewScoringVisitedCountScoreBucketsParam[];
+ // The amount of time to wait before sending a new suggest request after the
+ // previous one unless overridden by a field trial parameter.
+ // Non-const because some unittests modify this value.
+ static int kDefaultMinimumTimeBetweenSuggestQueriesMs;
+
private:
friend class OmniboxFieldTrialTest;
« no previous file with comments | « chrome/browser/ui/search/instant_extended_interactive_uitest.cc ('k') | components/omnibox/omnibox_field_trial.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698