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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/childaccounts/ChildAccountFeedbackReporter.java

Issue 1222453002: [Feedback] Use callbacks for FeedbackCollector and use ScreenshotTask (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add-feedback-collector-test
Patch Set: Squashed branch Created 5 years, 6 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/childaccounts/ChildAccountFeedbackReporter.java
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 d3a57c1d80bf93d1ba12c6c0da931ab214b41282..3632c6bb18c0c90190f815a517624205cc4983ca 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,23 +20,26 @@ import org.chromium.ui.base.WindowAndroid;
public final class ChildAccountFeedbackReporter {
private static FeedbackReporter sFeedbackReporter;
- public static void reportFeedback(Activity activity,
- String description,
- String url) {
+ public static void reportFeedback(
+ final Activity activity, final String description, String url) {
ThreadUtils.assertOnUiThread();
if (sFeedbackReporter == null) {
ChromeApplication application = (ChromeApplication) activity.getApplication();
sFeedbackReporter = application.createFeedbackReporter();
}
- FeedbackCollector collector = FeedbackCollector.create(Profile.getLastUsedProfile(), url);
- collector.setDescription(description);
- sFeedbackReporter.reportFeedback(activity, collector);
+ FeedbackCollector.create(activity, Profile.getLastUsedProfile(), url,
+ new FeedbackCollector.FeedbackResult() {
+ @Override
+ public void onResult(FeedbackCollector collector) {
+ collector.setDescription(description);
+ sFeedbackReporter.reportFeedback(activity, collector);
+ }
+ });
}
@CalledByNative
- public static void reportFeedbackWithWindow(WindowAndroid window,
- String description,
- String url) {
+ public static void reportFeedbackWithWindow(
+ WindowAndroid window, String description, String url) {
reportFeedback(window.getActivity().get(), description, url);
}

Powered by Google App Engine
This is Rietveld 408576698