| Index: chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchFieldTrial.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchFieldTrial.java b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchFieldTrial.java
|
| index db5262a3bd1952bd8b2c7fa3203c46d01dda1784..1e09f27344c7116fb8678e32fc7a33b988599a53 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchFieldTrial.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchFieldTrial.java
|
| @@ -48,6 +48,10 @@ public class ContextualSearchFieldTrial {
|
| private static final String SCREEN_TOP_SUPPRESSION_DPS = "screen_top_suppression_dps";
|
| private static final String ENABLE_BAR_OVERLAP_COLLECTION = "enable_bar_overlap_collection";
|
| private static final String BAR_OVERLAP_SUPPRESSION_ENABLED = "enable_bar_overlap_suppression";
|
| + private static final String WORD_EDGE_SUPPRESSION_ENABLED = "enable_word_edge_suppression";
|
| + private static final String SHORT_WORD_SUPPRESSION_ENABLED = "enable_short_word_suppression";
|
| + private static final String WORD_NOT_LONG_ENOUGH_SUPPRESSION_ENABLED =
|
| + "enable_word_not_long_enough_suppression";
|
|
|
| private static final String MINIMUM_SELECTION_LENGTH = "minimum_selection_length";
|
|
|
| @@ -78,6 +82,9 @@ public class ContextualSearchFieldTrial {
|
| private static Integer sScreenTopSuppressionDps;
|
| private static Boolean sIsBarOverlapCollectionEnabled;
|
| private static Boolean sIsBarOverlapSuppressionEnabled;
|
| + private static Boolean sIsWordEdgeSuppressionEnabled;
|
| + private static Boolean sIsShortWordSuppressionEnabled;
|
| + private static Boolean sIsWordNotLongEnoughSuppressionEnabled;
|
| private static Integer sMinimumSelectionLength;
|
| private static Boolean sIsOnlineDetectionDisabled;
|
| private static Boolean sIsAmpAsSeparateTabDisabled;
|
| @@ -254,6 +261,38 @@ public class ContextualSearchFieldTrial {
|
| }
|
|
|
| /**
|
| + * @return Whether triggering is suppressed by a tap that's near the edge of a word.
|
| + */
|
| + static boolean isWordEdgeSuppressionEnabled() {
|
| + if (sIsWordEdgeSuppressionEnabled == null) {
|
| + sIsWordEdgeSuppressionEnabled = getBooleanParam(WORD_EDGE_SUPPRESSION_ENABLED);
|
| + }
|
| + return sIsWordEdgeSuppressionEnabled.booleanValue();
|
| + }
|
| +
|
| + /**
|
| + * @return Whether triggering is suppressed by a tap that's in a short word.
|
| + */
|
| + static boolean isShortWordSuppressionEnabled() {
|
| + if (sIsShortWordSuppressionEnabled == null) {
|
| + sIsShortWordSuppressionEnabled = getBooleanParam(SHORT_WORD_SUPPRESSION_ENABLED);
|
| + }
|
| + return sIsShortWordSuppressionEnabled.booleanValue();
|
| + }
|
| +
|
| + /**
|
| + * @return Whether triggering is suppressed by a tap that's in a word that's considered not
|
| + * long enough.
|
| + */
|
| + static boolean isWordNotLongEnoughSuppressionEnabled() {
|
| + if (sIsWordNotLongEnoughSuppressionEnabled == null) {
|
| + sIsWordNotLongEnoughSuppressionEnabled =
|
| + getBooleanParam(WORD_NOT_LONG_ENOUGH_SUPPRESSION_ENABLED);
|
| + }
|
| + return sIsWordNotLongEnoughSuppressionEnabled.booleanValue();
|
| + }
|
| +
|
| + /**
|
| * @return The minimum valid selection length.
|
| */
|
| static int getMinimumSelectionLength() {
|
|
|