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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelMetrics.java

Issue 2863893002: [TTS] Remove two unused metrics. (Closed)
Patch Set: Created 3 years, 7 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/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 9ddceca51602ec1c7ffb4482031e12682a0e423c..42a0b063b5e3d37a1dc1dfdd653b9abfa1893883 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
@@ -37,12 +37,10 @@ public class ContextualSearchPanelMetrics {
private boolean mIsSerpNavigation;
private boolean mWasActivatedByTap;
private boolean mWasPanelOpenedBeyondPeek;
- private boolean mWasSelectionPartOfUrl;
private boolean mWasContextualCardsDataShown;
private boolean mWasQuickActionShown;
private int mQuickActionCategory;
private boolean mWasQuickActionClicked;
- private boolean mWasSelectionAllCaps;
private boolean mDidSelectionStartWithCapital;
private char mSelectionFirstChar;
private int mSelectionLength;
@@ -121,11 +119,6 @@ public class ContextualSearchPanelMetrics {
ContextualSearchUma.logResultsSeen(mWasSearchContentViewSeen, mWasActivatedByTap);
}
- if (mWasSelectionPartOfUrl) {
- ContextualSearchUma.logResultsSeenSelectionIsUrl(mWasSearchContentViewSeen,
- mWasActivatedByTap);
- }
-
if (mWasContextualCardsDataShown) {
ContextualSearchUma.logContextualCardsResultsSeen(mWasSearchContentViewSeen);
}
@@ -139,9 +132,7 @@ public class ContextualSearchPanelMetrics {
mWasQuickActionClicked);
}
- if (mWasSelectionAllCaps && mWasActivatedByTap) {
- ContextualSearchUma.logAllCapsResultsSeen(mWasSearchContentViewSeen);
- } else if (mDidSelectionStartWithCapital && mWasActivatedByTap) {
+ if (mDidSelectionStartWithCapital && mWasActivatedByTap) {
ContextualSearchUma.logStartedWithCapitalResultsSeen(mWasSearchContentViewSeen);
}
@@ -154,8 +145,7 @@ public class ContextualSearchPanelMetrics {
}
if (mWasActivatedByTap) {
- boolean wasAnySuppressionHeuristicSatisfied =
- mWasAnyHeuristicSatisfiedOnPanelShow || mWasSelectionPartOfUrl;
+ boolean wasAnySuppressionHeuristicSatisfied = mWasAnyHeuristicSatisfiedOnPanelShow;
ContextualSearchUma.logAnyTapSuppressionHeuristicSatisfied(
mWasSearchContentViewSeen, wasAnySuppressionHeuristicSatisfied);
// Log all the experiments to the Ranker logger.
@@ -242,12 +232,10 @@ public class ContextualSearchPanelMetrics {
mHasExitedExpanded = false;
mHasExitedMaximized = false;
mIsSerpNavigation = false;
- mWasSelectionPartOfUrl = false;
mWasContextualCardsDataShown = false;
mWasQuickActionShown = false;
mQuickActionCategory = QuickActionCategory.NONE;
mWasQuickActionClicked = false;
- mWasSelectionAllCaps = false;
mDidSelectionStartWithCapital = false;
mWasAnyHeuristicSatisfiedOnPanelShow = false;
mPanelTriggerTimeFromTapNs = 0;
@@ -286,13 +274,6 @@ public class ContextualSearchPanelMetrics {
}
/**
- * @param wasPartOfUrl Whether the selected text was part of a URL.
- */
- public void setWasSelectionPartOfUrl(boolean wasPartOfUrl) {
- mWasSelectionPartOfUrl = wasPartOfUrl;
- }
-
- /**
* @param wasContextualCardsDataShown Whether Contextual Cards data was shown in the Contextual
* Search Bar.
*/
@@ -328,10 +309,6 @@ public class ContextualSearchPanelMetrics {
*/
public void onSelectionEstablished(String selection) {
mSelectionLength = selection.length();
- // In some locales, there is no concept of an upper or lower case letter. Account for this
- // by checking that the selected text is not equivalent to selection#toLowerCase().
- mWasSelectionAllCaps = selection.equals(selection.toUpperCase(Locale.getDefault()))
- && !selection.equals(selection.toLowerCase(Locale.getDefault()));
mSelectionFirstChar = selection.charAt(0);
String firstChar = String.valueOf(mSelectionFirstChar);
mDidSelectionStartWithCapital = firstChar.equals(
@@ -347,8 +324,6 @@ public class ContextualSearchPanelMetrics {
ContextualSearchRankerLogger.Feature.SELECTION_LENGTH, mSelectionLength);
mTapSuppressionRankerLogger.log(
ContextualSearchRankerLogger.Feature.SELECTION_FIRST_CHAR, mSelectionFirstChar);
- mTapSuppressionRankerLogger.log(
- ContextualSearchRankerLogger.Feature.SELECTION_WAS_ALL_CAPS, mWasSelectionAllCaps);
}
/**

Powered by Google App Engine
This is Rietveld 408576698