Commit fb9f5466 authored by John Abd-El-Malek's avatar John Abd-El-Malek Committed by Commit Bot

Fix internal build after r742662 and also a crash when creating throttles for service workers.

That method I removed is used by the internal repo.

Bug: 1040143
Change-Id: I9d523aae2dd42dfd7dcf01190b6ec669de7a10ad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2065592
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Liquan (Max) Gu <maxlg@chromium.org>
Reviewed-by: default avatarLiquan (Max) Gu <maxlg@chromium.org>
Reviewed-by: default avatarSky Malice <skym@chromium.org>
Auto-Submit: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#742903}
parent 428d0018
...@@ -819,7 +819,7 @@ public class CustomTabsConnection { ...@@ -819,7 +819,7 @@ public class CustomTabsConnection {
*/ */
public void setClientDataHeaderForNewTab( public void setClientDataHeaderForNewTab(
CustomTabsSessionToken session, WebContents webContents) { CustomTabsSessionToken session, WebContents webContents) {
String header = mClientManager.getClientDataHeaderValue(session); String header = getClientDataHeaderValueForSession(session);
if (!TextUtils.isEmpty(header)) { if (!TextUtils.isEmpty(header)) {
CustomTabsConnectionJni.get().setClientDataHeader(webContents, header); CustomTabsConnectionJni.get().setClientDataHeader(webContents, header);
} }
...@@ -1043,6 +1043,13 @@ public class CustomTabsConnection { ...@@ -1043,6 +1043,13 @@ public class CustomTabsConnection {
mClientManager.setSendNavigationInfoForSession(session, send); mClientManager.setSendNavigationInfoForSession(session, send);
} }
/**
* See {@link ClientManager#setClientDataHeaderValue}.
*/
String getClientDataHeaderValueForSession(CustomTabsSessionToken session) {
return mClientManager.getClientDataHeaderValue(session);
}
/** /**
* Extracts the creator package name from the intent. * Extracts the creator package name from the intent.
* @param intent The intent to get the package name from. * @param intent The intent to get the package name from.
......
...@@ -4269,12 +4269,14 @@ ChromeContentBrowserClient::CreateURLLoaderThrottles( ...@@ -4269,12 +4269,14 @@ ChromeContentBrowserClient::CreateURLLoaderThrottles(
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
std::string client_data_header; std::string client_data_header;
auto* web_contents = WebContents::FromFrameTreeNodeId(frame_tree_node_id); if (frame_tree_node_id != content::RenderFrameHost::kNoFrameTreeNodeId) {
auto* client_data_header_observer = auto* web_contents = WebContents::FromFrameTreeNodeId(frame_tree_node_id);
customtabs::ClientDataHeaderWebContentsObserver::FromWebContents( auto* client_data_header_observer =
web_contents); customtabs::ClientDataHeaderWebContentsObserver::FromWebContents(
if (client_data_header_observer) web_contents);
client_data_header = client_data_header_observer->header(); if (client_data_header_observer)
client_data_header = client_data_header_observer->header();
}
#endif #endif
chrome::mojom::DynamicParams dynamic_params = { chrome::mojom::DynamicParams dynamic_params = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment