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

Unified Diff: chrome/browser/omnibox/omnibox_field_trial.h

Issue 20777006: Omnibox: Create Bundled Field Trial; Convert SearchHistory trial to it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make GetConsequences private for now Created 7 years, 5 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: chrome/browser/omnibox/omnibox_field_trial.h
diff --git a/chrome/browser/omnibox/omnibox_field_trial.h b/chrome/browser/omnibox/omnibox_field_trial.h
index d555a9fcfba920f0b34a820936c126dff120f10f..c7bfaeaeba74d3617a1240ec8be696f93df6b92f 100644
--- a/chrome/browser/omnibox/omnibox_field_trial.h
+++ b/chrome/browser/omnibox/omnibox_field_trial.h
@@ -9,6 +9,7 @@
#include <vector>
#include "base/basictypes.h"
+#include "chrome/browser/autocomplete/autocomplete_input.h"
// This class manages the Omnibox field trials.
class OmniboxFieldTrial {
@@ -103,16 +104,28 @@ class OmniboxFieldTrial {
// ---------------------------------------------------------
// For the SearchHistory field trial.
- // Returns true if the user is in the experiment group that scores
- // search history query suggestions less aggressively so that they don't
- // inline.
- static bool SearchHistoryPreventInlining();
+ // Returns true if the user is in the experiment group that, in the
+ // provided |current_page_classification| context, scores search history
+ // query suggestions less aggressively so that they don't inline.
+ static bool SearchHistoryPreventInlining(
+ AutocompleteInput::PageClassification current_page_classification);
- // Returns true if the user is in the experiment group that disables
- // all query suggestions from search history.
- static bool SearchHistoryDisable();
+ // Returns true if the user is in the experiment group that, in the
+ // provided |current_page_classification| context, disables all query
+ // suggestions from search history.
+ static bool SearchHistoryDisable(
+ AutocompleteInput::PageClassification current_page_classification);
private:
+ // Returns the "consequences" for the |rule| that applies in the context
+ // of |current_page_classification|. If no such rule exists, looks for
+ // that rule in the global context and return it if found. If the rule
+ // remains unfound in the global context, returns the empty string. For
+ // more details, see the implementation.
+ static std::string GetConsequencesOfRuleInPageClassificationContext(
+ AutocompleteInput::PageClassification current_page_classification,
+ const std::string& rule);
+
DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial);
};

Powered by Google App Engine
This is Rietveld 408576698