From 7a6138993d785e42c2a871d62aa09d9ffa7eeaea Mon Sep 17 00:00:00 2001 From: Albert Tang Date: Thu, 24 Oct 2019 14:05:07 -0500 Subject: [PATCH] Apply xsmile's suggestions --- ...001-fix-building-without-safebrowsing.patch | 18 ++++++------------ .../block-trk-and-subdomains.patch | 2 +- ...ag-to-configure-extension-downloading.patch | 2 +- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/patches/core/inox-patchset/0001-fix-building-without-safebrowsing.patch b/patches/core/inox-patchset/0001-fix-building-without-safebrowsing.patch index 8f02f472..3ab3cac9 100644 --- a/patches/core/inox-patchset/0001-fix-building-without-safebrowsing.patch +++ b/patches/core/inox-patchset/0001-fix-building-without-safebrowsing.patch @@ -225,26 +225,20 @@ } else if (path_without_query == "/clock") { interstitial_delegate.reset(CreateBadClockBlockingPage(web_contents)); } else if (path_without_query == "/lookalike") { -@@ -502,16 +389,12 @@ void InterstitialHTMLSource::StartDataRe +@@ -500,13 +387,6 @@ void InterstitialHTMLSource::StartDataRe + } else if (path_without_query == "/origin_policy") { + interstitial_delegate.reset( CreateOriginPolicyInterstitialPage(web_contents)); - } - +- } +- - if (path_without_query == "/quietsafebrowsing") { - TestSafeBrowsingBlockingPageQuiet* blocking_page = - CreateSafeBrowsingQuietBlockingPage(web_contents); - interstitial_delegate.reset(blocking_page); - html = blocking_page->GetHTML(); #if BUILDFLAG(ENABLE_SUPERVISED_USERS) -- } else if (path_without_query == "/supervised_user") { -+ if (path_without_query == "/supervised_user") { + } else if (path_without_query == "/supervised_user") { html = GetSupervisedUserInterstitialHTML(path); -+ } - #endif -- } else if (interstitial_delegate.get()) { -+ if (interstitial_delegate.get()) { - html = interstitial_delegate.get()->GetHTMLContents(); - } else { - html = ui::ResourceBundle::GetSharedInstance().DecompressDataResource( --- a/chrome/browser/extensions/blacklist_state_fetcher.cc +++ b/chrome/browser/extensions/blacklist_state_fetcher.cc @@ -32,28 +32,8 @@ BlacklistStateFetcher::~BlacklistStateFe diff --git a/patches/core/ungoogled-chromium/block-trk-and-subdomains.patch b/patches/core/ungoogled-chromium/block-trk-and-subdomains.patch index aecb54d2..e7545e44 100644 --- a/patches/core/ungoogled-chromium/block-trk-and-subdomains.patch +++ b/patches/core/ungoogled-chromium/block-trk-and-subdomains.patch @@ -259,7 +259,7 @@ new net::URLRequestJobFactoryImpl()); // Keep ProtocolHandlers added in sync with // CastContentBrowserClient::IsHandledURL(). -+ bool set_protocol = false ++ bool set_protocol = false; for (content::ProtocolHandlerMap::iterator it = protocol_handlers->begin(); it != protocol_handlers->end(); ++it) { diff --git a/patches/extra/ungoogled-chromium/add-flag-to-configure-extension-downloading.patch b/patches/extra/ungoogled-chromium/add-flag-to-configure-extension-downloading.patch index 6bd57cac..122b9a5d 100644 --- a/patches/extra/ungoogled-chromium/add-flag-to-configure-extension-downloading.patch +++ b/patches/extra/ungoogled-chromium/add-flag-to-configure-extension-downloading.patch @@ -114,7 +114,7 @@ - return DownloadConfirmationReason::NONE; + if (!download_crx_util::ShouldDownloadAsRegularFile()) { + // Don't prompt for extension downloads. -+ if (download_crx_util::IsExtensionDownload(*download_) || ++ if (download_crx_util::IsTrustedExtensionDownload(GetProfile(), *download_) || + filename.MatchesExtension(extensions::kExtensionFileExtension)) + return DownloadConfirmationReason::NONE; + }