Commit 2e2b4baa authored by Pedro Amaral's avatar Pedro Amaral Committed by Commit Bot

Move new tab UMA logging to the click handler

Previously the logging was done in ToolbarPhone. This meant that
Duet wasn't logging any of the new tab button clicks. This moves
the logging to the click handler.

Bug: 910682
Change-Id: I318ccdeffdb453e97cca8e3a203177b5db2f1791
Reviewed-on: https://chromium-review.googlesource.com/c/1357381
Commit-Queue: Pedro Amaral <amaralp@chromium.org>
Reviewed-by: default avatarTheresa <twellington@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612855}
parent be04b3a3
...@@ -845,6 +845,8 @@ public class ChromeTabbedActivity ...@@ -845,6 +845,8 @@ public class ChromeTabbedActivity
// newtab button on the toolbar. // newtab button on the toolbar.
getCurrentTabCreator().launchNTP(); getCurrentTabCreator().launchNTP();
mLocaleManager.showSearchEnginePromoIfNeeded(ChromeTabbedActivity.this, null); mLocaleManager.showSearchEnginePromoIfNeeded(ChromeTabbedActivity.this, null);
RecordUserAction.record("MobileToolbarStackViewNewTab");
RecordUserAction.record("MobileNewTabOpened");
}; };
OnClickListener bookmarkClickHandler = v -> addOrEditBookmark(getActivityTab()); OnClickListener bookmarkClickHandler = v -> addOrEditBookmark(getActivityTab());
......
...@@ -52,7 +52,6 @@ import android.widget.TextView; ...@@ -52,7 +52,6 @@ import android.widget.TextView;
import org.chromium.base.ApiCompatibilityUtils; import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.base.TraceEvent; import org.chromium.base.TraceEvent;
import org.chromium.base.VisibleForTesting; import org.chromium.base.VisibleForTesting;
import org.chromium.base.metrics.RecordUserAction;
import org.chromium.chrome.R; import org.chromium.chrome.R;
import org.chromium.chrome.browser.ChromeFeatureList; import org.chromium.chrome.browser.ChromeFeatureList;
import org.chromium.chrome.browser.compositor.Invalidator; import org.chromium.chrome.browser.compositor.Invalidator;
...@@ -582,9 +581,6 @@ public class ToolbarPhone ...@@ -582,9 +581,6 @@ public class ToolbarPhone
if (mNewTabListener != null) { if (mNewTabListener != null) {
mNewTabListener.onClick(v); mNewTabListener.onClick(v);
RecordUserAction.record("MobileToolbarStackViewNewTab");
RecordUserAction.record("MobileNewTabOpened");
// TODO(kkimlabs): Record UMA action for homepage button.
} }
} else if (mHomeButton != null && mHomeButton == v) { } else if (mHomeButton != null && mHomeButton == v) {
openHomepage(); openHomepage();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment