LeOSium_webview/LeOS/patches/sharing-hub-always-use-visi...

32 lines
1.4 KiB
Diff
Raw Permalink Normal View History

2023-11-18 11:46:19 +01:00
From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Sun, 14 Aug 2022 00:53:52 +0200
Subject: sharing hub: always use visible URL
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
---
.../chrome/browser/share/ShareDelegateImpl.java | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/share/ShareDelegateImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/share/ShareDelegateImpl.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/share/ShareDelegateImpl.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/share/ShareDelegateImpl.java
@@ -184,14 +184,8 @@ public class ShareDelegateImpl implements ShareDelegate {
@VisibleForTesting
static boolean shouldFetchCanonicalUrl(final Tab currentTab) {
- WebContents webContents = currentTab.getWebContents();
- if (webContents == null) return false;
- if (webContents.getMainFrame() == null) return false;
- if (currentTab.getUrl().isEmpty()) return false;
- if (currentTab.isShowingErrorPage() || SadTab.isShowing(currentTab)) {
- return false;
- }
- return true;
+ // Bromite always uses the visible URL
+ return false;
}
private static void logCanonicalUrlResult(GURL visibleUrl, GURL canonicalUrl) {
--
2.25.1