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

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: Styling 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 50b0266060c1ea9bd15875e3bde1887c3990e064..4b70bbdec29967fd8fd80056638b8b5f4a6c934e 100644
--- a/components/dom_distiller/core/url_utils_android.cc
+++ b/components/dom_distiller/core/url_utils_android.cc
@@ -63,6 +63,17 @@ jboolean IsUrlDistillable(JNIEnv* env, jclass clazz, jstring j_url) {
return dom_distiller::url_utils::IsUrlDistillable(url);
}
+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();
robliao 2014/08/14 00:53:02 I would format this as follows: return base::and
sunangel 2014/08/14 17:40:05 Done.
+}
+
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