2
0
mirror of https://codeberg.org/kiss-community/repo synced 2024-12-25 16:50:07 -07:00
repo/testing/chromium/patches/fix-building-without-safebrowsing.patch

75 lines
2.9 KiB
Diff

# Additional changes to Inox's fix-building-without-safebrowsing.patch
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -5307,20 +5307,7 @@ safe_browsing::UrlCheckerDelegate*
ChromeContentBrowserClient::GetSafeBrowsingUrlCheckerDelegate(
content::ResourceContext* resource_context) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
-
- ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context);
- if (!io_data->safe_browsing_enabled()->GetValue())
- return nullptr;
-
- // |safe_browsing_service_| may be unavailable in tests.
- if (safe_browsing_service_ && !safe_browsing_url_checker_delegate_) {
- safe_browsing_url_checker_delegate_ =
- base::MakeRefCounted<safe_browsing::UrlCheckerDelegateImpl>(
- safe_browsing_service_->database_manager(),
- safe_browsing_service_->ui_manager());
- }
-
- return safe_browsing_url_checker_delegate_.get();
+ return nullptr;
}
base::Optional<std::string>
--- a/chrome/browser/download/download_item_model.cc
+++ b/chrome/browser/download/download_item_model.cc
@@ -22,9 +22,6 @@
#include "chrome/browser/download/download_stats.h"
#include "chrome/browser/download/offline_item_utils.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/safe_browsing/download_protection/download_feedback_service.h"
-#include "chrome/common/safe_browsing/download_file_types.pb.h"
-#include "chrome/common/safe_browsing/file_type_policies.h"
#include "chrome/grit/chromium_strings.h"
#include "chrome/grit/generated_resources.h"
#include "components/download/public/common/download_danger_type.h"
@@ -37,7 +34,6 @@
using base::TimeDelta;
using download::DownloadItem;
-using safe_browsing::DownloadFileType;
namespace {
@@ -264,14 +260,7 @@ bool DownloadItemModel::IsMalicious() co
}
bool DownloadItemModel::ShouldAllowDownloadFeedback() const {
-#if defined(FULL_SAFE_BROWSING)
- if (!IsDangerous())
- return false;
- return safe_browsing::DownloadFeedbackService::IsEnabledForDownload(
- *download_);
-#else
return false;
-#endif
}
bool DownloadItemModel::ShouldRemoveFromShelfWhenComplete() const {
--- a/chrome/browser/ui/views/safe_browsing/password_reuse_modal_warning_dialog.cc
+++ b/chrome/browser/ui/views/safe_browsing/password_reuse_modal_warning_dialog.cc
@@ -58,9 +58,7 @@ PasswordReuseModalWarningDialog::Passwor
SetLayoutManager(std::make_unique<views::FillLayout>());
views::Label* message_body_label = new views::Label(
- service_
- ? service_->GetWarningDetailText(password_type)
- : l10n_util::GetStringUTF16(IDS_PAGE_INFO_CHANGE_PASSWORD_DETAILS));
+ l10n_util::GetStringUTF16(IDS_PAGE_INFO_CHANGE_PASSWORD_DETAILS));
message_body_label->SetMultiLine(true);
message_body_label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
message_body_label->SetHandlesTooltips(false);