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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/ntp/ContentSuggestionsNotificationHelper.java

Issue 2792583002: 📱 Simplify naming of generated java enums IntDefs (Closed)
Patch Set: rebase Created 3 years, 8 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/ntp/ContentSuggestionsNotificationHelper.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/ContentSuggestionsNotificationHelper.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/ContentSuggestionsNotificationHelper.java
index 73de4adfc3ee1801f25364483acc13ac80657540..f5847694243472280dfe4ae4e9648bf5bfce4f36 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/ContentSuggestionsNotificationHelper.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/ContentSuggestionsNotificationHelper.java
@@ -30,8 +30,7 @@
import org.chromium.chrome.browser.notifications.NotificationConstants;
import org.chromium.chrome.browser.notifications.NotificationUmaTracker;
import org.chromium.chrome.browser.ntp.snippets.ContentSuggestionsNotificationAction;
-import org.chromium.chrome.browser.ntp.snippets.ContentSuggestionsNotificationAction.ContentSuggestionsNotificationActionEnum;
-import org.chromium.chrome.browser.ntp.snippets.ContentSuggestionsNotificationOptOut.ContentSuggestionsNotificationOptOutEnum;
+import org.chromium.chrome.browser.ntp.snippets.ContentSuggestionsNotificationOptOut;
import org.chromium.chrome.browser.preferences.ContentSuggestionsPreferences;
import java.util.Collection;
@@ -76,19 +75,17 @@ private ContentSuggestionsNotificationHelper() {} // Prevent instantiation
/**
* Records the reason why Content Suggestions notifications have been opted out.
- * @see ContentSuggestionsNotificationOptOutEnum;
+ * @see ContentSuggestionsNotificationOptOut;
*/
- public static void recordNotificationOptOut(
- @ContentSuggestionsNotificationOptOutEnum int reason) {
+ public static void recordNotificationOptOut(@ContentSuggestionsNotificationOptOut int reason) {
nativeRecordNotificationOptOut(reason);
}
/**
* Records an action performed on a Content Suggestions notification.
- * @see ContentSuggestionsNotificationActionEnum;
+ * @see ContentSuggestionsNotificationAction;
*/
- public static void recordNotificationAction(
- @ContentSuggestionsNotificationActionEnum int action) {
+ public static void recordNotificationAction(@ContentSuggestionsNotificationAction int action) {
nativeRecordNotificationAction(action);
}
@@ -367,7 +364,7 @@ private static int nextNotificationId() {
}
private static String cachedMetricNameForAction(
- @ContentSuggestionsNotificationActionEnum int action) {
+ @ContentSuggestionsNotificationAction int action) {
switch (action) {
case ContentSuggestionsNotificationAction.TAP:
return PREF_CACHED_ACTION_TAP;
@@ -399,8 +396,7 @@ private static String cachedMetricNameForAction(
*
* @param action The action to update the pref for.
*/
- private static void recordCachedActionMetric(
- @ContentSuggestionsNotificationActionEnum int action) {
+ private static void recordCachedActionMetric(@ContentSuggestionsNotificationAction int action) {
String prefName = cachedMetricNameForAction(action);
assert !prefName.isEmpty();
@@ -474,7 +470,7 @@ private static native void nativeReceiveFlushedMetrics(int tapCount, int dismiss
int hideDeadlineCount, int hideExpiryCount, int hideFrontmostCount,
int hideDisabledCount, int hideShutdownCount, int consecutiveIgnored);
private static native void nativeRecordNotificationOptOut(
- @ContentSuggestionsNotificationOptOutEnum int reason);
+ @ContentSuggestionsNotificationOptOut int reason);
private static native void nativeRecordNotificationAction(
- @ContentSuggestionsNotificationActionEnum int action);
+ @ContentSuggestionsNotificationAction int action);
}

Powered by Google App Engine
This is Rietveld 408576698