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

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

Issue 1308363003: Revert of jni_generator: Make all object-returning natives return ScopedJavaLocalRef. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/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..7dcef2583d263abc792b135f8825af790effe5f1 100644
--- a/chrome/browser/dom_distiller/tab_utils_android.cc
+++ b/chrome/browser/dom_distiller/tab_utils_android.cc
@@ -40,10 +40,9 @@
::DistillAndView(source_web_contents, destination_web_contents);
}
-ScopedJavaLocalRef<jstring> GetFormattedUrlFromOriginalDistillerUrl(
- JNIEnv* env,
- jclass clazz,
- jstring j_url) {
+jstring GetFormattedUrlFromOriginalDistillerUrl(JNIEnv* env,
+ jclass clazz,
+ jstring j_url) {
GURL url(base::android::ConvertJavaStringToUTF8(env, j_url));
Profile* profile = ProfileManager::GetLastUsedProfile();
std::string languages; // Empty if Profile cannot be retrieved.
@@ -58,9 +57,10 @@
// and pastes it into another program, that program may think the URL ends at
// the space.
return base::android::ConvertUTF16ToJavaString(
- env, url_formatter::FormatUrl(
- url, languages, url_formatter::kFormatUrlOmitAll,
- net::UnescapeRule::NORMAL, nullptr, nullptr, nullptr));
+ env, url_formatter::FormatUrl(
+ url, languages, url_formatter::kFormatUrlOmitAll,
+ net::UnescapeRule::NORMAL, nullptr, nullptr, nullptr))
+ .Release();
}
} // namespace android

Powered by Google App Engine
This is Rietveld 408576698