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

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

Issue 1736203002: [Contextual Search] Add metrics for Resolve and View timing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated some method names. Created 4 years, 10 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/ContextualSearchPanel.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java
index 50796ab6cae0f71c25fc96289dae8ded541f836a..107cfe0ef55a9b44695f795702cdded01dec3346 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java
@@ -383,6 +383,15 @@ public class ContextualSearchPanel extends OverlayPanel {
}
/**
+ * Notifies the panel that navigation to prefetched Search Results are now viewable.
Theresa 2016/02/29 19:42:44 I was confused about what "navigation" meant until
Donn Denman 2016/03/01 21:18:07 OK, I adopted your suggestions for "onPanelNavigat
+ * If the user has the panel open then they will see the prefetched result starting to load.
+ * @param didResolve Whether the search required Search Term Resolution.
+ */
+ public void onPrefetchedSearchNavigated(boolean didResolve) {
+ mPanelMetrics.onPrefetchedSearchNavigated(didResolve);
+ }
+
+ /**
* Maximizes the Contextual Search Panel, then promotes it to a regular Tab.
* @param reason The {@code StateChangeReason} behind the maximization and promotion to tab.
*/
@@ -470,7 +479,8 @@ public class ContextualSearchPanel extends OverlayPanel {
* Handles showing the resolved search term in the SearchBar.
* @param searchTerm The string that represents the search term.
*/
- public void onSearchTermResolutionResponse(String searchTerm) {
+ public void onSearchTermResolved(String searchTerm) {
+ mPanelMetrics.onSearchTermResolved();
getSearchBarControl().setSearchTerm(searchTerm);
animateSearchTermResolution();
}

Powered by Google App Engine
This is Rietveld 408576698