Revert "[cr146][Android] Changed shareDelegate arg at ChromeContextMenuPopulator.ctor"

This reverts commit 7d23353a12adf000a22615fd1d07ed389e9fd94c.

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/ecc16f6754610b4e29b7dde1748bea45b3e48a9c

	Revert (partial) "Fix @Nullable annotation for ChromeContextMenuPopulator's ShareDelegate"

	This reverts commit c6562cde86eaf48819f83a7bd68e37b37626e51b.

	Reason for revert:
	The Suspect CL https://chromium-review.googlesource.com/q/Icc52e361fd3c5f64ef4ab1ff51397d841bc13f64 is highly likely the cause of the crash. Please see the crash report http://crash/d477a2ee4d2284d8.
	Rebase the Revert CL on top of main branch with conflicts allowed option to prevent false positive merge conflicts.

	If you agree with the revert CL, please approve it and mark as Commit-Queue +2 to submit it.

	More details can be found in the go/crash-revert-cls-creation.

	Original change's description:
	> Fix @Nullable annotation for ChromeContextMenuPopulator's ShareDelegate
	>
	> And switch it to not be a Supplier, since nothing currently requires it
	> to be one.
	>
	> Bug: 467389696
	> Change-Id: Icc52e361fd3c5f64ef4ab1ff51397d841bc13f64
	> Cq-Include-Trybots: luci.chrome.try:android-internal-dbg,android-internal-binary-size
	> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7542574
	> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
	> Commit-Queue: Andrew Grieve <agrieve@chromium.org>
	> Cr-Commit-Position: refs/heads/main@{#1579495}
	>
	Crash Bug: 482849462

	Change-Id: I6042384ff35cd6d3747fa2dab28607fe243e18f8
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7555790
This commit is contained in:
AlexeyBarabash
2026-02-26 14:14:55 +00:00
committed by Claudio DeSouza
parent ff7a025df7
commit 4accb1d201
3 changed files with 3 additions and 5 deletions
@@ -9,7 +9,6 @@ import android.content.Context;
import androidx.browser.customtabs.CustomContentAction;
import org.chromium.build.annotations.Nullable;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.profiles.Profile;
import org.chromium.chrome.browser.share.ShareDelegate;
@@ -21,6 +20,7 @@ import org.chromium.components.embedder_support.contextmenu.ContextMenuParams;
import org.chromium.url_sanitizer.mojom.UrlSanitizerService;
import java.util.List;
import java.util.function.Supplier;
public class BraveChromeContextMenuPopulator extends ChromeContextMenuPopulator {
// To be deleted via bytecode and super field to be used
@@ -30,7 +30,7 @@ public class BraveChromeContextMenuPopulator extends ChromeContextMenuPopulator
public BraveChromeContextMenuPopulator(
TabContextMenuItemDelegate itemDelegate,
@Nullable ShareDelegate shareDelegate,
Supplier<ShareDelegate> shareDelegate,
List<CustomContentAction> customContentActions,
@ContextMenuMode int mode,
Context context,