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

Unified Diff: chrome/browser/dom_distiller/tab_utils_android.cc

Issue 1312153003: jni_generator: Pass object parameters as JavaParamRef. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 3 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/browser/dom_distiller/tab_utils_android.cc
diff --git a/chrome/browser/dom_distiller/tab_utils_android.cc b/chrome/browser/dom_distiller/tab_utils_android.cc
index fdf38580167a44c5a8295c80696342078a37a795..b54fc7561802e210c668d7c175b837822e3a4703 100644
--- a/chrome/browser/dom_distiller/tab_utils_android.cc
+++ b/chrome/browser/dom_distiller/tab_utils_android.cc
@@ -22,17 +22,17 @@
namespace android {
void DistillCurrentPageAndView(JNIEnv* env,
- jclass clazz,
- jobject j_web_contents) {
+ const JavaParamRef<jclass>& clazz,
+ const JavaParamRef<jobject>& j_web_contents) {
content::WebContents* web_contents =
content::WebContents::FromJavaWebContents(j_web_contents);
::DistillCurrentPageAndView(web_contents);
}
void DistillAndView(JNIEnv* env,
- jclass clazz,
- jobject j_source_web_contents,
- jobject j_destination_web_contents) {
+ const JavaParamRef<jclass>& clazz,
+ const JavaParamRef<jobject>& j_source_web_contents,
+ const JavaParamRef<jobject>& j_destination_web_contents) {
content::WebContents* source_web_contents =
content::WebContents::FromJavaWebContents(j_source_web_contents);
content::WebContents* destination_web_contents =
@@ -42,8 +42,8 @@ void DistillAndView(JNIEnv* env,
ScopedJavaLocalRef<jstring> GetFormattedUrlFromOriginalDistillerUrl(
JNIEnv* env,
- jclass clazz,
- jstring j_url) {
+ const JavaParamRef<jclass>& clazz,
+ const JavaParamRef<jstring>& j_url) {
GURL url(base::android::ConvertJavaStringToUTF8(env, j_url));
Profile* profile = ProfileManager::GetLastUsedProfile();
std::string languages; // Empty if Profile cannot be retrieved.

Powered by Google App Engine
This is Rietveld 408576698