diff options
author | nyquist@chromium.org <nyquist@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-04 06:17:06 +0000 |
---|---|---|
committer | nyquist@chromium.org <nyquist@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-04 06:17:06 +0000 |
commit | dc78df46e124d2d17b694235f89760a4f9b9a9dc (patch) | |
tree | 10c47574032c6b64f23e66940b0d0fa9ac471996 /components/dom_distiller/android | |
parent | 2e22d7c3b8b5a582612a0c466e25cf2c29542478 (diff) | |
download | chromium_src-dc78df46e124d2d17b694235f89760a4f9b9a9dc.zip chromium_src-dc78df46e124d2d17b694235f89760a4f9b9a9dc.tar.gz chromium_src-dc78df46e124d2d17b694235f89760a4f9b9a9dc.tar.bz2 |
Add support for hooking up external feedback mechanism for DOM Distiller
This adds support for injecting an external feedback reporting library for
the DOM Distiller. By default, a no-op version is used.
For feedback, it is reasonable to assume that the original URL which was
distilled is needed, and this CL also adds support for retrieving that
from Java.
BUG=319881
Review URL: https://codereview.chromium.org/222883003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261688 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/dom_distiller/android')
-rw-r--r-- | components/dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/DomDistillerUrlUtils.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/components/dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/DomDistillerUrlUtils.java b/components/dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/DomDistillerUrlUtils.java index 48f92ea..60eda9e 100644 --- a/components/dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/DomDistillerUrlUtils.java +++ b/components/dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/DomDistillerUrlUtils.java @@ -26,11 +26,21 @@ public final class DomDistillerUrlUtils { return nativeGetDistillerViewUrlFromUrl(scheme, url); } + /** + * Returns the original URL of a distillation given the viewer URL. + * + * @param url The current viewer URL. + * @return the URL of the original page. + */ + public static String getOriginalUrlFromDistillerUrl(String url) { + return nativeGetOriginalUrlFromDistillerUrl(url); + } + public static boolean isUrlReportable(String scheme, String url) { return nativeIsUrlReportable(scheme, url); } private static native String nativeGetDistillerViewUrlFromUrl(String scheme, String url); - + private static native String nativeGetOriginalUrlFromDistillerUrl(String viewerUrl); private static native boolean nativeIsUrlReportable(String scheme, String url); } |