|
|
|
@@ -11,7 +11,7 @@ Subject: ungoogled-chromium: disable safe browsing
|
|
|
|
|
chrome/browser/chrome_content_browser_client.cc | 32 +---------
|
|
|
|
|
.../file_type_policies_component_installer.cc | 14 -----
|
|
|
|
|
.../download/chrome_download_manager_delegate.cc | 17 -----
|
|
|
|
|
chrome/browser/download/download_item_model.cc | 13 ++--
|
|
|
|
|
chrome/browser/download/download_item_model.cc | 3 -
|
|
|
|
|
chrome/browser/download/download_prefs.cc | 13 +---
|
|
|
|
|
.../browser/download/download_target_determiner.cc | 24 +-------
|
|
|
|
|
.../extensions/api/downloads/downloads_api.cc | 39 +-----------
|
|
|
|
@@ -36,12 +36,12 @@ Subject: ungoogled-chromium: disable safe browsing
|
|
|
|
|
.../webui/md_downloads/md_downloads_dom_handler.h | 13 ----
|
|
|
|
|
chrome/renderer/chrome_content_renderer_client.cc | 1 -
|
|
|
|
|
components/safe_browsing/features.cc | 2 +-
|
|
|
|
|
33 files changed, 27 insertions(+), 492 deletions(-)
|
|
|
|
|
33 files changed, 22 insertions(+), 487 deletions(-)
|
|
|
|
|
|
|
|
|
|
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
|
|
|
|
--- a/chrome/browser/BUILD.gn
|
|
|
|
|
+++ b/chrome/browser/BUILD.gn
|
|
|
|
|
@@ -2619,8 +2619,6 @@ jumbo_split_static_library("browser") {
|
|
|
|
|
@@ -2621,8 +2621,6 @@ jumbo_split_static_library("browser") {
|
|
|
|
|
"download/download_commands.h",
|
|
|
|
|
"download/download_crx_util.cc",
|
|
|
|
|
"download/download_crx_util.h",
|
|
|
|
@@ -75,7 +75,7 @@ diff --git a/chrome/browser/browser_process.h b/chrome/browser/browser_process.h
|
|
|
|
|
// NOT THREAD SAFE, call only from the main thread.
|
|
|
|
|
// These functions shouldn't return NULL unless otherwise noted.
|
|
|
|
|
class BrowserProcess {
|
|
|
|
|
@@ -237,14 +229,6 @@ class BrowserProcess {
|
|
|
|
|
@@ -234,14 +226,6 @@ class BrowserProcess {
|
|
|
|
|
// on this platform (or this is a unit test).
|
|
|
|
|
virtual StatusTray* status_tray() = 0;
|
|
|
|
|
|
|
|
|
@@ -110,7 +110,7 @@ diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_pro
|
|
|
|
|
network_time_tracker_.reset();
|
|
|
|
|
#if BUILDFLAG(ENABLE_PLUGINS)
|
|
|
|
|
plugins_resource_service_.reset();
|
|
|
|
|
@@ -999,22 +996,6 @@ StatusTray* BrowserProcessImpl::status_tray() {
|
|
|
|
|
@@ -994,22 +991,6 @@ StatusTray* BrowserProcessImpl::status_tray() {
|
|
|
|
|
return status_tray_.get();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -133,7 +133,7 @@ diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_pro
|
|
|
|
|
subresource_filter::ContentRulesetService*
|
|
|
|
|
BrowserProcessImpl::subresource_filter_ruleset_service() {
|
|
|
|
|
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
|
|
|
|
@@ -1299,16 +1280,6 @@ void BrowserProcessImpl::CreateBackgroundPrintingManager() {
|
|
|
|
|
@@ -1300,16 +1281,6 @@ void BrowserProcessImpl::CreateBackgroundPrintingManager() {
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -153,7 +153,7 @@ diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_pro
|
|
|
|
|
diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_process_impl.h
|
|
|
|
|
--- a/chrome/browser/browser_process_impl.h
|
|
|
|
|
+++ b/chrome/browser/browser_process_impl.h
|
|
|
|
|
@@ -176,9 +176,6 @@ class BrowserProcessImpl : public BrowserProcess,
|
|
|
|
|
@@ -175,9 +175,6 @@ class BrowserProcessImpl : public BrowserProcess,
|
|
|
|
|
void set_background_mode_manager_for_test(
|
|
|
|
|
std::unique_ptr<BackgroundModeManager> manager) override;
|
|
|
|
|
StatusTray* status_tray() override;
|
|
|
|
@@ -163,7 +163,7 @@ diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_proc
|
|
|
|
|
subresource_filter::ContentRulesetService*
|
|
|
|
|
subresource_filter_ruleset_service() override;
|
|
|
|
|
optimization_guide::OptimizationGuideService* optimization_guide_service()
|
|
|
|
|
@@ -322,9 +319,6 @@ class BrowserProcessImpl : public BrowserProcess,
|
|
|
|
|
@@ -324,9 +321,6 @@ class BrowserProcessImpl : public BrowserProcess,
|
|
|
|
|
std::unique_ptr<BackgroundModeManager> background_mode_manager_;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
@@ -246,7 +246,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch
|
|
|
|
|
#if defined(OS_ANDROID)
|
|
|
|
|
float GetDeviceScaleAdjustment() {
|
|
|
|
|
static const float kMinFSM = 1.05f;
|
|
|
|
|
@@ -1997,7 +1973,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
|
|
|
|
|
@@ -1988,7 +1964,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
|
|
|
|
|
// Disable client-side phishing detection in the renderer if it is
|
|
|
|
|
// disabled in the Profile preferences or the browser process.
|
|
|
|
|
if (!prefs->GetBoolean(prefs::kSafeBrowsingEnabled) ||
|
|
|
|
@@ -255,7 +255,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch
|
|
|
|
|
command_line->AppendSwitch(
|
|
|
|
|
switches::kDisableClientSidePhishingDetection);
|
|
|
|
|
}
|
|
|
|
|
@@ -2675,7 +2651,7 @@ void ChromeContentBrowserClient::AllowCertificateError(
|
|
|
|
|
@@ -2666,7 +2642,7 @@ void ChromeContentBrowserClient::AllowCertificateError(
|
|
|
|
|
SSLErrorHandler::HandleSSLError(
|
|
|
|
|
web_contents, cert_error, ssl_info, request_url,
|
|
|
|
|
expired_previous_decision,
|
|
|
|
@@ -264,7 +264,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch
|
|
|
|
|
callback, SSLErrorHandler::BlockingPageReadyCallback());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -2945,8 +2921,6 @@ bool ChromeContentBrowserClient::CanCreateWindow(
|
|
|
|
|
@@ -2936,8 +2912,6 @@ bool ChromeContentBrowserClient::CanCreateWindow(
|
|
|
|
|
void ChromeContentBrowserClient::ResourceDispatcherHostCreated() {
|
|
|
|
|
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
|
|
|
|
|
|
|
|
@@ -273,7 +273,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch
|
|
|
|
|
for (size_t i = 0; i < extra_parts_.size(); ++i)
|
|
|
|
|
extra_parts_[i]->ResourceDispatcherHostCreated();
|
|
|
|
|
|
|
|
|
|
@@ -4112,7 +4086,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation(
|
|
|
|
|
@@ -4103,7 +4077,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation(
|
|
|
|
|
if (base::FeatureList::IsEnabled(features::kSSLCommittedInterstitials)) {
|
|
|
|
|
throttles.push_back(std::make_unique<SSLErrorNavigationThrottle>(
|
|
|
|
|
handle,
|
|
|
|
@@ -343,41 +343,6 @@ diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrom
|
|
|
|
|
diff --git a/chrome/browser/download/download_item_model.cc b/chrome/browser/download/download_item_model.cc
|
|
|
|
|
--- a/chrome/browser/download/download_item_model.cc
|
|
|
|
|
+++ b/chrome/browser/download/download_item_model.cc
|
|
|
|
|
@@ -69,7 +69,7 @@ class DownloadItemModelData : public base::SupportsUserData::Data {
|
|
|
|
|
|
|
|
|
|
// Danger level of the file determined based on the file type and whether
|
|
|
|
|
// there was a user action associated with the download.
|
|
|
|
|
- DownloadFileType::DangerLevel danger_level_;
|
|
|
|
|
+ safe_browsing::DownloadFileType::DangerLevel danger_level_;
|
|
|
|
|
|
|
|
|
|
// Whether the download is currently being revived.
|
|
|
|
|
bool is_being_revived_;
|
|
|
|
|
@@ -106,7 +106,7 @@ DownloadItemModelData::DownloadItemModelData()
|
|
|
|
|
: should_show_in_shelf_(true),
|
|
|
|
|
was_ui_notified_(false),
|
|
|
|
|
should_prefer_opening_in_browser_(false),
|
|
|
|
|
- danger_level_(DownloadFileType::NOT_DANGEROUS),
|
|
|
|
|
+ danger_level_(safe_browsing::DownloadFileType::NOT_DANGEROUS),
|
|
|
|
|
is_being_revived_(false) {}
|
|
|
|
|
|
|
|
|
|
} // namespace
|
|
|
|
|
@@ -376,13 +376,13 @@ void DownloadItemModel::SetShouldPreferOpeningInBrowser(bool preference) {
|
|
|
|
|
data->should_prefer_opening_in_browser_ = preference;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
-DownloadFileType::DangerLevel DownloadItemModel::GetDangerLevel() const {
|
|
|
|
|
+safe_browsing::DownloadFileType::DangerLevel DownloadItemModel::GetDangerLevel() const {
|
|
|
|
|
const DownloadItemModelData* data = DownloadItemModelData::Get(download_);
|
|
|
|
|
- return data ? data->danger_level_ : DownloadFileType::NOT_DANGEROUS;
|
|
|
|
|
+ return data ? data->danger_level_ : safe_browsing::DownloadFileType::NOT_DANGEROUS;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void DownloadItemModel::SetDangerLevel(
|
|
|
|
|
- DownloadFileType::DangerLevel danger_level) {
|
|
|
|
|
+ safe_browsing::DownloadFileType::DangerLevel danger_level) {
|
|
|
|
|
DownloadItemModelData* data = DownloadItemModelData::GetOrCreate(download_);
|
|
|
|
|
data->danger_level_ = danger_level;
|
|
|
|
|
}
|
|
|
|
|
@@ -534,9 +534,6 @@ bool DownloadItemModel::IsCommandEnabled(
|
|
|
|
|
// filename. Don't base an "Always open" decision based on it. Also
|
|
|
|
|
// exclude extensions.
|
|
|
|
|