Index: chrome/browser/android/service_tab_launcher.cc |
diff --git a/chrome/browser/android/service_tab_launcher.cc b/chrome/browser/android/service_tab_launcher.cc |
index d3236351f76a65ee6a73671214e9f2b0fc221c01..5840690d045471a58b643fd12584eb63552c77ca 100644 |
--- a/chrome/browser/android/service_tab_launcher.cc |
+++ b/chrome/browser/android/service_tab_launcher.cc |
@@ -65,10 +65,14 @@ void ServiceTabLauncher::LaunchTab(content::BrowserContext* browser_context, |
base::MakeUnique<TabLaunchedCallback>(callback)); |
DCHECK_GE(request_id, 1); |
- Java_ServiceTabLauncher_launchTab(env, request_id, |
- browser_context->IsOffTheRecord(), url, |
- static_cast<int>(disposition), referrer_url, |
- params.referrer.policy, headers, post_data); |
+ ScopedJavaLocalRef<jstring> redirect_url = ConvertUTF8ToJavaString( |
+ env, |
+ params.redirect_chain.empty() ? "" : params.redirect_chain.back().spec()); |
+ |
+ Java_ServiceTabLauncher_launchTab( |
+ env, request_id, browser_context->IsOffTheRecord(), redirect_url, url, |
+ static_cast<int>(disposition), referrer_url, params.referrer.policy, |
+ headers, post_data); |
} |
void ServiceTabLauncher::OnTabLaunched(int request_id, |