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

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

Issue 2674533002: [Contextual Search] Only record duration between trigger and scroll for taps (Closed)
Patch Set: Update histograms.xml Created 3 years, 11 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 2f11ac44e0ad4ac696fcc41ede9189503fcdeb16..99e8e50da88fabb67bab77039bffe34f3f5c123e 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
@@ -52,7 +52,7 @@ public class ContextualSearchPanelMetrics {
private boolean mWasAnyHeuristicSatisfiedOnPanelShow;
// Time when the panel was triggered (not reset by a chained search).
// Panel transitions are animated so mPanelTriggerTimeNs will be less than mFirstPeekTimeNs.
- private long mPanelTriggerTimeNs;
+ private long mPanelTriggerTimeFromTapNs;
// Time when the panel peeks into view (not reset by a chained search).
// Used to log total time the panel is showing (not closed).
private long mFirstPeekTimeNs;
@@ -107,10 +107,10 @@ public class ContextualSearchPanelMetrics {
// so a local copy is created before the reset.
boolean isSearchPanelFullyPreloaded = mIsSearchPanelFullyPreloaded;
- if (toState == PanelState.CLOSED && mPanelTriggerTimeNs != 0
+ if (toState == PanelState.CLOSED && mPanelTriggerTimeFromTapNs != 0
&& reason == StateChangeReason.BASE_PAGE_SCROLL) {
long durationMs =
- (System.nanoTime() - mPanelTriggerTimeNs) / MILLISECONDS_TO_NANOSECONDS;
+ (System.nanoTime() - mPanelTriggerTimeFromTapNs) / MILLISECONDS_TO_NANOSECONDS;
ContextualSearchUma.logDurationBetweenTriggerAndScroll(
durationMs, mWasSearchContentViewSeen);
mTapSuppressionRankerLogger.log(
@@ -269,7 +269,7 @@ public class ContextualSearchPanelMetrics {
mWasSelectionAllCaps = false;
mDidSelectionStartWithCapital = false;
mWasAnyHeuristicSatisfiedOnPanelShow = false;
- mPanelTriggerTimeNs = 0;
+ mPanelTriggerTimeFromTapNs = 0;
}
}
@@ -343,10 +343,10 @@ public class ContextualSearchPanelMetrics {
}
/**
- * Should be called when the panel first starts showing.
+ * Should be called when the panel first starts showing due to a tap.
*/
- public void onPanelTriggered() {
- mPanelTriggerTimeNs = System.nanoTime();
+ public void onPanelTriggeredFromTap() {
+ mPanelTriggerTimeFromTapNs = System.nanoTime();
}
/**

Powered by Google App Engine
This is Rietveld 408576698