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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchHeuristic.java

Issue 2365653007: [Contextual Search] Exclude suppressed taps from aggregate suppression heuristics logging (Closed)
Patch Set: Fix punctuation Created 4 years, 3 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/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchHeuristic.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchHeuristic.java b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchHeuristic.java
index 0882d3d1082d0584c1cd4b8c59238a2f4bdaaf99..8fdb708f05f27a07be9000fb4c857a3c4c5345c5 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchHeuristic.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchHeuristic.java
@@ -12,13 +12,13 @@ abstract class ContextualSearchHeuristic {
public static final int NANOSECONDS_IN_A_MILLISECOND = 1000000;
/**
- * Gets whether this heuristic's condition was satisfied or not.
+ * Gets whether this heuristic's condition was satisfied or not if it is enabled.
* In the case of a Tap heuristic, if the condition is satisfied the Tap is suppressed.
* This heuristic may be called in logResultsSeen regardless of whether the condition was
* satisfied.
- * @return Whether this heuristic's condition was satisfied or not.
+ * @return True iff this heuristic is enabled and its condition is satisfied.
*/
- protected abstract boolean isConditionSatisfied();
+ protected abstract boolean isConditionSatisfiedAndEnabled();
/**
* Optionally logs this heuristic's condition state. Up to the heuristic to determine exactly
@@ -44,9 +44,9 @@ abstract class ContextualSearchHeuristic {
}
/**
- * @return Whether this heuristic's condition would have been satisfied if it were enabled
- * through VariationsAssociatedData. When logging aggregate metrics for Tap suppression,
- * the condition may be considered satisfied even if the tap wasn't suppresed.
+ * @return Whether this heuristic's condition would have been satisfied, causing a tap
+ * suppression, if it were enabled through VariationsAssociatedData. If the feature is
+ * enabled through VariationsAssociatedData then this method should return false.
*/
protected abstract boolean isConditionSatisfiedForAggregateLogging();
}

Powered by Google App Engine
This is Rietveld 408576698