Index: chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelMetrics.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelMetrics.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelMetrics.java |
index 42a0b063b5e3d37a1dc1dfdd653b9abfa1893883..7495c0fd33331599fe0fe51d95b4b814f4f0e1a4 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelMetrics.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelMetrics.java |
@@ -6,15 +6,12 @@ package org.chromium.chrome.browser.compositor.bottombar.contextualsearch; |
import org.chromium.chrome.browser.compositor.bottombar.OverlayPanel.PanelState; |
import org.chromium.chrome.browser.compositor.bottombar.OverlayPanel.StateChangeReason; |
-import org.chromium.chrome.browser.contextualsearch.ContextualSearchBlacklist.BlacklistReason; |
import org.chromium.chrome.browser.contextualsearch.ContextualSearchHeuristics; |
import org.chromium.chrome.browser.contextualsearch.ContextualSearchRankerLogger; |
import org.chromium.chrome.browser.contextualsearch.ContextualSearchRankerLoggerImpl; |
import org.chromium.chrome.browser.contextualsearch.ContextualSearchUma; |
import org.chromium.chrome.browser.contextualsearch.QuickActionCategory; |
-import java.util.Locale; |
- |
/** |
* This class is responsible for all the logging related to Contextual Search. |
*/ |
@@ -25,7 +22,6 @@ public class ContextualSearchPanelMetrics { |
private final ContextualSearchRankerLogger mTapSuppressionRankerLogger; |
// Flags for logging. |
- private BlacklistReason mBlacklistReason; |
private boolean mDidSearchInvolvePromo; |
private boolean mWasSearchContentViewSeen; |
private boolean mIsPromoActive; |
@@ -41,8 +37,6 @@ public class ContextualSearchPanelMetrics { |
private boolean mWasQuickActionShown; |
private int mQuickActionCategory; |
private boolean mWasQuickActionClicked; |
- private boolean mDidSelectionStartWithCapital; |
- private char mSelectionFirstChar; |
private int mSelectionLength; |
// Whether any Tap suppression heuristic was satisfied when the panel was shown. |
private boolean mWasAnyHeuristicSatisfiedOnPanelShow; |
@@ -132,12 +126,6 @@ public class ContextualSearchPanelMetrics { |
mWasQuickActionClicked); |
} |
- if (mDidSelectionStartWithCapital && mWasActivatedByTap) { |
- ContextualSearchUma.logStartedWithCapitalResultsSeen(mWasSearchContentViewSeen); |
- } |
- |
- ContextualSearchUma.logBlacklistSeen(mBlacklistReason, mWasSearchContentViewSeen); |
- |
if (mResultsSeenExperiments != null) { |
mResultsSeenExperiments.logResultsSeen( |
mWasSearchContentViewSeen, mWasActivatedByTap); |
@@ -150,7 +138,6 @@ public class ContextualSearchPanelMetrics { |
mWasSearchContentViewSeen, wasAnySuppressionHeuristicSatisfied); |
// Log all the experiments to the Ranker logger. |
if (mRankerLogExperiments != null) { |
- writeSelectionFeaturesToRanker(); |
mTapSuppressionRankerLogger.logOutcome(mWasSearchContentViewSeen); |
mRankerLogExperiments.logRankerTapSuppression(mTapSuppressionRankerLogger); |
mTapSuppressionRankerLogger.writeLogAndReset(); |
@@ -174,7 +161,6 @@ public class ContextualSearchPanelMetrics { |
if (isStartingSearch) { |
mFirstPeekTimeNs = System.nanoTime(); |
mWasActivatedByTap = reason == StateChangeReason.TEXT_SELECT_TAP; |
- mBlacklistReason = BlacklistReason.NONE; |
if (mWasActivatedByTap && mResultsSeenExperiments != null) { |
mWasAnyHeuristicSatisfiedOnPanelShow = |
mResultsSeenExperiments.isAnyConditionSatisfiedForAggregrateLogging(); |
@@ -236,20 +222,11 @@ public class ContextualSearchPanelMetrics { |
mWasQuickActionShown = false; |
mQuickActionCategory = QuickActionCategory.NONE; |
mWasQuickActionClicked = false; |
- mDidSelectionStartWithCapital = false; |
mWasAnyHeuristicSatisfiedOnPanelShow = false; |
mPanelTriggerTimeFromTapNs = 0; |
} |
} |
- /** |
- * Sets the reason why the current selection was blacklisted. |
- * @param reason The given reason. |
- */ |
- public void setBlacklistReason(BlacklistReason reason) { |
- mBlacklistReason = reason; |
- } |
- |
/** |
* Sets that the contextual search involved the promo. |
*/ |
@@ -309,21 +286,6 @@ public class ContextualSearchPanelMetrics { |
*/ |
public void onSelectionEstablished(String selection) { |
mSelectionLength = selection.length(); |
- mSelectionFirstChar = selection.charAt(0); |
- String firstChar = String.valueOf(mSelectionFirstChar); |
- mDidSelectionStartWithCapital = firstChar.equals( |
- firstChar.toUpperCase(Locale.getDefault())) |
- && !firstChar.equals(firstChar.toLowerCase(Locale.getDefault())); |
- } |
- |
- /** |
- * Writes the set of selection features that we've collected for Ranker to its log. |
- */ |
- private void writeSelectionFeaturesToRanker() { |
- mTapSuppressionRankerLogger.log( |
- ContextualSearchRankerLogger.Feature.SELECTION_LENGTH, mSelectionLength); |
- mTapSuppressionRankerLogger.log( |
- ContextualSearchRankerLogger.Feature.SELECTION_FIRST_CHAR, mSelectionFirstChar); |
} |
/** |