Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f65efd7 authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

Browser: Remove send to your devices option

parent 9ab78d16
Loading
Loading
Loading
Loading
+78 −0
Original line number Diff line number Diff line
From 92cbf726cce7f13335141ab06dae3179334ae48b Mon Sep 17 00:00:00 2001
From: althafvly <althafvly@gmail.com>
Date: Fri, 20 Oct 2023 18:23:09 +0530
Subject: [PATCH] Browser: Remove send to devices option

---
 ...omeProvidedSharingOptionsProviderBase.java | 28 -------------------
 1 file changed, 28 deletions(-)

diff --git a/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/ChromeProvidedSharingOptionsProviderBase.java b/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/ChromeProvidedSharingOptionsProviderBase.java
index 9a24cac51b093..6e6885f31ae1e 100644
--- a/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/ChromeProvidedSharingOptionsProviderBase.java
+++ b/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/ChromeProvidedSharingOptionsProviderBase.java
@@ -253,7 +253,6 @@ public abstract class ChromeProvidedSharingOptionsProviderBase {
         // Only show a limited first party share selection for automotive
         if (BuildInfo.getInstance().isAutomotive) {
             mOrderedFirstPartyOptions.add(createCopyLinkFirstPartyOption());
-            maybeAddSendTabToSelfFirstPartyOption();
             maybeAddQrCodeFirstPartyOption();
             return;
         }
@@ -261,7 +260,6 @@ public abstract class ChromeProvidedSharingOptionsProviderBase {
             maybeAddCopyFirstPartyOption();
             maybeAddLongScreenshotFirstPartyOption();
             maybeAddPrintFirstPartyOption();
-            maybeAddSendTabToSelfFirstPartyOption();
             maybeAddQrCodeFirstPartyOption();
         } else {
             maybeAddWebStyleNotesFirstPartyOption();
@@ -270,22 +268,12 @@ public abstract class ChromeProvidedSharingOptionsProviderBase {
             // Always show the copy link option as some entries does not offer the change for copy
             // (e.g. feed card)
             maybeAddCopyFirstPartyOption();
-            maybeAddSendTabToSelfFirstPartyOption();
             maybeAddQrCodeFirstPartyOption();
             maybeAddPrintFirstPartyOption();
             maybeAddDownloadImageFirstPartyOption();
         }
     }
 
-    private void maybeAddSendTabToSelfFirstPartyOption() {
-        Optional<Integer> sendTabToSelfDisplayReason =
-                SendTabToSelfAndroidBridge.getEntryPointDisplayReason(mProfile, mUrl);
-        if (sendTabToSelfDisplayReason.isPresent()
-                || !ChromeFeatureList.isEnabled(ChromeFeatureList.SEND_TAB_TO_SELF_SIGNIN_PROMO)) {
-            mOrderedFirstPartyOptions.add(createSendTabToSelfFirstPartyOption());
-        }
-    }
-
     private void maybeAddQrCodeFirstPartyOption() {
     }
 
@@ -422,22 +410,6 @@ public abstract class ChromeProvidedSharingOptionsProviderBase {
                 .build();
     }
 
-    private FirstPartyOption createSendTabToSelfFirstPartyOption() {
-        return new FirstPartyOptionBuilder(
-                ContentType.LINK_PAGE_VISIBLE, ContentType.LINK_PAGE_NOT_VISIBLE, ContentType.IMAGE)
-                .setDetailedContentTypesToDisableFor(
-                        DetailedContentType.WEB_NOTES, DetailedContentType.SCREENSHOT)
-                .setIcon(R.drawable.send_tab, R.string.sharing_send_tab_to_self)
-                .setFeatureNameForMetrics(USER_ACTION_SEND_TAB_TO_SELF_SELECTED)
-                .setOnClickCallback((view) -> {
-                    SendTabToSelfCoordinator sttsCoordinator = new SendTabToSelfCoordinator(
-                            mActivity, mWindowAndroid, mUrl, mShareParams.getTitle(),
-                            mBottomSheetController, mProfile, mDeviceLockActivityLauncher);
-                    sttsCoordinator.show();
-                })
-                .build();
-    }
-
     private FirstPartyOption createPrintingFirstPartyOption() {
         return new FirstPartyOptionBuilder(ContentType.LINK_PAGE_VISIBLE)
                 .setIcon(R.drawable.sharing_print, R.string.print_share_activity_title)
-- 
2.34.1
+2 −0
Original line number Diff line number Diff line
@@ -56,3 +56,5 @@
0002-Browser-Remove-some-preferences-from-UI.patch
0003-Browser-fix-adblock-rebranding.patch
0004-Browser-Avoid-using-cached-legacy-pref-value-for-tab.patch

0001-Browser-Remove-send-to-devices-option.patch