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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/pageinfo/WebsiteSettingsPopup.java

Issue 1714383002: Android: Record metrics for buttons in the Origin Info Bubble (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/pageinfo/WebsiteSettingsPopup.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/pageinfo/WebsiteSettingsPopup.java b/chrome/android/java/src/org/chromium/chrome/browser/pageinfo/WebsiteSettingsPopup.java
index 5dd60b0696abdf2882692fe84a5e5ac3ff9bccea..4b9c461c3961b62afdc009e05cc800ad8857129c 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/pageinfo/WebsiteSettingsPopup.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/pageinfo/WebsiteSettingsPopup.java
@@ -689,6 +689,7 @@ public class WebsiteSettingsPopup implements OnClickListener {
runAfterDismiss(new Runnable() {
@Override
public void run() {
+ recordAction(WebsiteSettingsAction.WEBSITE_SETTINGS_SITE_SETTINGS_OPENED);
Bundle fragmentArguments =
SingleWebsitePreferences.createFragmentArgsForSite(mFullUrl);
fragmentArguments.putParcelable(SingleWebsitePreferences.EXTRA_WEB_CONTENTS,
@@ -708,6 +709,8 @@ public class WebsiteSettingsPopup implements OnClickListener {
@Override
public void run() {
if (!mWebContents.isDestroyed()) {
+ recordAction(
+ WebsiteSettingsAction.WEBSITE_SETTINGS_SECURITY_DETAILS_OPENED);
ConnectionInfoPopup.show(mContext, mWebContents);
}
}
@@ -842,6 +845,10 @@ public class WebsiteSettingsPopup implements OnClickListener {
return animation;
}
+ private void recordAction(int action) {
+ nativeRecordWebsiteSettingsAction(mNativeWebsiteSettingsPopup, action);
+ }
+
/**
* Shows a WebsiteSettings dialog for the provided WebContents. The popup adds itself to the
* view hierarchy which owns the reference while it's visible.
@@ -858,4 +865,7 @@ public class WebsiteSettingsPopup implements OnClickListener {
private static native long nativeInit(WebsiteSettingsPopup popup, WebContents webContents);
private native void nativeDestroy(long nativeWebsiteSettingsPopupAndroid);
+
+ private native void nativeRecordWebsiteSettingsAction(
+ long nativeWebsiteSettingsPopupAndroid, int action);
}

Powered by Google App Engine
This is Rietveld 408576698