summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornyquist <nyquist@chromium.org>2015-07-06 11:19:55 -0700
committerCommit bot <commit-bot@chromium.org>2015-07-06 18:20:49 +0000
commite9436c5138c4db30fe805525af6637a456cce425 (patch)
tree3af6dbd27542e42ddda0c18199ff213475e1e112
parent19e11c68d38aefe55b27b9905defcdfa7564545f (diff)
downloadchromium_src-e9436c5138c4db30fe805525af6637a456cce425.zip
chromium_src-e9436c5138c4db30fe805525af6637a456cce425.tar.gz
chromium_src-e9436c5138c4db30fe805525af6637a456cce425.tar.bz2
[Feedback] Simplify FeedbackReporter interface
Currently the FeedbackReporter interface requires an activity, but that is not any longer needed by the feedback code, so this CL removes the Activity parameter. BUG=386395 Review URL: https://codereview.chromium.org/1223683002 Cr-Commit-Position: refs/heads/master@{#337422}
-rw-r--r--chrome/android/java/src/org/chromium/chrome/browser/childaccounts/ChildAccountFeedbackReporter.java5
-rw-r--r--chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerFeedbackReporter.java4
-rw-r--r--chrome/android/java/src/org/chromium/chrome/browser/feedback/EmptyFeedbackReporter.java4
-rw-r--r--chrome/android/java/src/org/chromium/chrome/browser/feedback/FeedbackReporter.java7
4 files changed, 6 insertions, 14 deletions
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/childaccounts/ChildAccountFeedbackReporter.java b/chrome/android/java/src/org/chromium/chrome/browser/childaccounts/ChildAccountFeedbackReporter.java
index 3632c6b..40ed349 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/childaccounts/ChildAccountFeedbackReporter.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/childaccounts/ChildAccountFeedbackReporter.java
@@ -20,8 +20,7 @@ import org.chromium.ui.base.WindowAndroid;
public final class ChildAccountFeedbackReporter {
private static FeedbackReporter sFeedbackReporter;
- public static void reportFeedback(
- final Activity activity, final String description, String url) {
+ public static void reportFeedback(Activity activity, final String description, String url) {
ThreadUtils.assertOnUiThread();
if (sFeedbackReporter == null) {
ChromeApplication application = (ChromeApplication) activity.getApplication();
@@ -32,7 +31,7 @@ public final class ChildAccountFeedbackReporter {
@Override
public void onResult(FeedbackCollector collector) {
collector.setDescription(description);
- sFeedbackReporter.reportFeedback(activity, collector);
+ sFeedbackReporter.reportFeedback(collector);
}
});
}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerFeedbackReporter.java b/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerFeedbackReporter.java
index 9fd5f40..9cce67f 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerFeedbackReporter.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerFeedbackReporter.java
@@ -36,7 +36,7 @@ public final class DomDistillerFeedbackReporter {
public static void reportFeedbackWithWindow(
WindowAndroid window, String url, final boolean good) {
ThreadUtils.assertOnUiThread();
- final Activity activity = window.getActivity().get();
+ Activity activity = window.getActivity().get();
if (sFeedbackReporter == null) {
ChromeApplication application = (ChromeApplication) activity.getApplication();
sFeedbackReporter = application.createFeedbackReporter();
@@ -48,7 +48,7 @@ public final class DomDistillerFeedbackReporter {
String quality =
good ? DISTILLATION_QUALITY_GOOD : DISTILLATION_QUALITY_BAD;
collector.add(DISTILLATION_QUALITY_KEY, quality);
- sFeedbackReporter.reportFeedback(activity, collector);
+ sFeedbackReporter.reportFeedback(collector);
}
});
}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/feedback/EmptyFeedbackReporter.java b/chrome/android/java/src/org/chromium/chrome/browser/feedback/EmptyFeedbackReporter.java
index e312dd7..25786ff 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/feedback/EmptyFeedbackReporter.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/feedback/EmptyFeedbackReporter.java
@@ -4,12 +4,10 @@
package org.chromium.chrome.browser.feedback;
-import android.app.Activity;
-
/**
* No-op implementation of {@link FeedbackReporter}.
*/
public class EmptyFeedbackReporter implements FeedbackReporter {
@Override
- public void reportFeedback(Activity activity, FeedbackCollector collector) {}
+ public void reportFeedback(FeedbackCollector collector) {}
}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/feedback/FeedbackReporter.java b/chrome/android/java/src/org/chromium/chrome/browser/feedback/FeedbackReporter.java
index 5e0d709a..3bff9de 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/feedback/FeedbackReporter.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/feedback/FeedbackReporter.java
@@ -4,10 +4,6 @@
package org.chromium.chrome.browser.feedback;
-import android.app.Activity;
-
-import javax.annotation.Nullable;
-
/**
* FeedbackReporter enables Chrome to send feedback to the feedback server.
*/
@@ -15,8 +11,7 @@ public interface FeedbackReporter {
/**
* Report feedback to the feedback server.
*
- * @param activity the activity to take a screenshot of. May be null.
* @param collector the {@link FeedbackCollector} to use for extra data.
*/
- void reportFeedback(@Nullable Activity activity, FeedbackCollector collector);
+ void reportFeedback(FeedbackCollector collector);
}