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

Unified Diff: chrome/browser/android/download/chrome_download_delegate.cc

Issue 1288183004: jni_generator: Make all object-returning natives return ScopedJavaLocalRef. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add some newlines for readability Created 5 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
Index: chrome/browser/android/download/chrome_download_delegate.cc
diff --git a/chrome/browser/android/download/chrome_download_delegate.cc b/chrome/browser/android/download/chrome_download_delegate.cc
index 6f731f5a107660d75aa4e83750c52de9cfaa4df0..9dd66ee5fa5b21d1d54dcb0de4481b41fb0201d6 100644
--- a/chrome/browser/android/download/chrome_download_delegate.cc
+++ b/chrome/browser/android/download/chrome_download_delegate.cc
@@ -23,12 +23,13 @@
#include "ui/base/l10n/l10n_util.h"
// Gets the download warning text for the given file name.
-static jstring GetDownloadWarningText(
- JNIEnv* env, jclass clazz, jstring filename) {
+static ScopedJavaLocalRef<jstring> GetDownloadWarningText(JNIEnv* env,
+ jclass clazz,
+ jstring filename) {
return base::android::ConvertUTF8ToJavaString(
env, l10n_util::GetStringFUTF8(
- IDS_PROMPT_DANGEROUS_DOWNLOAD,
- base::android::ConvertJavaStringToUTF16(env, filename))).Release();
+ IDS_PROMPT_DANGEROUS_DOWNLOAD,
+ base::android::ConvertJavaStringToUTF16(env, filename)));
}
// Returns true if a file name is dangerous, or false otherwise.

Powered by Google App Engine
This is Rietveld 408576698