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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerFeedbackReporter.java

Issue 1386043002: Open distiller UI setting through JavaScript (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment nits Created 5 years, 2 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/src/org/chromium/chrome/browser/dom_distiller/DomDistillerUIUtils.java » ('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/dom_distiller/DomDistillerFeedbackReporter.java
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
deleted file mode 100644
index 94d0583dfbd3332402546651cf8f5d1771e04227..0000000000000000000000000000000000000000
--- a/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerFeedbackReporter.java
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package org.chromium.chrome.browser.dom_distiller;
-
-import android.app.Activity;
-
-import org.chromium.base.ThreadUtils;
-import org.chromium.base.annotations.CalledByNative;
-import org.chromium.base.annotations.JNINamespace;
-import org.chromium.chrome.browser.ChromeApplication;
-import org.chromium.chrome.browser.feedback.FeedbackCollector;
-import org.chromium.chrome.browser.feedback.FeedbackReporter;
-import org.chromium.chrome.browser.profiles.Profile;
-import org.chromium.ui.base.WindowAndroid;
-
-/**
- * Java implementation of dom_distiller::android::ExternalFeedbackReporterAndroid.
- */
-@JNINamespace("dom_distiller::android")
-public final class DomDistillerFeedbackReporter {
- private static final String DISTILLATION_QUALITY_KEY = "Distillation quality";
- private static final String DISTILLATION_QUALITY_GOOD = "good";
- private static final String DISTILLATION_QUALITY_BAD = "bad";
-
- private static FeedbackReporter sFeedbackReporter;
-
- /**
- * A static method for native code to call to call the external feedback form.
- * @param window WindowAndroid object to get an activity from.
- * @param url The URL to report feedback for.
- * @param good True if the feedback is good and false if not.
- */
- @CalledByNative
- public static void reportFeedbackWithWindow(
- WindowAndroid window, String url, final boolean good) {
- ThreadUtils.assertOnUiThread();
- Activity activity = window.getActivity().get();
- if (sFeedbackReporter == null) {
- ChromeApplication application = (ChromeApplication) activity.getApplication();
- sFeedbackReporter = application.createFeedbackReporter();
- }
- FeedbackCollector.create(activity, Profile.getLastUsedProfile(), url,
- new FeedbackCollector.FeedbackResult() {
- @Override
- public void onResult(FeedbackCollector collector) {
- String quality =
- good ? DISTILLATION_QUALITY_GOOD : DISTILLATION_QUALITY_BAD;
- collector.add(DISTILLATION_QUALITY_KEY, quality);
- sFeedbackReporter.reportFeedback(collector);
- }
- });
- }
-
- private DomDistillerFeedbackReporter() {}
-}
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerUIUtils.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698