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

Unified Diff: components/dom_distiller/core/url_utils_android.cc

Issue 442503002: Retrieve article original URL from entryID (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: string reference Created 6 years, 4 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 | « components/dom_distiller/core/url_utils.cc ('k') | components/dom_distiller/core/url_utils_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/dom_distiller/core/url_utils_android.cc
diff --git a/components/dom_distiller/core/url_utils_android.cc b/components/dom_distiller/core/url_utils_android.cc
index f94530206881ed8ce10b8b511d38f4c19692af6b..d700ff64a3e46a1e14c84de3632db7c004205669 100644
--- a/components/dom_distiller/core/url_utils_android.cc
+++ b/components/dom_distiller/core/url_utils_android.cc
@@ -68,6 +68,18 @@ jstring GetIsDistillableJs(JNIEnv* env, jclass clazz) {
env, dom_distiller::url_utils::GetIsDistillableJs()).Release();
}
+jstring GetValueForKeyInUrl(JNIEnv* env,
+ jclass clazz,
+ jstring j_url,
+ jstring j_key) {
+ GURL url(base::android::ConvertJavaStringToUTF8(env, j_url));
+ std::string key = base::android::ConvertJavaStringToUTF8(env, j_key);
+ return base::android::
+ ConvertUTF8ToJavaString(
+ env, dom_distiller::url_utils::GetValueForKeyInUrl(url, key))
+ .Release();
+}
+
bool RegisterUrlUtils(JNIEnv* env) { return RegisterNativesImpl(env); }
} // namespace android
« no previous file with comments | « components/dom_distiller/core/url_utils.cc ('k') | components/dom_distiller/core/url_utils_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698