diff options
Diffstat (limited to 'www/chromium-uc/patches/extra/ungoogled-chromium/enable-page-saving-on-more-pages.patch')
| -rw-r--r-- | www/chromium-uc/patches/extra/ungoogled-chromium/enable-page-saving-on-more-pages.patch | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/enable-page-saving-on-more-pages.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/enable-page-saving-on-more-pages.patch deleted file mode 100644 index a983beb..0000000 --- a/www/chromium-uc/patches/extra/ungoogled-chromium/enable-page-saving-on-more-pages.patch +++ /dev/null | |||
| @@ -1,79 +0,0 @@ | |||
| 1 | # Add more URL schemes allowed for saving | ||
| 2 | |||
| 3 | --- chrome/browser/ui/browser_commands.cc.orig | ||
| 4 | +++ chrome/browser/ui/browser_commands.cc | ||
| 5 | @@ -440,11 +440,6 @@ int GetContentRestrictions(const Browser | ||
| 6 | CoreTabHelper* core_tab_helper = | ||
| 7 | CoreTabHelper::FromWebContents(current_tab); | ||
| 8 | content_restrictions = core_tab_helper->content_restrictions(); | ||
| 9 | - NavigationEntry* last_committed_entry = | ||
| 10 | - current_tab->GetController().GetLastCommittedEntry(); | ||
| 11 | - if (!content::IsSavableURL( | ||
| 12 | - last_committed_entry ? last_committed_entry->GetURL() : GURL())) | ||
| 13 | - content_restrictions |= CONTENT_RESTRICTION_SAVE; | ||
| 14 | } | ||
| 15 | return content_restrictions; | ||
| 16 | } | ||
| 17 | @@ -1342,8 +1337,7 @@ bool CanSavePage(const Browser* browser) | ||
| 18 | prefs::kAllowFileSelectionDialogs)) { | ||
| 19 | return false; | ||
| 20 | } | ||
| 21 | - return !browser->is_type_devtools() && | ||
| 22 | - !(GetContentRestrictions(browser) & CONTENT_RESTRICTION_SAVE); | ||
| 23 | + return true; | ||
| 24 | } | ||
| 25 | |||
| 26 | void Print(Browser* browser) { | ||
| 27 | --- components/offline_pages/core/offline_page_model.cc.orig | ||
| 28 | +++ components/offline_pages/core/offline_page_model.cc | ||
| 29 | @@ -22,7 +22,7 @@ OfflinePageModel::SavePageParams::~SaveP | ||
| 30 | |||
| 31 | // static | ||
| 32 | bool OfflinePageModel::CanSaveURL(const GURL& url) { | ||
| 33 | - return url.is_valid() && url.SchemeIsHTTPOrHTTPS(); | ||
| 34 | + return url.is_valid(); | ||
| 35 | } | ||
| 36 | |||
| 37 | OfflinePageModel::OfflinePageModel() = default; | ||
| 38 | --- content/common/url_schemes.cc.orig | ||
| 39 | +++ content/common/url_schemes.cc | ||
| 40 | @@ -23,6 +23,9 @@ namespace { | ||
| 41 | bool g_registered_url_schemes = false; | ||
| 42 | |||
| 43 | const char* const kDefaultSavableSchemes[] = { | ||
| 44 | + url::kAboutScheme, | ||
| 45 | + url::kBlobScheme, | ||
| 46 | + url::kContentScheme, | ||
| 47 | url::kHttpScheme, | ||
| 48 | url::kHttpsScheme, | ||
| 49 | url::kFileScheme, | ||
| 50 | @@ -30,7 +33,13 @@ const char* const kDefaultSavableSchemes | ||
| 51 | url::kFtpScheme, | ||
| 52 | kChromeDevToolsScheme, | ||
| 53 | kChromeUIScheme, | ||
| 54 | - url::kDataScheme | ||
| 55 | + url::kDataScheme, | ||
| 56 | + url::kJavaScriptScheme, | ||
| 57 | + url::kMailToScheme, | ||
| 58 | + url::kWsScheme, | ||
| 59 | + url::kWssScheme, | ||
| 60 | + kGuestScheme, | ||
| 61 | + kViewSourceScheme | ||
| 62 | }; | ||
| 63 | |||
| 64 | // These lists are lazily initialized below and are leaked on shutdown to | ||
| 65 | --- content/public/common/url_utils.cc.orig | ||
| 66 | +++ content/public/common/url_utils.cc | ||
| 67 | @@ -26,11 +26,7 @@ bool HasWebUIScheme(const GURL& url) { | ||
| 68 | } | ||
| 69 | |||
| 70 | bool IsSavableURL(const GURL& url) { | ||
| 71 | - for (auto& scheme : GetSavableSchemes()) { | ||
| 72 | - if (url.SchemeIs(scheme)) | ||
| 73 | - return true; | ||
| 74 | - } | ||
| 75 | - return false; | ||
| 76 | + return true; | ||
| 77 | } | ||
| 78 | |||
| 79 | bool IsURLHandledByNetworkStack(const GURL& url) { | ||
