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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java

Issue 2771283002: [Android] Record user actions of new context menus for CCT (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | chrome/android/java/strings/android_chrome_strings.grd » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java
index 5352ed1ad824e045a1fb6529adb4db81915e9f27..9d7e60f41c99e333d3acd4d557cb98d675fa139a 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java
@@ -99,7 +99,11 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator {
static final int ACTION_CALL = 30;
static final int ACTION_SEND_TEXT_MESSAGE = 31;
static final int ACTION_COPY_PHONE_NUMBER = 32;
- static final int NUM_ACTIONS = 33;
+ static final int ACTION_OPEN_IN_NEW_CHROME_TAB = 33;
+ static final int ACTION_OPEN_IN_CHROME_INCOGNITO_TAB = 34;
+ static final int ACTION_OPEN_IN_BROWSER = 35;
+ static final int ACTION_OPEN_IN_CHROME = 36;
+ static final int NUM_ACTIONS = 37;
// Note: these values must match the ContextMenuSaveLinkType enum in histograms.xml.
// Only add new values at the end, right before NUM_TYPES. We depend on these specific
@@ -430,12 +434,16 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator {
ContextMenuUma.record(params, ContextMenuUma.ACTION_SHARE_IMAGE);
helper.shareImage();
} else if (itemId == R.id.menu_id_open_in_chrome) {
+ ContextMenuUma.record(params, ContextMenuUma.ACTION_OPEN_IN_CHROME);
mDelegate.onOpenInChrome(params.getLinkUrl(), params.getPageUrl());
} else if (itemId == R.id.contextmenu_open_in_new_chrome_tab) {
+ ContextMenuUma.record(params, ContextMenuUma.ACTION_OPEN_IN_NEW_CHROME_TAB);
mDelegate.onOpenInNewChromeTabFromCCT(getUrl(params), false);
} else if (itemId == R.id.contextmenu_open_in_chrome_incognito_tab) {
+ ContextMenuUma.record(params, ContextMenuUma.ACTION_OPEN_IN_CHROME_INCOGNITO_TAB);
mDelegate.onOpenInNewChromeTabFromCCT(getUrl(params), true);
} else if (itemId == R.id.contextmenu_open_in_browser_id) {
+ ContextMenuUma.record(params, ContextMenuUma.ACTION_OPEN_IN_BROWSER);
mDelegate.onOpenInDefaultBrowser(params.getLinkUrl());
} else {
assert false;
« no previous file with comments | « no previous file | chrome/android/java/strings/android_chrome_strings.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698