commit a0c108527676be8226cbc43e7e17f5bd2672a919 parent 45b7fe33fcca66111d3f1bba4b75e5438362dd80 Author: Shokara Kou <kou@13f0.net> Date: Wed, 8 Jun 2022 09:01:55 -0400 Revert "update ugc to 100.0.4896.75" This reverts commit 45b7fe33fcca66111d3f1bba4b75e5438362dd80. Diffstat:
104 files changed, 3131 insertions(+), 2934 deletions(-)
diff --git a/www/chromium-uc/Makefile b/www/chromium-uc/Makefile @@ -8,7 +8,7 @@ DPB_PROPERTIES= parallel parallel2 COMMENT= Chromium browser -V= 100.0.4896.75 +V= 96.0.4664.110 REVISION= 1 diff --git a/www/chromium-uc/distinfo b/www/chromium-uc/distinfo @@ -1,2 +1,2 @@ -SHA256 (chromium-100.0.4896.75.tar.xz) = JE7TUt+qGrax8Id8SIT9F6p9cTP6UvEpqfsBMl6gwMA= -SIZE (chromium-100.0.4896.75.tar.xz) = 1358118152 +SHA256 (chromium-96.0.4664.110.tar.xz) = NqmdKcLpOpl1vlNkjyzT/6TuQ3MPIXouftiMGQGmceg= +SIZE (chromium-96.0.4664.110.tar.xz) = 1209944416 diff --git a/www/chromium-uc/patches/core/bromite/disable-fetching-field-trials.patch b/www/chromium-uc/patches/core/bromite/disable-fetching-field-trials.patch @@ -8,8 +8,8 @@ Subject: Disable fetching of all field trials .../variations/service/variations_service.cc | 12 +----------- 2 files changed, 5 insertions(+), 26 deletions(-) ---- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java -+++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java +--- chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java.orig ++++ chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java @@ -105,11 +105,7 @@ public abstract class ChromeFeatureList * the specified parameter does not exist. */ @@ -65,9 +65,9 @@ Subject: Disable fetching of all field trials } /* Alphabetical: */ ---- a/components/variations/service/variations_service.cc -+++ b/components/variations/service/variations_service.cc -@@ -234,17 +234,7 @@ bool GetInstanceManipulations(const net: +--- components/variations/service/variations_service.cc.orig ++++ components/variations/service/variations_service.cc +@@ -238,17 +238,7 @@ bool GetInstanceManipulations(const net: // Variations seed fetching is only enabled in official Chrome builds, if a URL // is specified on the command line, and for testing. bool IsFetchingEnabled() { diff --git a/www/chromium-uc/patches/core/debian/disable/unrar.patch b/www/chromium-uc/patches/core/debian/disable/unrar.patch @@ -2,19 +2,19 @@ description: disable support for safe browsing inspection of rar files author: Michael Gilbert <mgilbert@debian.org> bug: http://bugs.debian.org/914487 ---- a/chrome/browser/safe_browsing/download_protection/file_analyzer.cc -+++ b/chrome/browser/safe_browsing/download_protection/file_analyzer.cc -@@ -97,7 +97,7 @@ void FileAnalyzer::Start(const base::Fil +--- chrome/browser/safe_browsing/download_protection/file_analyzer.cc.orig ++++ chrome/browser/safe_browsing/download_protection/file_analyzer.cc +@@ -95,7 +95,7 @@ void FileAnalyzer::Start(const base::Fil if (inspection_type == DownloadFileType::ZIP) { StartExtractZipFeatures(); } else if (inspection_type == DownloadFileType::RAR) { - StartExtractRarFeatures(); + LOG(WARNING) << "Safebrowser inspection of rar files is disabled in this build"; - #if BUILDFLAG(IS_MAC) + #if defined(OS_MAC) } else if (inspection_type == DownloadFileType::DMG) { StartExtractDmgFeatures(); ---- a/chrome/common/safe_browsing/BUILD.gn -+++ b/chrome/common/safe_browsing/BUILD.gn +--- chrome/common/safe_browsing/BUILD.gn.orig ++++ chrome/common/safe_browsing/BUILD.gn @@ -58,39 +58,6 @@ if (safe_browsing_mode == 1) { public_deps = [ "//components/safe_browsing/core/common/proto:csd_proto" ] } @@ -63,17 +63,17 @@ bug: http://bugs.debian.org/914487 "//components/safe_browsing/core/common", ] ---- a/chrome/services/file_util/safe_archive_analyzer.cc -+++ b/chrome/services/file_util/safe_archive_analyzer.cc -@@ -6,7 +6,6 @@ - +--- chrome/services/file_util/safe_archive_analyzer.cc.orig ++++ chrome/services/file_util/safe_archive_analyzer.cc +@@ -7,7 +7,6 @@ + #include "base/macros.h" #include "build/build_config.h" #include "chrome/common/safe_browsing/archive_analyzer_results.h" -#include "chrome/common/safe_browsing/rar_analyzer.h" #include "chrome/common/safe_browsing/zip_analyzer.h" - #if BUILDFLAG(IS_MAC) -@@ -46,8 +45,7 @@ void SafeArchiveAnalyzer::AnalyzeRarFile + #if defined(OS_MAC) +@@ -47,8 +46,7 @@ void SafeArchiveAnalyzer::AnalyzeRarFile AnalyzeRarFileCallback callback) { DCHECK(rar_file.IsValid()); diff --git a/www/chromium-uc/patches/core/inox-patchset/0001-fix-building-without-safebrowsing.patch b/www/chromium-uc/patches/core/inox-patchset/0001-fix-building-without-safebrowsing.patch @@ -1,6 +1,6 @@ ---- a/chrome/browser/BUILD.gn -+++ b/chrome/browser/BUILD.gn -@@ -2174,7 +2174,6 @@ static_library("browser") { +--- chrome/browser/BUILD.gn.orig ++++ chrome/browser/BUILD.gn +@@ -2195,7 +2195,6 @@ static_library("browser") { "//components/reputation/core:proto", "//components/resources", "//components/safe_browsing/content/browser", @@ -8,7 +8,7 @@ "//components/safe_browsing/content/browser:safe_browsing_service", "//components/safe_browsing/content/browser/password_protection", "//components/safe_browsing/content/browser/web_ui", -@@ -3719,8 +3718,6 @@ static_library("browser") { +@@ -3706,8 +3705,6 @@ static_library("browser") { "download/download_commands.h", "download/download_crx_util.cc", "download/download_crx_util.h", @@ -17,9 +17,9 @@ "download/download_dir_policy_handler.cc", "download/download_dir_policy_handler.h", "download/download_dir_util.cc", ---- a/chrome/browser/browser_process.h -+++ b/chrome/browser/browser_process.h -@@ -54,10 +54,6 @@ class NetworkQualityTracker; +--- chrome/browser/browser_process.h.orig ++++ chrome/browser/browser_process.h +@@ -55,10 +55,6 @@ class NetworkQualityTracker; class SharedURLLoaderFactory; } @@ -30,7 +30,7 @@ namespace subresource_filter { class RulesetService; } -@@ -210,9 +206,6 @@ class BrowserProcess { +@@ -218,9 +214,6 @@ class BrowserProcess { // on this platform (or this is a unit test). virtual StatusTray* status_tray() = 0; @@ -40,8 +40,8 @@ // Returns the service providing versioned storage for rules used by the Safe // Browsing subresource filter. virtual subresource_filter::RulesetService* ---- a/chrome/browser/browser_process_impl.cc -+++ b/chrome/browser/browser_process_impl.cc +--- chrome/browser/browser_process_impl.cc.orig ++++ chrome/browser/browser_process_impl.cc @@ -70,7 +70,6 @@ #include "chrome/browser/printing/print_preview_dialog_controller.h" #include "chrome/browser/profiles/profile_manager.h" @@ -50,7 +50,7 @@ #include "chrome/browser/shell_integration.h" #include "chrome/browser/site_isolation/prefs_observer.h" #include "chrome/browser/ssl/secure_origin_prefs_observer.h" -@@ -393,8 +392,6 @@ void BrowserProcessImpl::StartTearDown() +@@ -395,8 +394,6 @@ void BrowserProcessImpl::StartTearDown() metrics_services_manager_.reset(); intranet_redirect_detector_.reset(); @@ -59,7 +59,7 @@ network_time_tracker_.reset(); #if BUILDFLAG(ENABLE_PLUGINS) plugins_resource_service_.reset(); -@@ -1028,14 +1025,6 @@ StatusTray* BrowserProcessImpl::status_t +@@ -1030,14 +1027,6 @@ StatusTray* BrowserProcessImpl::status_t return status_tray_.get(); } @@ -74,7 +74,7 @@ subresource_filter::RulesetService* BrowserProcessImpl::subresource_filter_ruleset_service() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); -@@ -1280,26 +1269,6 @@ void BrowserProcessImpl::CreateBackgroun +@@ -1300,26 +1289,6 @@ void BrowserProcessImpl::CreateBackgroun #endif } @@ -101,17 +101,17 @@ void BrowserProcessImpl::CreateSubresourceFilterRulesetService() { DCHECK(!subresource_filter_ruleset_service_); created_subresource_filter_ruleset_service_ = true; ---- a/chrome/browser/browser_process_impl.h -+++ b/chrome/browser/browser_process_impl.h -@@ -189,7 +189,6 @@ class BrowserProcessImpl : public Browse +--- chrome/browser/browser_process_impl.h.orig ++++ chrome/browser/browser_process_impl.h +@@ -190,7 +190,6 @@ class BrowserProcessImpl : public Browse std::unique_ptr<BackgroundModeManager> manager) override; #endif StatusTray* status_tray() override; - safe_browsing::SafeBrowsingService* safe_browsing_service() override; subresource_filter::RulesetService* subresource_filter_ruleset_service() override; - -@@ -336,9 +335,6 @@ class BrowserProcessImpl : public Browse + federated_learning::FlocSortingLshClustersService* +@@ -344,9 +343,6 @@ class BrowserProcessImpl : public Browse std::unique_ptr<BackgroundModeManager> background_mode_manager_; #endif @@ -121,17 +121,17 @@ bool created_subresource_filter_ruleset_service_ = false; std::unique_ptr<subresource_filter::RulesetService> subresource_filter_ruleset_service_; ---- a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc -+++ b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc -@@ -63,7 +63,6 @@ - #include "chrome/browser/profiles/keep_alive/profile_keep_alive_types.h" - #include "chrome/browser/profiles/keep_alive/scoped_profile_keep_alive.h" +--- chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc.orig ++++ chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc +@@ -70,7 +70,6 @@ #include "chrome/browser/profiles/profile.h" + #include "chrome/browser/profiles/profile_keep_alive_types.h" + #include "chrome/browser/profiles/scoped_profile_keep_alive.h" -#include "chrome/browser/safe_browsing/safe_browsing_service.h" #include "chrome/browser/search_engines/template_url_service_factory.h" #include "chrome/browser/share/share_history.h" #include "chrome/browser/share/share_ranking.h" -@@ -617,10 +616,6 @@ void ChromeBrowsingDataRemoverDelegate:: +@@ -643,10 +642,6 @@ void ChromeBrowsingDataRemoverDelegate:: base::RecordAction(UserMetricsAction("ClearBrowsingData_Cookies")); network::mojom::NetworkContext* safe_browsing_context = nullptr; @@ -140,11 +140,11 @@ - if (sb_service) - safe_browsing_context = sb_service->GetNetworkContext(profile_); - if (!filter_builder->IsCrossSiteClearSiteData()) { - browsing_data::RemoveEmbedderCookieData( ---- a/chrome/browser/chrome_content_browser_client.cc -+++ b/chrome/browser/chrome_content_browser_client.cc -@@ -950,34 +950,6 @@ void SetApplicationLocaleOnIOThread(cons + browsing_data::RemoveEmbedderCookieData( + delete_begin, delete_end, filter_builder, host_content_settings_map_, +--- chrome/browser/chrome_content_browser_client.cc.orig ++++ chrome/browser/chrome_content_browser_client.cc +@@ -921,34 +921,6 @@ void SetApplicationLocaleOnIOThread(cons GetIOThreadApplicationLocale() = locale; } @@ -173,13 +173,13 @@ - } - - private: -- raw_ptr<CertificateReportingService> service_; +- CertificateReportingService* service_; -}; - #if BUILDFLAG(ENABLE_EXTENSIONS) AppLoadedInTabSource ClassifyAppLoadedInTabSource( -@@ -1465,7 +1437,6 @@ void ChromeContentBrowserClient::PostAft +@@ -1423,7 +1395,6 @@ void ChromeContentBrowserClient::PostAft InitNetworkContextsParentDirectory(); DCHECK_CURRENTLY_ON(BrowserThread::UI); @@ -187,7 +187,7 @@ } bool ChromeContentBrowserClient::IsBrowserStartupComplete() { -@@ -4279,7 +4250,7 @@ ChromeContentBrowserClient::CreateThrott +@@ -4229,7 +4200,7 @@ ChromeContentBrowserClient::CreateThrott content::WebContents* web_contents = handle->GetWebContents(); throttles.push_back(std::make_unique<SSLErrorNavigationThrottle>( handle, @@ -196,7 +196,7 @@ base::BindOnce(&HandleSSLErrorWrapper), base::BindOnce(&IsInHostedApp), base::BindOnce( &ShouldIgnoreSslInterstitialBecauseNavigationDefaultedToHttps))); -@@ -4314,16 +4285,6 @@ ChromeContentBrowserClient::CreateThrott +@@ -4258,15 +4229,6 @@ ChromeContentBrowserClient::CreateThrott &throttles); #endif @@ -205,16 +205,15 @@ - g_browser_process->safe_browsing_service() - ? g_browser_process->safe_browsing_service()->ui_manager().get() - : nullptr; -- MaybeAddThrottle( -- safe_browsing::SafeBrowsingNavigationThrottle::MaybeCreateThrottleFor( -- handle, ui_manager), -- &throttles); +- throttles.push_back( +- std::make_unique<safe_browsing::SafeBrowsingNavigationThrottle>( +- handle, ui_manager)); - if (base::FeatureList::IsEnabled(safe_browsing::kDelayedWarnings)) { throttles.push_back( std::make_unique<safe_browsing::DelayedWarningNavigationThrottle>( ---- a/chrome/browser/component_updater/file_type_policies_component_installer.cc -+++ b/chrome/browser/component_updater/file_type_policies_component_installer.cc +--- chrome/browser/component_updater/file_type_policies_component_installer.cc.orig ++++ chrome/browser/component_updater/file_type_policies_component_installer.cc @@ -40,20 +40,6 @@ const uint8_t kFileTypePoliciesPublicKey const char kFileTypePoliciesManifestName[] = "File Type Policies"; @@ -236,9 +235,9 @@ } } // namespace ---- a/chrome/browser/download/chrome_download_manager_delegate.cc -+++ b/chrome/browser/download/chrome_download_manager_delegate.cc -@@ -431,13 +431,6 @@ ChromeDownloadManagerDelegate::~ChromeDo +--- chrome/browser/download/chrome_download_manager_delegate.cc.orig ++++ chrome/browser/download/chrome_download_manager_delegate.cc +@@ -436,13 +436,6 @@ ChromeDownloadManagerDelegate::~ChromeDo void ChromeDownloadManagerDelegate::SetDownloadManager(DownloadManager* dm) { download_manager_ = dm; @@ -251,16 +250,15 @@ - } } - #if BUILDFLAG(IS_ANDROID) -@@ -791,17 +784,6 @@ void ChromeDownloadManagerDelegate::Choo + #if defined(OS_ANDROID) +@@ -791,16 +784,6 @@ void ChromeDownloadManagerDelegate::Choo + void ChromeDownloadManagerDelegate::SanitizeSavePackageResourceName( - base::FilePath* filename, - const GURL& source_url) { + base::FilePath* filename) { - safe_browsing::FileTypePolicies* file_type_policies = - safe_browsing::FileTypePolicies::GetInstance(); - -- const PrefService* prefs = profile_->GetPrefs(); -- if (file_type_policies->GetFileDangerLevel(*filename, source_url, prefs) == +- if (file_type_policies->GetFileDangerLevel(*filename) == - safe_browsing::DownloadFileType::NOT_DANGEROUS) - return; - @@ -270,9 +268,9 @@ } void ChromeDownloadManagerDelegate::SanitizeDownloadParameters( ---- a/chrome/browser/download/download_item_model.cc -+++ b/chrome/browser/download/download_item_model.cc -@@ -87,7 +87,7 @@ class DownloadItemModelData : public bas +--- chrome/browser/download/download_item_model.cc.orig ++++ chrome/browser/download/download_item_model.cc +@@ -86,7 +86,7 @@ class DownloadItemModelData : public bas // Danger level of the file determined based on the file type and whether // there was a user action associated with the download. @@ -281,7 +279,7 @@ // Whether the download is currently being revived. bool is_being_revived_; -@@ -124,7 +124,7 @@ DownloadItemModelData::DownloadItemModel +@@ -123,7 +123,7 @@ DownloadItemModelData::DownloadItemModel : should_show_in_shelf_(true), was_ui_notified_(false), should_prefer_opening_in_browser_(false), @@ -290,7 +288,7 @@ is_being_revived_(false) {} } // namespace -@@ -382,13 +382,13 @@ void DownloadItemModel::SetShouldPreferO +@@ -381,13 +381,13 @@ void DownloadItemModel::SetShouldPreferO data->should_prefer_opening_in_browser_ = preference; } @@ -307,7 +305,7 @@ DownloadItemModelData* data = DownloadItemModelData::GetOrCreate(download_); data->danger_level_ = danger_level; } -@@ -604,9 +604,6 @@ bool DownloadItemModel::IsCommandEnabled +@@ -599,9 +599,6 @@ bool DownloadItemModel::IsCommandEnabled // filename. Don't base an "Always open" decision based on it. Also // exclude extensions. return download_->CanOpenDownload() && @@ -317,9 +315,9 @@ !download_crx_util::IsExtensionDownload(*download_); case DownloadCommands::PAUSE: return !download_->IsSavePackageDownload() && ---- a/chrome/browser/download/download_prefs.cc -+++ b/chrome/browser/download/download_prefs.cc -@@ -251,14 +251,7 @@ DownloadPrefs::DownloadPrefs(Profile* pr +--- chrome/browser/download/download_prefs.cc.orig ++++ chrome/browser/download/download_prefs.cc +@@ -260,14 +260,7 @@ DownloadPrefs::DownloadPrefs(Profile* pr base::FilePath::StringType(1, base::FilePath::kExtensionSeparator) + extension); @@ -335,7 +333,7 @@ } } -@@ -466,10 +459,6 @@ bool DownloadPrefs::IsAutoOpenByPolicy(c +@@ -475,10 +468,6 @@ bool DownloadPrefs::IsAutoOpenByPolicy(c bool DownloadPrefs::EnableAutoOpenByUserBasedOnExtension( const base::FilePath& file_name) { base::FilePath::StringType extension = file_name.Extension(); @@ -346,9 +344,9 @@ DCHECK(extension[0] == base::FilePath::kExtensionSeparator); extension.erase(0, 1); ---- a/chrome/browser/download/download_target_determiner.cc -+++ b/chrome/browser/download/download_target_determiner.cc -@@ -298,13 +298,6 @@ base::FilePath DownloadTargetDeterminer: +--- chrome/browser/download/download_target_determiner.cc.orig ++++ chrome/browser/download/download_target_determiner.cc +@@ -297,13 +297,6 @@ base::FilePath DownloadTargetDeterminer: download_->GetURL(), download_->GetContentDisposition(), referrer_charset, suggested_filename, sniffed_mime_type, default_filename); @@ -362,14 +360,13 @@ // If no mime type or explicitly specified a name, don't replace file // extension. if (sniffed_mime_type.empty() || !suggested_filename.empty()) -@@ -1111,30 +1104,7 @@ DownloadFileType::DangerLevel DownloadTa +@@ -1113,29 +1106,7 @@ DownloadFileType::DangerLevel DownloadTa download_->HasUserGesture()) return DownloadFileType::NOT_DANGEROUS; - DownloadFileType::DangerLevel danger_level = - safe_browsing::FileTypePolicies::GetInstance()->GetFileDangerLevel( -- virtual_path_.BaseName(), download_->GetURL(), -- GetProfile()->GetPrefs()); +- virtual_path_.BaseName()); - - // A danger level of ALLOW_ON_USER_GESTURE is used to label potentially - // dangerous file types that have a high frequency of legitimate use. We would @@ -394,8 +391,8 @@ } absl::optional<base::Time> ---- a/chrome/browser/extensions/api/downloads/downloads_api.cc -+++ b/chrome/browser/extensions/api/downloads/downloads_api.cc +--- chrome/browser/extensions/api/downloads/downloads_api.cc.orig ++++ chrome/browser/extensions/api/downloads/downloads_api.cc @@ -36,7 +36,6 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/download/download_core_service.h" @@ -458,10 +455,10 @@ } DownloadsShowFunction::DownloadsShowFunction() {} ---- a/chrome/browser/extensions/api/downloads/downloads_api.h -+++ b/chrome/browser/extensions/api/downloads/downloads_api.h +--- chrome/browser/extensions/api/downloads/downloads_api.h.orig ++++ chrome/browser/extensions/api/downloads/downloads_api.h @@ -13,7 +13,6 @@ - #include "base/memory/raw_ptr.h" + #include "base/macros.h" #include "base/scoped_observation.h" #include "base/time/time.h" -#include "chrome/browser/download/download_danger_prompt.h" @@ -496,8 +493,8 @@ }; class DownloadsShowFunction : public ExtensionFunction { ---- a/chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_api.cc -+++ b/chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_api.cc +--- chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_api.cc.orig ++++ chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_api.cc @@ -54,38 +54,7 @@ SafeBrowsingPrivateGetReferrerChainFunct base::StringPrintf("Could not find tab with id %d.", params->tab_id))); } @@ -537,9 +534,9 @@ return RespondNow(ArgumentList( api::safe_browsing_private::GetReferrerChain::Results::Create( referrer_entries))); ---- a/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc -+++ b/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc -@@ -716,18 +716,6 @@ void WebstorePrivateBeginInstallWithMani +--- chrome/browser/extensions/api/webstore_private/webstore_private_api.cc.orig ++++ chrome/browser/extensions/api/webstore_private/webstore_private_api.cc +@@ -683,18 +683,6 @@ void WebstorePrivateBeginInstallWithMani void WebstorePrivateBeginInstallWithManifest3Function:: ReportFrictionAcceptedEvent() { @@ -558,7 +555,7 @@ } void WebstorePrivateBeginInstallWithManifest3Function::OnInstallPromptDone( -@@ -1192,52 +1180,9 @@ WebstorePrivateGetReferrerChainFunction: +@@ -1159,52 +1147,9 @@ WebstorePrivateGetReferrerChainFunction: ExtensionFunction::ResponseAction WebstorePrivateGetReferrerChainFunction::Run() { @@ -612,9 +609,9 @@ } WebstorePrivateGetExtensionStatusFunction:: ---- a/chrome/browser/extensions/blocklist_state_fetcher.cc -+++ b/chrome/browser/extensions/blocklist_state_fetcher.cc -@@ -38,23 +38,8 @@ BlocklistStateFetcher::~BlocklistStateFe +--- chrome/browser/extensions/blocklist_state_fetcher.cc.orig ++++ chrome/browser/extensions/blocklist_state_fetcher.cc +@@ -34,33 +34,8 @@ BlocklistStateFetcher::~BlocklistStateFe void BlocklistStateFetcher::Request(const std::string& id, RequestCallback callback) { DCHECK_CURRENTLY_ON(BrowserThread::UI); @@ -634,13 +631,23 @@ - if (request_already_sent) - return; - +- if (g_browser_process && g_browser_process->safe_browsing_service()) { +- if (base::FeatureList::IsEnabled( +- safe_browsing::kSafeBrowsingRemoveCookies)) { +- url_loader_factory_ = g_browser_process->shared_url_loader_factory(); +- } else { +- url_loader_factory_ = +- g_browser_process->safe_browsing_service()->GetURLLoaderFactory(); +- } +- } +- - SendRequest(id); + base::ThreadTaskRunnerHandle::Get()->PostTask( + FROM_HERE, base::BindOnce(std::move(callback), BLOCKLISTED_UNKNOWN)); } void BlocklistStateFetcher::SendRequest(const std::string& id) { -@@ -65,8 +50,7 @@ void BlocklistStateFetcher::SendRequest( +@@ -71,8 +46,7 @@ void BlocklistStateFetcher::SendRequest( std::string request_str; request.SerializeToString(&request_str); @@ -650,7 +657,7 @@ net::NetworkTrafficAnnotationTag traffic_annotation = net::DefineNetworkTrafficAnnotation("extension_blacklist", R"( semantics { -@@ -114,12 +98,6 @@ void BlocklistStateFetcher::SendRequest( +@@ -122,12 +96,6 @@ void BlocklistStateFetcher::SendRequest( base::Unretained(this), fetcher)); } @@ -663,9 +670,9 @@ void BlocklistStateFetcher::OnURLLoaderComplete( network::SimpleURLLoader* url_loader, std::unique_ptr<std::string> response_body) { ---- a/chrome/browser/extensions/blocklist_state_fetcher.h -+++ b/chrome/browser/extensions/blocklist_state_fetcher.h -@@ -36,8 +36,6 @@ class BlocklistStateFetcher { +--- chrome/browser/extensions/blocklist_state_fetcher.h.orig ++++ chrome/browser/extensions/blocklist_state_fetcher.h +@@ -37,8 +37,6 @@ class BlocklistStateFetcher { virtual void Request(const std::string& id, RequestCallback callback); @@ -674,7 +681,7 @@ protected: void OnURLLoaderComplete(network::SimpleURLLoader* url_loader, std::unique_ptr<std::string> response_body); -@@ -56,7 +54,6 @@ class BlocklistStateFetcher { +@@ -57,7 +55,6 @@ class BlocklistStateFetcher { void SendRequest(const std::string& id); @@ -682,20 +689,20 @@ scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory_; // SimpleURLLoader -> (owned loader, extension id). ---- a/chrome/browser/metrics/chrome_metrics_service_client.cc -+++ b/chrome/browser/metrics/chrome_metrics_service_client.cc -@@ -856,9 +856,6 @@ void ChromeMetricsServiceClient::Registe +--- chrome/browser/metrics/chrome_metrics_service_client.cc.orig ++++ chrome/browser/metrics/chrome_metrics_service_client.cc +@@ -828,9 +828,6 @@ void ChromeMetricsServiceClient::Registe metrics_service_->RegisterMetricsProvider( std::make_unique<HttpsEngagementMetricsProvider>()); - metrics_service_->RegisterMetricsProvider( - std::make_unique<CertificateReportingMetricsProvider>()); - - #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) + #if !defined(OS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) metrics_service_->RegisterMetricsProvider( std::make_unique<UpgradeMetricsProvider>()); ---- a/chrome/browser/net/trial_comparison_cert_verifier_controller.cc -+++ b/chrome/browser/net/trial_comparison_cert_verifier_controller.cc +--- chrome/browser/net/trial_comparison_cert_verifier_controller.cc.orig ++++ chrome/browser/net/trial_comparison_cert_verifier_controller.cc @@ -138,9 +138,6 @@ void TrialComparisonCertVerifierControll std::string serialized_report; if (!report.Serialize(&serialized_report)) @@ -706,19 +713,19 @@ } // static ---- a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc -+++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc -@@ -317,7 +317,6 @@ void ChromeBrowserMainExtraPartsProfiles +--- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig ++++ chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc +@@ -297,7 +297,6 @@ void ChromeBrowserMainExtraPartsProfiles #if BUILDFLAG(IS_CHROMEOS_LACROS) CertDbInitializerFactory::GetInstance(); #endif - CertificateReportingServiceFactory::GetInstance(); - #if !BUILDFLAG(IS_ANDROID) + #if !defined(OS_ANDROID) ChromeBrowsingDataLifetimeManagerFactory::GetInstance(); #endif ---- a/chrome/browser/profiles/profile_impl.cc -+++ b/chrome/browser/profiles/profile_impl.cc -@@ -94,7 +94,6 @@ +--- chrome/browser/profiles/profile_impl.cc.orig ++++ chrome/browser/profiles/profile_impl.cc +@@ -93,7 +93,6 @@ #include "chrome/browser/profiles/profile_metrics.h" #include "chrome/browser/push_messaging/push_messaging_service_factory.h" #include "chrome/browser/push_messaging/push_messaging_service_impl.h" @@ -726,7 +733,7 @@ #include "chrome/browser/sessions/exit_type_service.h" #include "chrome/browser/sharing/sharing_service_factory.h" #include "chrome/browser/signin/identity_manager_factory.h" -@@ -621,17 +620,6 @@ void ProfileImpl::LoadPrefsForNormalStar +@@ -627,17 +626,6 @@ void ProfileImpl::LoadPrefsForNormalStar mojo::PendingRemote<prefs::mojom::TrackedPreferenceValidationDelegate> pref_validation_delegate; @@ -744,9 +751,9 @@ prefs_ = CreatePrefService(pref_registry_, CreateExtensionPrefStore(this, false), ---- a/chrome/browser/profiles/profiles_state.cc -+++ b/chrome/browser/profiles/profiles_state.cc -@@ -255,9 +255,6 @@ void RemoveBrowsingDataForProfile(const +--- chrome/browser/profiles/profiles_state.cc.orig ++++ chrome/browser/profiles/profiles_state.cc +@@ -259,9 +259,6 @@ void RemoveBrowsingDataForProfile(const // The BrowsingDataRemover relies on many objects that aren't created in unit // tests. Previously this code would depend on content::ResourceDispatcherHost // but that's gone, so do a similar hack for now. @@ -756,8 +763,8 @@ Profile* profile = g_browser_process->profile_manager()->GetProfileByPath(profile_path); if (!profile) ---- a/chrome/browser/safe_browsing/BUILD.gn -+++ b/chrome/browser/safe_browsing/BUILD.gn +--- chrome/browser/safe_browsing/BUILD.gn.orig ++++ chrome/browser/safe_browsing/BUILD.gn @@ -5,6 +5,7 @@ import("//components/safe_browsing/build import("//extensions/buildflags/buildflags.gni") @@ -766,7 +773,7 @@ sources = [ "chrome_controller_client.cc", "chrome_controller_client.h", -@@ -89,6 +90,7 @@ static_library("safe_browsing") { +@@ -88,6 +89,7 @@ static_library("safe_browsing") { "//extensions/browser", ] } @@ -774,7 +781,7 @@ if (safe_browsing_mode != 0) { # "Safe Browsing Basic" files used for safe browsing in full mode -@@ -446,6 +448,7 @@ static_library("advanced_protection") { +@@ -411,6 +413,7 @@ static_library("advanced_protection") { } source_set("metrics_collector") { @@ -782,7 +789,7 @@ sources = [ "safe_browsing_metrics_collector_factory.cc", "safe_browsing_metrics_collector_factory.h", -@@ -463,6 +466,7 @@ source_set("metrics_collector") { +@@ -428,6 +431,7 @@ source_set("metrics_collector") { "//components/safe_browsing/core/common:safe_browsing_prefs", "//content/public/browser", ] @@ -790,9 +797,9 @@ } source_set("test_support") { ---- a/chrome/browser/ssl/security_state_tab_helper.cc -+++ b/chrome/browser/ssl/security_state_tab_helper.cc -@@ -180,89 +180,6 @@ bool SecurityStateTabHelper::UsedPolicyI +--- chrome/browser/ssl/security_state_tab_helper.cc.orig ++++ chrome/browser/ssl/security_state_tab_helper.cc +@@ -217,89 +217,6 @@ bool SecurityStateTabHelper::UsedPolicyI security_state::MaliciousContentStatus SecurityStateTabHelper::GetMaliciousContentStatus() const { @@ -832,7 +839,7 @@ - MALICIOUS_CONTENT_STATUS_SIGNED_IN_SYNC_PASSWORD_REUSE; - } -#endif -- [[fallthrough]]; +- FALLTHROUGH; - case safe_browsing::SB_THREAT_TYPE_SIGNED_IN_NON_SYNC_PASSWORD_REUSE: -#if BUILDFLAG(FULL_SAFE_BROWSING) - if (safe_browsing::ChromePasswordProtectionService:: @@ -842,7 +849,7 @@ - MALICIOUS_CONTENT_STATUS_SIGNED_IN_NON_SYNC_PASSWORD_REUSE; - } -#endif -- [[fallthrough]]; +- FALLTHROUGH; - case safe_browsing::SB_THREAT_TYPE_ENTERPRISE_PASSWORD_REUSE: -#if BUILDFLAG(FULL_SAFE_BROWSING) - if (safe_browsing::ChromePasswordProtectionService:: @@ -882,19 +889,19 @@ return security_state::MALICIOUS_CONTENT_STATUS_NONE; } ---- a/chrome/browser/ui/BUILD.gn -+++ b/chrome/browser/ui/BUILD.gn -@@ -4152,7 +4152,6 @@ static_library("ui") { - "views/download/bubble/download_dialog_view.h", - "views/download/bubble/download_toolbar_button_view.cc", - "views/download/bubble/download_toolbar_button_view.h", +--- chrome/browser/ui/BUILD.gn.orig ++++ chrome/browser/ui/BUILD.gn +@@ -3946,7 +3946,6 @@ static_library("ui") { + "views/device_chooser_content_view.h", + "views/devtools_process_observer.cc", + "views/devtools_process_observer.h", - "views/download/download_danger_prompt_views.cc", "views/download/download_in_progress_dialog_view.cc", "views/download/download_in_progress_dialog_view.h", "views/download/download_item_view.cc", ---- a/chrome/browser/ui/tab_helpers.cc -+++ b/chrome/browser/ui/tab_helpers.cc -@@ -363,22 +363,6 @@ void TabHelpers::AttachTabHelpers(WebCon +--- chrome/browser/ui/tab_helpers.cc.orig ++++ chrome/browser/ui/tab_helpers.cc +@@ -330,16 +330,6 @@ void TabHelpers::AttachTabHelpers(WebCon // See https://crbug.com/910288. resource_coordinator::ResourceCoordinatorTabHelper::CreateForWebContents( web_contents); @@ -903,12 +910,6 @@ - safe_browsing::SafeBrowsingNavigationObserverManagerFactory:: - GetForBrowserContext(profile), - profile->GetPrefs(), g_browser_process->safe_browsing_service()); -- if (base::FeatureList::IsEnabled( -- safe_browsing::kTailoredSecurityIntegration)) { -- safe_browsing::TailoredSecurityUrlObserver::CreateForWebContents( -- web_contents, -- safe_browsing::TailoredSecurityServiceFactory::GetForProfile(profile)); -- } - safe_browsing::SafeBrowsingTabObserver::CreateForWebContents( - web_contents, - std::make_unique<safe_browsing::ChromeSafeBrowsingTabObserverDelegate>()); @@ -917,8 +918,8 @@ ReputationWebContentsObserver::CreateForWebContents(web_contents); SearchEngineTabHelper::CreateForWebContents(web_contents); SecurityStateTabHelper::CreateForWebContents(web_contents); ---- a/chrome/browser/ui/webui/downloads/downloads_dom_handler.cc -+++ b/chrome/browser/ui/webui/downloads/downloads_dom_handler.cc +--- chrome/browser/ui/webui/downloads/downloads_dom_handler.cc.orig ++++ chrome/browser/ui/webui/downloads/downloads_dom_handler.cc @@ -23,7 +23,6 @@ #include "base/threading/thread.h" #include "base/values.h" @@ -927,7 +928,7 @@ #include "chrome/browser/download/download_history.h" #include "chrome/browser/download/download_item_model.h" #include "chrome/browser/download/download_prefs.h" -@@ -172,9 +171,6 @@ void DownloadsDOMHandler::SaveDangerousR +@@ -171,9 +170,6 @@ void DownloadsDOMHandler::SaveDangerousR } CountDownloadsDOMEvents(DOWNLOADS_DOM_EVENT_SAVE_DANGEROUS); @@ -937,7 +938,7 @@ } void DownloadsDOMHandler::AcceptIncognitoWarning(const std::string& id) { -@@ -326,12 +322,6 @@ void DownloadsDOMHandler::RemoveDownload +@@ -325,12 +321,6 @@ void DownloadsDOMHandler::RemoveDownload IdSet ids; for (auto* download : to_remove) { @@ -950,7 +951,7 @@ DownloadItemModel item_model(download); if (!item_model.ShouldShowInShelf() || download->GetState() == download::DownloadItem::IN_PROGRESS) { -@@ -405,44 +395,6 @@ void DownloadsDOMHandler::FinalizeRemova +@@ -404,44 +394,6 @@ void DownloadsDOMHandler::FinalizeRemova } } @@ -995,17 +996,17 @@ bool DownloadsDOMHandler::IsDeletingHistoryAllowed() { content::DownloadManager* manager = GetMainNotifierManager(); return manager && ---- a/chrome/browser/ui/webui/downloads/downloads_dom_handler.h -+++ b/chrome/browser/ui/webui/downloads/downloads_dom_handler.h +--- chrome/browser/ui/webui/downloads/downloads_dom_handler.h.orig ++++ chrome/browser/ui/webui/downloads/downloads_dom_handler.h @@ -12,7 +12,6 @@ - #include "base/memory/raw_ptr.h" + #include "base/macros.h" #include "base/memory/weak_ptr.h" -#include "chrome/browser/download/download_danger_prompt.h" #include "chrome/browser/ui/webui/downloads/downloads.mojom-forward.h" #include "chrome/browser/ui/webui/downloads/downloads_list_tracker.h" #include "content/public/browser/web_contents_observer.h" -@@ -95,18 +94,6 @@ class DownloadsDOMHandler : public conte +@@ -94,18 +93,6 @@ class DownloadsDOMHandler : public conte // null-checking |original_notifier_|. content::DownloadManager* GetOriginalNotifierManager() const; @@ -1024,9 +1025,9 @@ // Returns true if the records of any downloaded items are allowed (and able) // to be deleted. bool IsDeletingHistoryAllowed(); ---- a/chrome/browser/ui/webui/interstitials/interstitial_ui.cc -+++ b/chrome/browser/ui/webui/interstitials/interstitial_ui.cc -@@ -273,120 +273,6 @@ CreateHttpsOnlyModePage(content::WebCont +--- chrome/browser/ui/webui/interstitials/interstitial_ui.cc.orig ++++ chrome/browser/ui/webui/interstitials/interstitial_ui.cc +@@ -281,116 +281,6 @@ CreateHttpsOnlyModePage(content::WebCont request_url)); } @@ -1036,8 +1037,7 @@ - safe_browsing::SB_THREAT_TYPE_URL_MALWARE; - GURL request_url("http://example.com"); - std::string url_param; -- if (net::GetValueForKeyInQuery(web_contents->GetVisibleURL(), "url", -- &url_param)) { +- if (net::GetValueForKeyInQuery(web_contents->GetURL(), "url", &url_param)) { - if (GURL(url_param).is_valid()) { - request_url = GURL(url_param); - } @@ -1046,8 +1046,7 @@ - // TODO(mattm): add flag to change main_frame_url or add dedicated flag to - // test subresource interstitials. - std::string type_param; -- if (net::GetValueForKeyInQuery(web_contents->GetVisibleURL(), "type", -- &type_param)) { +- if (net::GetValueForKeyInQuery(web_contents->GetURL(), "type", &type_param)) { - if (type_param == "malware") { - threat_type = safe_browsing::SB_THREAT_TYPE_URL_MALWARE; - } else if (type_param == "phishing") { @@ -1095,16 +1094,14 @@ - safe_browsing::SB_THREAT_TYPE_URL_MALWARE; - GURL request_url("http://example.com"); - std::string url_param; -- if (net::GetValueForKeyInQuery(web_contents->GetVisibleURL(), "url", -- &url_param)) { +- if (net::GetValueForKeyInQuery(web_contents->GetURL(), "url", &url_param)) { - if (GURL(url_param).is_valid()) - request_url = GURL(url_param); - } - GURL main_frame_url(request_url); - std::string type_param; - bool is_giant_webview = false; -- if (net::GetValueForKeyInQuery(web_contents->GetVisibleURL(), "type", -- &type_param)) { +- if (net::GetValueForKeyInQuery(web_contents->GetURL(), "type", &type_param)) { - if (type_param == "malware") { - threat_type = safe_browsing::SB_THREAT_TYPE_URL_MALWARE; - } else if (type_param == "phishing") { @@ -1147,16 +1144,16 @@ #if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION) std::unique_ptr<CaptivePortalBlockingPage> CreateCaptivePortalBlockingPage( content::WebContents* web_contents) { -@@ -501,8 +387,6 @@ void InterstitialHTMLSource::StartDataRe - interstitial_delegate = CreateMITMSoftwareBlockingPage(web_contents); - } else if (path_without_query == "/blocked-interception") { +@@ -507,8 +397,6 @@ void InterstitialHTMLSource::StartDataRe interstitial_delegate = CreateBlockedInterceptionBlockingPage(web_contents); + } else if (path_without_query == "/legacy-tls") { + interstitial_delegate = CreateLegacyTLSBlockingPage(web_contents); - } else if (path_without_query == "/safebrowsing") { - interstitial_delegate = CreateSafeBrowsingBlockingPage(web_contents); } else if (path_without_query == "/clock") { interstitial_delegate = CreateBadClockBlockingPage(web_contents); } else if (path_without_query == "/lookalike") { -@@ -519,16 +403,12 @@ void InterstitialHTMLSource::StartDataRe +@@ -525,16 +413,12 @@ void InterstitialHTMLSource::StartDataRe interstitial_delegate = CreateHttpsOnlyModePage(web_contents); } @@ -1176,9 +1173,9 @@ html = interstitial_delegate.get()->GetHTMLContents(); } else { html = ui::ResourceBundle::GetSharedInstance().LoadDataResourceString( ---- a/chrome/renderer/chrome_content_renderer_client.cc -+++ b/chrome/renderer/chrome_content_renderer_client.cc -@@ -91,7 +91,6 @@ +--- chrome/renderer/chrome_content_renderer_client.cc.orig ++++ chrome/renderer/chrome_content_renderer_client.cc +@@ -97,7 +97,6 @@ #include "components/page_load_metrics/renderer/metrics_render_frame_observer.h" #include "components/paint_preview/buildflags/buildflags.h" #include "components/safe_browsing/buildflags.h" @@ -1186,8 +1183,8 @@ #include "components/spellcheck/spellcheck_buildflags.h" #include "components/subresource_filter/content/renderer/subresource_filter_agent.h" #include "components/subresource_filter/content/renderer/unverified_ruleset_dealer.h" ---- a/components/security_interstitials/content/cert_report_helper.cc -+++ b/components/security_interstitials/content/cert_report_helper.cc +--- components/security_interstitials/content/cert_report_helper.cc.orig ++++ components/security_interstitials/content/cert_report_helper.cc @@ -177,7 +177,6 @@ void CertReportHelper::FinishCertCollect return; } diff --git a/www/chromium-uc/patches/core/inox-patchset/0003-disable-autofill-download-manager.patch b/www/chromium-uc/patches/core/inox-patchset/0003-disable-autofill-download-manager.patch @@ -1,6 +1,6 @@ ---- a/components/autofill/core/browser/autofill_download_manager.cc -+++ b/components/autofill/core/browser/autofill_download_manager.cc -@@ -803,94 +803,6 @@ std::tuple<GURL, std::string> AutofillDo +--- components/autofill/core/browser/autofill_download_manager.cc.orig ++++ components/autofill/core/browser/autofill_download_manager.cc +@@ -824,96 +824,6 @@ std::tuple<GURL, std::string> AutofillDo } bool AutofillDownloadManager::StartRequest(FormRequestData request_data) { @@ -9,7 +9,9 @@ - DCHECK(url_loader_factory); - - // Get the URL and method to use for this request. -- auto [request_url, method] = GetRequestURLAndMethod(request_data); +- std::string method; +- GURL request_url; +- std::tie(request_url, method) = GetRequestURLAndMethod(request_data); - - // Track the URL length for GET queries because the URL length can be in the - // thousands when rich metadata is enabled. @@ -27,7 +29,7 @@ - // On iOS we have a single, shared URLLoaderFactory provided by BrowserState. - // As it is shared, it is not trusted and we cannot assign trusted_params - // to the network request. --#if !BUILDFLAG(IS_IOS) +-#if !defined(OS_IOS) - // Do not call IsolationInfo() for REQUEST_UPLOADs because Password Manager - // uploads when RenderFrameHostImpl::DidCommitNavigation() is called, in which - // case IsolationInfo() may crash because there is no committing diff --git a/www/chromium-uc/patches/core/inox-patchset/0005-disable-default-extensions.patch b/www/chromium-uc/patches/core/inox-patchset/0005-disable-default-extensions.patch @@ -1,16 +1,16 @@ ---- a/chrome/browser/extensions/component_extensions_allowlist/allowlist.cc -+++ b/chrome/browser/extensions/component_extensions_allowlist/allowlist.cc +--- chrome/browser/extensions/component_extensions_allowlist/allowlist.cc.orig ++++ chrome/browser/extensions/component_extensions_allowlist/allowlist.cc @@ -28,7 +28,6 @@ namespace extensions { bool IsComponentExtensionAllowlisted(const std::string& extension_id) { const char* const kAllowed[] = { - extension_misc::kInAppPaymentsSupportAppId, extension_misc::kPdfExtensionId, - #if BUILDFLAG(IS_CHROMEOS) + #if defined(OS_CHROMEOS) extension_misc::kAssessmentAssistantExtensionId, ---- a/chrome/browser/extensions/component_loader.cc -+++ b/chrome/browser/extensions/component_loader.cc -@@ -356,11 +356,6 @@ void ComponentLoader::AddWebStoreApp() { +--- chrome/browser/extensions/component_loader.cc.orig ++++ chrome/browser/extensions/component_loader.cc +@@ -354,11 +354,6 @@ void ComponentLoader::AddWebStoreApp() { if (!IsNormalSession()) return; #endif @@ -22,7 +22,7 @@ } #if BUILDFLAG(IS_CHROMEOS_ASH) -@@ -503,18 +498,6 @@ void ComponentLoader::AddDefaultComponen +@@ -495,18 +490,6 @@ void ComponentLoader::AddDefaultComponen AddHangoutServicesExtension(); #endif // BUILDFLAG(ENABLE_HANGOUT_SERVICES_EXTENSION) @@ -41,8 +41,8 @@ #if BUILDFLAG(IS_CHROMEOS_ASH) if (command_line->HasSwitch(switches::kLoadGuestModeTestExtension)) { base::FilePath path = base::FilePath(command_line->GetSwitchValueASCII( ---- a/chrome/browser/extensions/external_component_loader.cc -+++ b/chrome/browser/extensions/external_component_loader.cc +--- chrome/browser/extensions/external_component_loader.cc.orig ++++ chrome/browser/extensions/external_component_loader.cc @@ -30,9 +30,6 @@ ExternalComponentLoader::~ExternalCompon void ExternalComponentLoader::StartLoading() { @@ -51,10 +51,10 @@ - AddExternalExtension(extension_misc::kInAppPaymentsSupportAppId, prefs.get()); -#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) - #if BUILDFLAG(IS_CHROMEOS) + #if defined(OS_CHROMEOS) { ---- a/chrome/browser/extensions/webstore_installer.cc -+++ b/chrome/browser/extensions/webstore_installer.cc +--- chrome/browser/extensions/webstore_installer.cc.orig ++++ chrome/browser/extensions/webstore_installer.cc @@ -555,20 +555,6 @@ void WebstoreInstaller::DownloadNextPend void WebstoreInstaller::DownloadCrx( const std::string& extension_id, @@ -76,7 +76,7 @@ } // http://crbug.com/165634 -@@ -711,21 +697,6 @@ void WebstoreInstaller::UpdateDownloadPr +@@ -712,21 +698,6 @@ void WebstoreInstaller::UpdateDownloadPr void WebstoreInstaller::StartCrxInstaller(const DownloadItem& download) { DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK(!crx_installer_.get()); diff --git a/www/chromium-uc/patches/core/inox-patchset/0007-disable-web-resource-service.patch b/www/chromium-uc/patches/core/inox-patchset/0007-disable-web-resource-service.patch @@ -1,5 +1,5 @@ ---- a/components/web_resource/web_resource_service.cc -+++ b/components/web_resource/web_resource_service.cc +--- components/web_resource/web_resource_service.cc.orig ++++ components/web_resource/web_resource_service.cc @@ -120,44 +120,7 @@ bool WebResourceService::GetFetchSchedul // Initializes the fetching of data from the resource server. Data // load calls OnSimpleLoaderComplete. diff --git a/www/chromium-uc/patches/core/inox-patchset/0009-disable-google-ipv6-probes.patch b/www/chromium-uc/patches/core/inox-patchset/0009-disable-google-ipv6-probes.patch @@ -1,6 +1,6 @@ ---- a/net/dns/host_resolver_manager.cc -+++ b/net/dns/host_resolver_manager.cc -@@ -151,10 +151,10 @@ const unsigned kMinimumTTLSeconds = kCac +--- net/dns/host_resolver_manager.cc.orig ++++ net/dns/host_resolver_manager.cc +@@ -139,10 +139,10 @@ const unsigned kMinimumTTLSeconds = kCac // cached. const int kIPv6ProbePeriodMs = 1000; diff --git a/www/chromium-uc/patches/core/inox-patchset/0015-disable-update-pings.patch b/www/chromium-uc/patches/core/inox-patchset/0015-disable-update-pings.patch @@ -1,6 +1,6 @@ ---- a/chrome/updater/configurator.cc -+++ b/chrome/updater/configurator.cc -@@ -91,7 +91,7 @@ int Configurator::UpdateDelay() const { +--- chrome/updater/configurator.cc.orig ++++ chrome/updater/configurator.cc +@@ -82,7 +82,7 @@ int Configurator::UpdateDelay() const { } std::vector<GURL> Configurator::UpdateUrl() const { diff --git a/www/chromium-uc/patches/core/inox-patchset/0017-disable-new-avatar-menu.patch b/www/chromium-uc/patches/core/inox-patchset/0017-disable-new-avatar-menu.patch @@ -1,5 +1,5 @@ ---- a/components/signin/internal/identity_manager/primary_account_policy_manager_impl.cc -+++ b/components/signin/internal/identity_manager/primary_account_policy_manager_impl.cc +--- components/signin/internal/identity_manager/primary_account_policy_manager_impl.cc.orig ++++ components/signin/internal/identity_manager/primary_account_policy_manager_impl.cc @@ -86,7 +86,7 @@ void PrimaryAccountPolicyManagerImpl::On } diff --git a/www/chromium-uc/patches/core/inox-patchset/0021-disable-rlz.patch b/www/chromium-uc/patches/core/inox-patchset/0021-disable-rlz.patch @@ -1,8 +1,8 @@ # Disable rlz ---- a/BUILD.gn -+++ b/BUILD.gn -@@ -484,14 +484,6 @@ group("gn_all") { +--- BUILD.gn.orig ++++ BUILD.gn +@@ -485,14 +485,6 @@ group("gn_all") { deps += [ "//chromeos:chromeos_unittests" ] } @@ -17,8 +17,8 @@ if (is_linux || is_chromeos) { # The following are definitely linux-only. deps += [ ---- a/rlz/buildflags/buildflags.gni -+++ b/rlz/buildflags/buildflags.gni +--- rlz/buildflags/buildflags.gni.orig ++++ rlz/buildflags/buildflags.gni @@ -7,6 +7,6 @@ import("//build/config/chromeos/ui_mode. # Whether we are using the rlz library or not. Platforms like Android send diff --git a/www/chromium-uc/patches/core/iridium-browser/all-add-trk-prefixes-to-possibly-evil-connections.patch b/www/chromium-uc/patches/core/iridium-browser/all-add-trk-prefixes-to-possibly-evil-connections.patch @@ -66,19 +66,8 @@ by default. ui/views/examples/webview_example.cc | 2 +- 54 files changed, 89 insertions(+), 87 deletions(-) ---- a/ash/components/geolocation/simple_geolocation_provider.cc -+++ b/ash/components/geolocation/simple_geolocation_provider.cc -@@ -20,7 +20,7 @@ namespace ash { - namespace { - - const char kDefaultGeolocationProviderUrl[] = -- "https://www.googleapis.com/geolocation/v1/geolocate?"; -+ "trk:215:https://www.googleapis.com/geolocation/v1/geolocate?"; - - } // namespace - ---- a/build/apple/tweak_info_plist.py -+++ b/build/apple/tweak_info_plist.py +--- build/apple/tweak_info_plist.py.orig ++++ build/apple/tweak_info_plist.py @@ -195,7 +195,7 @@ def _AddKeystoneKeys(plist, bundle_ident also requires the |bundle_identifier| argument (com.example.product).""" plist['KSVersion'] = plist['CFBundleShortVersionString'] @@ -88,9 +77,9 @@ by default. _RemoveKeys(plist, 'KSChannelID') if base_tag != '': ---- a/chrome/browser/ash/customization/customization_document.cc -+++ b/chrome/browser/ash/customization/customization_document.cc -@@ -198,7 +198,7 @@ std::string ReadFileInBackground(const b +--- chrome/browser/ash/customization/customization_document.cc.orig ++++ chrome/browser/ash/customization/customization_document.cc +@@ -175,7 +175,7 @@ std::string ReadFileInBackground(const b // Template URL where to fetch OEM services customization manifest from. const char ServicesCustomizationDocument::kManifestUrl[] = @@ -99,9 +88,9 @@ by default. // A custom extensions::ExternalLoader that the ServicesCustomizationDocument // creates and uses to publish OEM default apps to the extensions system. ---- a/chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc -+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc -@@ -92,7 +92,7 @@ namespace { +--- chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc.orig ++++ chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc +@@ -87,7 +87,7 @@ namespace { using api::file_manager_private::ProfileInfo; @@ -110,8 +99,8 @@ by default. // Thresholds for mountCrostini() API. constexpr base::TimeDelta kMountCrostiniSlowOperationThreshold = ---- a/chrome/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.cc -+++ b/chrome/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.cc +--- chrome/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.cc.orig ++++ chrome/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.cc @@ -52,8 +52,8 @@ namespace { const char kGoogleDotCom[] = "google.com"; @@ -123,9 +112,9 @@ by default. // ContainsAppIdByHash returns true iff the SHA-256 hash of one of the // elements of |list| equals |hash|. ---- a/chrome/browser/extensions/install_signer.cc -+++ b/chrome/browser/extensions/install_signer.cc -@@ -66,7 +66,7 @@ const int kSignatureFormatVersion = 2; +--- chrome/browser/extensions/install_signer.cc.orig ++++ chrome/browser/extensions/install_signer.cc +@@ -67,7 +67,7 @@ const int kSignatureFormatVersion = 2; const size_t kSaltBytes = 32; const char kBackendUrl[] = @@ -134,8 +123,8 @@ by default. const char kPublicKeyPEM[] = \ "-----BEGIN PUBLIC KEY-----" \ ---- a/chrome/browser/media/webrtc/webrtc_event_log_uploader.cc -+++ b/chrome/browser/media/webrtc/webrtc_event_log_uploader.cc +--- chrome/browser/media/webrtc/webrtc_event_log_uploader.cc.orig ++++ chrome/browser/media/webrtc/webrtc_event_log_uploader.cc @@ -125,7 +125,7 @@ void OnURLLoadUploadProgress(uint64_t cu } // namespace @@ -145,8 +134,8 @@ by default. WebRtcEventLogUploaderImpl::Factory::Factory( scoped_refptr<base::SequencedTaskRunner> task_runner) ---- a/chrome/browser/media/webrtc/webrtc_log_uploader.cc -+++ b/chrome/browser/media/webrtc/webrtc_log_uploader.cc +--- chrome/browser/media/webrtc/webrtc_log_uploader.cc.orig ++++ chrome/browser/media/webrtc/webrtc_log_uploader.cc @@ -485,7 +485,7 @@ void WebRtcLogUploader::UploadCompressed "Not implemented, it would be good to do so." })"); @@ -156,8 +145,8 @@ by default. auto resource_request = std::make_unique<network::ResourceRequest>(); resource_request->url = !upload_url_for_testing_.is_empty() ? upload_url_for_testing_ ---- a/chrome/browser/nacl_host/nacl_infobar_delegate.cc -+++ b/chrome/browser/nacl_host/nacl_infobar_delegate.cc +--- chrome/browser/nacl_host/nacl_infobar_delegate.cc.orig ++++ chrome/browser/nacl_host/nacl_infobar_delegate.cc @@ -33,7 +33,7 @@ std::u16string NaClInfoBarDelegate::GetL } @@ -167,8 +156,8 @@ by default. } std::u16string NaClInfoBarDelegate::GetMessageText() const { ---- a/chrome/browser/profiles/profile_avatar_downloader.cc -+++ b/chrome/browser/profiles/profile_avatar_downloader.cc +--- chrome/browser/profiles/profile_avatar_downloader.cc.orig ++++ chrome/browser/profiles/profile_avatar_downloader.cc @@ -20,7 +20,7 @@ namespace { @@ -178,8 +167,8 @@ by default. } ProfileAvatarDownloader::ProfileAvatarDownloader(size_t icon_index, ---- a/chrome/browser/resources/default_apps/external_extensions.json -+++ b/chrome/browser/resources/default_apps/external_extensions.json +--- chrome/browser/resources/default_apps/external_extensions.json.orig ++++ chrome/browser/resources/default_apps/external_extensions.json @@ -23,17 +23,17 @@ }, // Google Sheets @@ -201,9 +190,9 @@ by default. } } ---- a/chrome/browser/safe_browsing/download_protection/download_feedback.cc -+++ b/chrome/browser/safe_browsing/download_protection/download_feedback.cc -@@ -192,7 +192,7 @@ const int64_t DownloadFeedback::kMaxUplo +--- chrome/browser/safe_browsing/download_protection/download_feedback.cc.orig ++++ chrome/browser/safe_browsing/download_protection/download_feedback.cc +@@ -202,7 +202,7 @@ const int64_t DownloadFeedback::kMaxUplo // static const char DownloadFeedback::kSbFeedbackURL[] = @@ -212,8 +201,8 @@ by default. // static DownloadFeedbackFactory* DownloadFeedback::factory_ = nullptr; ---- a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc -+++ b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc +--- chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc.orig ++++ chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc @@ -279,7 +279,7 @@ GURL SpellcheckHunspellDictionary::GetDi DCHECK(!bdict_file.empty()); @@ -223,9 +212,9 @@ by default. return GURL(std::string(kDownloadServerUrl) + base::ToLowerASCII(bdict_file)); ---- a/chrome/browser/supervised_user/supervised_user_service.cc -+++ b/chrome/browser/supervised_user/supervised_user_service.cc -@@ -86,7 +86,7 @@ namespace { +--- chrome/browser/supervised_user/supervised_user_service.cc.orig ++++ chrome/browser/supervised_user/supervised_user_service.cc +@@ -87,7 +87,7 @@ namespace { // The URL from which to download a host denylist if no local one exists yet. const char kDenylistURL[] = @@ -234,9 +223,9 @@ by default. // The filename under which we'll store the denylist (in the user data dir). The // old file will be used as a backup in case the new file has not been loaded // yet. ---- a/chrome/browser/ui/dialogs/outdated_upgrade_bubble.cc -+++ b/chrome/browser/ui/dialogs/outdated_upgrade_bubble.cc -@@ -50,7 +50,7 @@ const char* kUpdateBrowserRedirectUrl = +--- chrome/browser/ui/views/outdated_upgrade_bubble_view.cc.orig ++++ chrome/browser/ui/views/outdated_upgrade_bubble_view.cc +@@ -54,7 +54,7 @@ const char* kUpdateBrowserRedirectUrl = #else // The URL to be used to re-install Chrome when auto-update failed for // too long. @@ -245,9 +234,9 @@ by default. #endif bool g_upgrade_bubble_is_showing = false; ---- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc -+++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc -@@ -71,17 +71,17 @@ namespace { +--- chrome/browser/ui/webui/ntp/ntp_resource_cache.cc.orig ++++ chrome/browser/ui/webui/ntp/ntp_resource_cache.cc +@@ -67,17 +67,17 @@ namespace { // The URL for the the Learn More page shown on incognito new tab. const char kLearnMoreIncognitoUrl[] = #if BUILDFLAG(IS_CHROMEOS_ASH) @@ -269,8 +258,8 @@ by default. #endif std::string ReplaceTemplateExpressions( ---- a/chrome/chrome_cleaner/components/recovery_component.cc -+++ b/chrome/chrome_cleaner/components/recovery_component.cc +--- chrome/chrome_cleaner/components/recovery_component.cc.orig ++++ chrome/chrome_cleaner/components/recovery_component.cc @@ -37,7 +37,7 @@ namespace chrome_cleaner { namespace { @@ -280,8 +269,8 @@ by default. "&installsource=swreporter&x=id%3Dnpdjjkjlcidkjlamlmmdelcjbcpdjocm" "%26v%3D0.0.0.0%26uc&acceptformat=crx3"; ---- a/chrome/chrome_cleaner/crash/crashpad_crash_reporter.cc -+++ b/chrome/chrome_cleaner/crash/crashpad_crash_reporter.cc +--- chrome/chrome_cleaner/crash/crashpad_crash_reporter.cc.orig ++++ chrome/chrome_cleaner/crash/crashpad_crash_reporter.cc @@ -28,7 +28,7 @@ namespace { @@ -291,8 +280,8 @@ by default. // Whether the current process is connected to a crash handler process. bool g_is_connected_to_crash_handler = false; ---- a/chrome/common/extensions/chrome_extensions_client.cc -+++ b/chrome/common/extensions/chrome_extensions_client.cc +--- chrome/common/extensions/chrome_extensions_client.cc.orig ++++ chrome/common/extensions/chrome_extensions_client.cc @@ -45,9 +45,9 @@ namespace { // TODO(battre): Delete the HTTP URL once the blocklist is downloaded via HTTPS. @@ -303,10 +292,10 @@ by default. - "https://www.gstatic.com/chrome/extensions/blocklist"; + "trk:270:https://www.gstatic.com/chrome/extensions/blocklist"; - } // namespace + const char kThumbsWhiteListedExtension[] = "khopmbdjffemhegeeobelklnbglcdgfh"; ---- a/chrome/installer/setup/google_chrome_behaviors.cc -+++ b/chrome/installer/setup/google_chrome_behaviors.cc +--- chrome/installer/setup/google_chrome_behaviors.cc.orig ++++ chrome/installer/setup/google_chrome_behaviors.cc @@ -37,7 +37,7 @@ namespace installer { namespace { @@ -316,8 +305,19 @@ by default. bool NavigateToUrlWithEdge(const std::wstring& url) { std::wstring protocol_url = L"microsoft-edge:" + url; ---- a/chromecast/crash/linux/minidump_uploader.cc -+++ b/chromecast/crash/linux/minidump_uploader.cc +--- chromecast/browser/service/cast_service_simple.cc.orig ++++ chromecast/browser/service/cast_service_simple.cc +@@ -27,7 +27,7 @@ GURL GetStartupURL() { + const base::CommandLine::StringVector& args = command_line->GetArgs(); + + if (args.empty()) +- return GURL("http://www.google.com/"); ++ return GURL("trk:255:http://www.google.com/"); + + GURL url(args[0]); + if (url.is_valid() && url.has_scheme()) +--- chromecast/crash/linux/minidump_uploader.cc.orig ++++ chromecast/crash/linux/minidump_uploader.cc @@ -41,7 +41,7 @@ namespace { const char kProductName[] = "Eureka"; @@ -327,8 +327,19 @@ by default. const char kVirtualChannel[] = "virtual-channel"; ---- a/components/cloud_devices/common/cloud_devices_urls.cc -+++ b/components/cloud_devices/common/cloud_devices_urls.cc +--- chromeos/geolocation/simple_geolocation_provider.cc.orig ++++ chromeos/geolocation/simple_geolocation_provider.cc +@@ -20,7 +20,7 @@ namespace chromeos { + namespace { + + const char kDefaultGeolocationProviderUrl[] = +- "https://www.googleapis.com/geolocation/v1/geolocate?"; ++ "trk:215:https://www.googleapis.com/geolocation/v1/geolocate?"; + + } // namespace + +--- components/cloud_devices/common/cloud_devices_urls.cc.orig ++++ components/cloud_devices/common/cloud_devices_urls.cc @@ -13,14 +13,14 @@ namespace cloud_devices { @@ -346,8 +357,8 @@ by default. } ---- a/components/drive/service/drive_api_service.cc -+++ b/components/drive/service/drive_api_service.cc +--- components/drive/service/drive_api_service.cc.orig ++++ components/drive/service/drive_api_service.cc @@ -75,9 +75,9 @@ namespace drive { namespace { @@ -360,9 +371,9 @@ by default. const char kDriveAppsScope[] = "https://www.googleapis.com/auth/drive.apps"; // Mime type to create a directory. ---- a/components/feedback/feedback_uploader.cc -+++ b/components/feedback/feedback_uploader.cc -@@ -39,7 +39,7 @@ constexpr base::FilePath::CharType kFeed +--- components/feedback/feedback_uploader.cc.orig ++++ components/feedback/feedback_uploader.cc +@@ -27,7 +27,7 @@ constexpr base::FilePath::CharType kFeed FILE_PATH_LITERAL("Feedback Reports"); constexpr char kFeedbackPostUrl[] = @@ -371,9 +382,9 @@ by default. constexpr char kProtoBufMimeType[] = "application/x-protobuf"; ---- a/components/google/core/common/google_util.cc -+++ b/components/google/core/common/google_util.cc -@@ -142,7 +142,7 @@ bool IsGoogleSearchSubdomainUrl(const GU +--- components/google/core/common/google_util.cc.orig ++++ components/google/core/common/google_util.cc +@@ -143,7 +143,7 @@ bool IsGoogleSearchSubdomainUrl(const GU // Global functions ----------------------------------------------------------- @@ -382,9 +393,9 @@ by default. bool HasGoogleSearchQueryParam(base::StringPiece str) { url::Component query(0, static_cast<int>(str.length())), key, value; ---- a/components/history/core/browser/web_history_service.cc -+++ b/components/history/core/browser/web_history_service.cc -@@ -43,13 +43,13 @@ namespace history { +--- components/history/core/browser/web_history_service.cc.orig ++++ components/history/core/browser/web_history_service.cc +@@ -42,13 +42,13 @@ namespace history { namespace { const char kHistoryOAuthScope[] = @@ -401,8 +412,8 @@ by default. const char kHistoryAudioHistoryUrl[] = "https://history.google.com/history/api/lookup?client=audio"; ---- a/components/metrics/url_constants.cc -+++ b/components/metrics/url_constants.cc +--- components/metrics/url_constants.cc.orig ++++ components/metrics/url_constants.cc @@ -7,7 +7,7 @@ namespace metrics { @@ -412,8 +423,8 @@ by default. const char kNewMetricsServerUrlInsecure[] = "http://clientservices.googleapis.com/uma/v2"; ---- a/components/safe_browsing/content/browser/client_side_detection_service.cc -+++ b/components/safe_browsing/content/browser/client_side_detection_service.cc +--- components/safe_browsing/content/browser/client_side_detection_service.cc.orig ++++ components/safe_browsing/content/browser/client_side_detection_service.cc @@ -62,7 +62,7 @@ const int ClientSideDetectionService::kN const int ClientSideDetectionService::kPositiveCacheIntervalMinutes = 30; @@ -423,8 +434,8 @@ by default. struct ClientSideDetectionService::ClientPhishingReportInfo { std::unique_ptr<network::SimpleURLLoader> loader; ---- a/components/safe_search_api/safe_search/safe_search_url_checker_client.cc -+++ b/components/safe_search_api/safe_search/safe_search_url_checker_client.cc +--- components/safe_search_api/safe_search/safe_search_url_checker_client.cc.orig ++++ components/safe_search_api/safe_search/safe_search_url_checker_client.cc @@ -28,7 +28,7 @@ namespace safe_search_api { namespace { @@ -434,8 +445,8 @@ by default. const char kDataContentType[] = "application/x-www-form-urlencoded"; const char kDataFormat[] = "key=%s&urls=%s"; ---- a/components/safe_search_api/stub_url_checker.cc -+++ b/components/safe_search_api/stub_url_checker.cc +--- components/safe_search_api/stub_url_checker.cc.orig ++++ components/safe_search_api/stub_url_checker.cc @@ -21,7 +21,7 @@ namespace safe_search_api { namespace { @@ -444,9 +455,9 @@ by default. + "trk:238:https://safesearch.googleapis.com/v1:classify"; std::string BuildResponse(bool is_porn) { - base::Value dict(base::Value::Type::DICTIONARY); ---- a/components/translate/core/browser/translate_url_fetcher.cc -+++ b/components/translate/core/browser/translate_url_fetcher.cc + base::DictionaryValue dict; +--- components/translate/core/browser/translate_url_fetcher.cc.orig ++++ components/translate/core/browser/translate_url_fetcher.cc @@ -99,6 +99,7 @@ bool TranslateURLFetcher::Request(const if (!extra_request_header_.empty()) resource_request->headers.AddHeaderFromString(extra_request_header_); @@ -455,9 +466,9 @@ by default. simple_loader_ = variations::CreateSimpleURLLoaderWithVariationsHeaderUnknownSignedIn( std::move(resource_request), ---- a/components/translate/core/common/translate_util.cc -+++ b/components/translate/core/common/translate_util.cc -@@ -21,7 +21,7 @@ const char kDetectLanguageInSubFrames[] +--- components/translate/core/common/translate_util.cc.orig ++++ components/translate/core/common/translate_util.cc +@@ -20,7 +20,7 @@ const char kDetectLanguageInSubFrames[] } // namespace @@ -466,8 +477,8 @@ by default. const base::Feature kTranslateSubFrames{"TranslateSubFrames", base::FEATURE_DISABLED_BY_DEFAULT}; ---- a/components/variations/variations_url_constants.cc -+++ b/components/variations/variations_url_constants.cc +--- components/variations/variations_url_constants.cc.orig ++++ components/variations/variations_url_constants.cc @@ -8,7 +8,7 @@ namespace variations { // Default server of Variations seed info. @@ -477,8 +488,8 @@ by default. const char kDefaultInsecureServerUrl[] = "http://clientservices.googleapis.com/chrome-variations/seed"; ---- a/content/browser/speech/speech_recognition_engine.cc -+++ b/content/browser/speech/speech_recognition_engine.cc +--- content/browser/speech/speech_recognition_engine.cc.orig ++++ content/browser/speech/speech_recognition_engine.cc @@ -33,7 +33,7 @@ namespace content { namespace { @@ -488,9 +499,9 @@ by default. const char kDownstreamUrl[] = "/down?"; const char kUpstreamUrl[] = "/up?"; ---- a/content/browser/webauth/authenticator_common.cc -+++ b/content/browser/webauth/authenticator_common.cc -@@ -91,9 +91,9 @@ enum class RequestExtension { +--- content/browser/webauth/authenticator_common.cc.orig ++++ content/browser/webauth/authenticator_common.cc +@@ -88,9 +88,9 @@ enum class RequestExtension { namespace { constexpr char kGstaticAppId[] = @@ -502,19 +513,19 @@ by default. WebAuthenticationDelegate* GetWebAuthenticationDelegate() { return GetContentClient()->browser()->GetWebAuthenticationDelegate(); ---- a/content/shell/browser/shell_browser_main_parts.cc -+++ b/content/shell/browser/shell_browser_main_parts.cc -@@ -84,7 +84,7 @@ GURL GetStartupURL() { +--- content/shell/browser/shell_browser_main_parts.cc.orig ++++ content/shell/browser/shell_browser_main_parts.cc +@@ -96,7 +96,7 @@ GURL GetStartupURL() { #else const base::CommandLine::StringVector& args = command_line->GetArgs(); if (args.empty()) - return GURL("https://www.google.com/"); + return GURL("trk:183:https://www.google.com/"); - #if BUILDFLAG(IS_WIN) + #if defined(OS_WIN) GURL url(base::WideToUTF16(args[0])); ---- a/extensions/common/extension_urls.cc -+++ b/extensions/common/extension_urls.cc +--- extensions/common/extension_urls.cc.orig ++++ extensions/common/extension_urls.cc @@ -26,9 +26,9 @@ bool IsSourceFromAnExtension(const std:: namespace extension_urls { @@ -527,9 +538,9 @@ by default. GURL GetWebstoreLaunchURL() { extensions::ExtensionsClient* client = extensions::ExtensionsClient::Get(); ---- a/google_apis/gaia/gaia_constants.cc -+++ b/google_apis/gaia/gaia_constants.cc -@@ -25,149 +25,149 @@ const char kSyncService[] = "chromiumsyn +--- google_apis/gaia/gaia_constants.cc.orig ++++ google_apis/gaia/gaia_constants.cc +@@ -25,133 +25,133 @@ const char kSyncService[] = "chromiumsyn const char kRemotingService[] = "chromoting"; // OAuth scopes. @@ -582,145 +593,125 @@ by default. - "https://www.googleapis.com/auth/userinfo.profile"; + "trk:079:https://www.googleapis.com/auth/userinfo.profile"; - // OAuth2 scope for access to the parent approval widget. - const char kParentApprovalOAuth2Scope[] = -- "https://www.googleapis.com/auth/kids.parentapproval"; -+ "trk:080:https://www.googleapis.com/auth/kids.parentapproval"; - // OAuth2 scope for access to the people API (read-only). const char kPeopleApiReadOnlyOAuth2Scope[] = - "https://www.googleapis.com/auth/peopleapi.readonly"; -+ "trk:081:https://www.googleapis.com/auth/peopleapi.readonly"; - - // OAuth2 scope for access to the programmatic challenge API (read-only). - const char kProgrammaticChallengeOAuth2Scope[] = -- "https://www.googleapis.com/auth/accounts.programmaticchallenge"; -+ "trk:082:https://www.googleapis.com/auth/accounts.programmaticchallenge"; ++ "trk:080:https://www.googleapis.com/auth/peopleapi.readonly"; // OAuth2 scope for access to the Reauth flow. const char kAccountsReauthOAuth2Scope[] = - "https://www.googleapis.com/auth/accounts.reauth"; -+ "trk:083:https://www.googleapis.com/auth/accounts.reauth"; ++ "trk:081:https://www.googleapis.com/auth/accounts.reauth"; // OAuth2 scope for access to audit recording (ARI). const char kAuditRecordingOAuth2Scope[] = - "https://www.googleapis.com/auth/auditrecording-pa"; -+ "trk:084:https://www.googleapis.com/auth/auditrecording-pa"; ++ "trk:082:https://www.googleapis.com/auth/auditrecording-pa"; // OAuth2 scope for access to clear cut logs. -const char kClearCutOAuth2Scope[] = "https://www.googleapis.com/auth/cclog"; -+const char kClearCutOAuth2Scope[] = "trk:085:https://www.googleapis.com/auth/cclog"; ++const char kClearCutOAuth2Scope[] = "trk:083:https://www.googleapis.com/auth/cclog"; // OAuth2 scope for FCM, the Firebase Cloud Messaging service. const char kFCMOAuthScope[] = - "https://www.googleapis.com/auth/firebase.messaging"; -+ "trk:086:https://www.googleapis.com/auth/firebase.messaging"; ++ "trk:084:https://www.googleapis.com/auth/firebase.messaging"; // OAuth2 scope for access to Tachyon api. -const char kTachyonOAuthScope[] = "https://www.googleapis.com/auth/tachyon"; -+const char kTachyonOAuthScope[] = "trk:087:https://www.googleapis.com/auth/tachyon"; ++const char kTachyonOAuthScope[] = "trk:085:https://www.googleapis.com/auth/tachyon"; // OAuth2 scope for access to the Photos API. -const char kPhotosOAuth2Scope[] = "https://www.googleapis.com/auth/photos"; -+const char kPhotosOAuth2Scope[] = "trk:088:https://www.googleapis.com/auth/photos"; ++const char kPhotosOAuth2Scope[] = "trk:086:https://www.googleapis.com/auth/photos"; // OAuth2 scope for access to Cast backdrop API. const char kCastBackdropOAuth2Scope[] = - "https://www.googleapis.com/auth/cast.backdrop"; -+ "trk:089:https://www.googleapis.com/auth/cast.backdrop"; ++ "trk:087:https://www.googleapis.com/auth/cast.backdrop"; // OAuth scope for access to Cloud Translation API. const char kCloudTranslationOAuth2Scope[] = - "https://www.googleapis.com/auth/cloud-translation"; -+ "trk:090:https://www.googleapis.com/auth/cloud-translation"; ++ "trk:088:https://www.googleapis.com/auth/cloud-translation"; // OAuth2 scope for access to passwords leak checking API. const char kPasswordsLeakCheckOAuth2Scope[] = - "https://www.googleapis.com/auth/identity.passwords.leak.check"; -+ "trk:091:https://www.googleapis.com/auth/identity.passwords.leak.check"; ++ "trk:089:https://www.googleapis.com/auth/identity.passwords.leak.check"; // OAuth2 scope for access to Chrome safe browsing API. const char kChromeSafeBrowsingOAuth2Scope[] = - "https://www.googleapis.com/auth/chrome-safe-browsing"; -+ "trk:092:https://www.googleapis.com/auth/chrome-safe-browsing"; ++ "trk:090:https://www.googleapis.com/auth/chrome-safe-browsing"; // OAuth2 scope for access to kid permissions by URL. const char kClassifyUrlKidPermissionOAuth2Scope[] = - "https://www.googleapis.com/auth/kid.permission"; -+ "trk:093:https://www.googleapis.com/auth/kid.permission"; ++ "trk:091:https://www.googleapis.com/auth/kid.permission"; const char kKidFamilyReadonlyOAuth2Scope[] = - "https://www.googleapis.com/auth/kid.family.readonly"; -+ "trk:094:https://www.googleapis.com/auth/kid.family.readonly"; ++ "trk:092:https://www.googleapis.com/auth/kid.family.readonly"; // OAuth2 scope for access to payments. const char kPaymentsOAuth2Scope[] = - "https://www.googleapis.com/auth/wallet.chrome"; -+ "trk:095:https://www.googleapis.com/auth/wallet.chrome"; ++ "trk:093:https://www.googleapis.com/auth/wallet.chrome"; const char kCryptAuthOAuth2Scope[] = - "https://www.googleapis.com/auth/cryptauth"; -+ "trk:096:https://www.googleapis.com/auth/cryptauth"; ++ "trk:094:https://www.googleapis.com/auth/cryptauth"; // OAuth2 scope for access to Drive. -const char kDriveOAuth2Scope[] = "https://www.googleapis.com/auth/drive"; -+const char kDriveOAuth2Scope[] = "trk:097:https://www.googleapis.com/auth/drive"; ++const char kDriveOAuth2Scope[] = "trk:095:https://www.googleapis.com/auth/drive"; // The scope required for an access token in order to query ItemSuggest. const char kDriveReadOnlyOAuth2Scope[] = - "https://www.googleapis.com/auth/drive.readonly"; -+ "trk:098:https://www.googleapis.com/auth/drive.readonly"; ++ "trk:096:https://www.googleapis.com/auth/drive.readonly"; // OAuth2 scope for access to Assistant SDK. const char kAssistantOAuth2Scope[] = - "https://www.googleapis.com/auth/assistant-sdk-prototype"; -+ "trk:099:https://www.googleapis.com/auth/assistant-sdk-prototype"; ++ "trk:097:https://www.googleapis.com/auth/assistant-sdk-prototype"; // OAuth2 scope for access to nearby devices (fast pair) APIs. const char kCloudPlatformProjectsOAuth2Scope[] = - "https://www.googleapis.com/auth/cloudplatformprojects"; -+ "trk:100:https://www.googleapis.com/auth/cloudplatformprojects"; ++ "trk:098:https://www.googleapis.com/auth/cloudplatformprojects"; // OAuth2 scope for access to nearby sharing. const char kNearbyShareOAuth2Scope[] = - "https://www.googleapis.com/auth/nearbysharing-pa"; -+ "trk:101:https://www.googleapis.com/auth/nearbysharing-pa"; ++ "trk:099:https://www.googleapis.com/auth/nearbysharing-pa"; // OAuth2 scopes for access to GCM account tracker. -const char kGCMGroupServerOAuth2Scope[] = "https://www.googleapis.com/auth/gcm"; -+const char kGCMGroupServerOAuth2Scope[] = "trk:102:https://www.googleapis.com/auth/gcm"; ++const char kGCMGroupServerOAuth2Scope[] = "trk:100:https://www.googleapis.com/auth/gcm"; const char kGCMCheckinServerOAuth2Scope[] = - "https://www.googleapis.com/auth/android_checkin"; -+ "trk:103:https://www.googleapis.com/auth/android_checkin"; ++ "trk:101:https://www.googleapis.com/auth/android_checkin"; // OAuth2 scope for access to readonly Chrome web store. const char kChromeWebstoreOAuth2Scope[] = - "https://www.googleapis.com/auth/chromewebstore.readonly"; -+ "trk:104:https://www.googleapis.com/auth/chromewebstore.readonly"; ++ "trk:102:https://www.googleapis.com/auth/chromewebstore.readonly"; // OAuth2 scope for access to Account Capabilities API. const char kAccountCapabilitiesOAuth2Scope[] = - "https://www.googleapis.com/auth/account.capabilities"; -+ "trk:105:https://www.googleapis.com/auth/account.capabilities"; ++ "trk:103:https://www.googleapis.com/auth/account.capabilities"; // OAuth2 scope for support content API. const char kSupportContentOAuth2Scope[] = - "https://www.googleapis.com/auth/supportcontent"; -+ "trk:106:https://www.googleapis.com/auth/supportcontent"; ++ "trk:104:https://www.googleapis.com/auth/supportcontent"; // OAuth 2 scope for NTP Photos module API. const char kPhotosModuleOAuth2Scope[] = -- "https://www.googleapis.com/auth/photos.firstparty.readonly"; -+ "trk:107:https://www.googleapis.com/auth/photos.firstparty.readonly"; - - // OAuth 2 scope for NTP Photos module image API. - const char kPhotosModuleImageOAuth2Scope[] = -- "https://www.googleapis.com/auth/photos.image.readonly"; -+ "trk:108:https://www.googleapis.com/auth/photos.image.readonly"; - - // Used to mint uber auth tokens when needed. - const char kGaiaSid[] = "sid"; ---- a/google_apis/gaia/gaia_urls.cc -+++ b/google_apis/gaia/gaia_urls.cc +--- google_apis/gaia/gaia_urls.cc.orig ++++ google_apis/gaia/gaia_urls.cc @@ -24,6 +24,7 @@ namespace { @@ -729,8 +720,8 @@ by default. const char kDefaultGoogleUrl[] = "http://google.com"; const char kDefaultGaiaUrl[] = "https://accounts.google.com"; const char kDefaultGoogleApisBaseUrl[] = "https://www.googleapis.com"; ---- a/google_apis/gcm/engine/gservices_settings.cc -+++ b/google_apis/gcm/engine/gservices_settings.cc +--- google_apis/gcm/engine/gservices_settings.cc.orig ++++ google_apis/gcm/engine/gservices_settings.cc @@ -30,18 +30,18 @@ const char kRegistrationURLKey[] = "gcm_ const int64_t kDefaultCheckinInterval = 2 * 24 * 60 * 60; // seconds = 2 days. @@ -753,8 +744,19 @@ by default. const int kMaxSecurePort = 65535; std::string MakeMCSEndpoint(const std::string& mcs_hostname, int port) { ---- a/remoting/base/breakpad_mac.mm -+++ b/remoting/base/breakpad_mac.mm +--- jingle/notifier/base/gaia_token_pre_xmpp_auth.cc.orig ++++ jingle/notifier/base/gaia_token_pre_xmpp_auth.cc +@@ -36,7 +36,7 @@ class GaiaCookieMechanism : public jingl + // These attributes are necessary for working with non-gmail gaia + // accounts. + const std::string NS_GOOGLE_AUTH_PROTOCOL( +- "http://www.google.com/talk/protocol/auth"); ++ "trk:179:http://www.google.com/talk/protocol/auth"); + const jingle_xmpp::QName QN_GOOGLE_ALLOW_GENERATED_JID_XMPP_LOGIN( + NS_GOOGLE_AUTH_PROTOCOL, "allow-generated-jid"); + const jingle_xmpp::QName QN_GOOGLE_AUTH_CLIENT_USES_FULL_BIND_RESULT( +--- remoting/base/breakpad_mac.mm.orig ++++ remoting/base/breakpad_mac.mm @@ -50,7 +50,7 @@ void InitializeCrashReporting() { breakpad_config[@BREAKPAD_REPORT_INTERVAL] = @"21600"; } @@ -764,8 +766,8 @@ by default. } if (!BreakpadCreate(breakpad_config)) { ---- a/remoting/protocol/jingle_messages.cc -+++ b/remoting/protocol/jingle_messages.cc +--- remoting/protocol/jingle_messages.cc.orig ++++ remoting/protocol/jingle_messages.cc @@ -27,7 +27,7 @@ const char kJabberNamespace[] = "jabber: const char kJingleNamespace[] = "urn:xmpp:jingle:1"; @@ -775,8 +777,8 @@ by default. const char kWebrtcTransportNamespace[] = "google:remoting:webrtc"; ---- a/rlz/lib/lib_values.cc -+++ b/rlz/lib/lib_values.cc +--- rlz/lib/lib_values.cc.orig ++++ rlz/lib/lib_values.cc @@ -40,7 +40,7 @@ const char kSetDccResponseVariable[] = " // @@ -786,8 +788,37 @@ by default. const int kFinancialPort = 443; // Ping times in 100-nanosecond intervals. ---- a/ui/accessibility/extensions/chromevoxclassic/chromevox/background/prefs.js -+++ b/ui/accessibility/extensions/chromevoxclassic/chromevox/background/prefs.js +--- third_party/libjingle_xmpp/xmpp/constants.cc.orig ++++ third_party/libjingle_xmpp/xmpp/constants.cc +@@ -194,7 +194,7 @@ const StaticQName QN_SASL_TEMPORARY_AUTH + + // These are non-standard. + const char NS_GOOGLE_AUTH_PROTOCOL[] = +- "http://www.google.com/talk/protocol/auth"; ++ "trk:236:http://www.google.com/talk/protocol/auth"; + const StaticQName QN_GOOGLE_AUTH_CLIENT_USES_FULL_BIND_RESULT = + { NS_GOOGLE_AUTH_PROTOCOL, "client-uses-full-bind-result" }; + const StaticQName QN_GOOGLE_ALLOW_NON_GOOGLE_ID_XMPP_LOGIN = +@@ -338,7 +338,7 @@ const char STR_SHOW_DND[] = "dnd"; + const char STR_SHOW_XA[] = "xa"; + const char STR_SHOW_OFFLINE[] = "offline"; + +-const char NS_GOOGLE_PSTN_CONFERENCE[] = "http://www.google.com/pstn-conference"; ++const char NS_GOOGLE_PSTN_CONFERENCE[] = "trk:237:http://www.google.com/pstn-conference"; + const StaticQName QN_GOOGLE_PSTN_CONFERENCE_STATUS = { NS_GOOGLE_PSTN_CONFERENCE, "status" }; + const StaticQName QN_ATTR_STATUS = { STR_EMPTY, "status" }; + +@@ -433,7 +433,7 @@ const StaticQName QN_MUC_ROLE = { NS_MUC + const char STR_AFFILIATION_NONE[] = "none"; + const char STR_ROLE_PARTICIPANT[] = "participant"; + +-const char NS_GOOGLE_SESSION[] = "http://www.google.com/session"; ++const char NS_GOOGLE_SESSION[] = "trk:238:http://www.google.com/session"; + const StaticQName QN_GOOGLE_CIRCLE_ID = { STR_EMPTY, "google-circle-id" }; + const StaticQName QN_GOOGLE_USER_ID = { STR_EMPTY, "google-user-id" }; + const StaticQName QN_GOOGLE_SESSION_BLOCKED = { NS_GOOGLE_SESSION, "blocked" }; +--- ui/accessibility/extensions/chromevoxclassic/chromevox/background/prefs.js.orig ++++ ui/accessibility/extensions/chromevoxclassic/chromevox/background/prefs.js @@ -72,9 +72,9 @@ cvox.ChromeVoxPrefs.DEFAULT_PREFS = { 'outputContextFirst': false, 'position': '{}', @@ -800,8 +831,8 @@ by default. 'sticky': false, 'typingEcho': 0, 'useIBeamCursor': cvox.ChromeVox.isMac, ---- a/ui/accessibility/extensions/chromevoxclassic/host/chrome/host.js -+++ b/ui/accessibility/extensions/chromevoxclassic/host/chrome/host.js +--- ui/accessibility/extensions/chromevoxclassic/host/chrome/host.js.orig ++++ ui/accessibility/extensions/chromevoxclassic/host/chrome/host.js @@ -96,9 +96,9 @@ cvox.ChromeHost.prototype.init = functio (!cvox.ApiImplementation.siteSpecificScriptLoader || !cvox.ApiImplementation.siteSpecificScriptBase); @@ -814,8 +845,8 @@ by default. if (apiPrefsChanged) { var searchInit = prefs['siteSpecificEnhancements'] === 'true' ? cvox.SearchLoader.init : ---- a/ui/views/examples/webview_example.cc -+++ b/ui/views/examples/webview_example.cc +--- ui/views/examples/webview_example.cc.orig ++++ ui/views/examples/webview_example.cc @@ -29,7 +29,7 @@ void WebViewExample::CreateExampleView(V webview_->GetWebContents()->SetDelegate(this); container->SetLayoutManager(std::make_unique<FillLayout>()); diff --git a/www/chromium-uc/patches/core/iridium-browser/safe_browsing-disable-incident-reporting.patch b/www/chromium-uc/patches/core/iridium-browser/safe_browsing-disable-incident-reporting.patch @@ -14,9 +14,9 @@ the URL so we get notified if this happens again in the future). .../security_interstitials/core/safe_browsing_loud_error_ui.cc | 1 + 5 files changed, 7 insertions(+), 4 deletions(-) ---- a/chrome/browser/safe_browsing/chrome_safe_browsing_blocking_page_factory.cc -+++ b/chrome/browser/safe_browsing/chrome_safe_browsing_blocking_page_factory.cc -@@ -36,8 +36,7 @@ ChromeSafeBrowsingBlockingPageFactory::C +--- chrome/browser/safe_browsing/chrome_safe_browsing_blocking_page_factory.cc.orig ++++ chrome/browser/safe_browsing/chrome_safe_browsing_blocking_page_factory.cc +@@ -35,8 +35,7 @@ ChromeSafeBrowsingBlockingPageFactory::C Profile::FromBrowserContext(web_contents->GetBrowserContext()); // Create appropriate display options for this blocking page. PrefService* prefs = profile->GetPrefs(); @@ -26,8 +26,8 @@ the URL so we get notified if this happens again in the future). bool is_proceed_anyway_disabled = prefs->GetBoolean(prefs::kSafeBrowsingProceedAnywayDisabled); ---- a/chrome/browser/safe_browsing/incident_reporting/incident_report_uploader_impl.cc -+++ b/chrome/browser/safe_browsing/incident_reporting/incident_report_uploader_impl.cc +--- chrome/browser/safe_browsing/incident_reporting/incident_report_uploader_impl.cc.orig ++++ chrome/browser/safe_browsing/incident_reporting/incident_report_uploader_impl.cc @@ -27,7 +27,7 @@ namespace safe_browsing { namespace { @@ -37,8 +37,8 @@ the URL so we get notified if this happens again in the future). constexpr net::NetworkTrafficAnnotationTag kSafeBrowsingIncidentTrafficAnnotation = ---- a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc -+++ b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc +--- chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc.orig ++++ chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc @@ -308,11 +308,14 @@ IncidentReportingService::UploadContext: // static @@ -54,9 +54,9 @@ the URL so we get notified if this happens again in the future). } IncidentReportingService::IncidentReportingService( ---- a/chrome/browser/safe_browsing/safe_browsing_service.cc -+++ b/chrome/browser/safe_browsing/safe_browsing_service.cc -@@ -278,7 +278,7 @@ SafeBrowsingUIManager* SafeBrowsingServi +--- chrome/browser/safe_browsing/safe_browsing_service.cc.orig ++++ chrome/browser/safe_browsing/safe_browsing_service.cc +@@ -286,7 +286,7 @@ SafeBrowsingUIManager* SafeBrowsingServi } void SafeBrowsingService::RegisterAllDelayedAnalysis() { @@ -65,8 +65,8 @@ the URL so we get notified if this happens again in the future). RegisterBinaryIntegrityAnalysis(); #endif } ---- a/components/security_interstitials/core/safe_browsing_loud_error_ui.cc -+++ b/components/security_interstitials/core/safe_browsing_loud_error_ui.cc +--- components/security_interstitials/core/safe_browsing_loud_error_ui.cc.orig ++++ components/security_interstitials/core/safe_browsing_loud_error_ui.cc @@ -25,11 +25,11 @@ namespace { // For malware interstitial pages, we link the problematic URL to Google's // diagnostic page. diff --git a/www/chromium-uc/patches/core/iridium-browser/safe_browsing-disable-reporting-of-safebrowsing-over.patch b/www/chromium-uc/patches/core/iridium-browser/safe_browsing-disable-reporting-of-safebrowsing-over.patch @@ -11,9 +11,9 @@ This prevents trk:148 (phishing) and trk:149 (malware). components/safe_browsing/content/browser/client_side_detection_service.cc | 5 +++++ 1 file changed, 5 insertions(+) ---- a/components/safe_browsing/content/browser/client_side_detection_service.cc -+++ b/components/safe_browsing/content/browser/client_side_detection_service.cc -@@ -217,6 +217,10 @@ void ClientSideDetectionService::StartCl +--- components/safe_browsing/content/browser/client_side_detection_service.cc.orig ++++ components/safe_browsing/content/browser/client_side_detection_service.cc +@@ -209,6 +209,10 @@ void ClientSideDetectionService::StartCl return; } @@ -24,7 +24,7 @@ This prevents trk:148 (phishing) and trk:149 (malware). // Fill in metadata about which model we used. *request->mutable_population() = delegate_->GetUserPopulation(); -@@ -296,6 +300,7 @@ void ClientSideDetectionService::StartCl +@@ -288,6 +292,7 @@ void ClientSideDetectionService::StartCl base::BindOnce(&WebUIInfoSingleton::AddToClientPhishingRequestsSent, base::Unretained(WebUIInfoSingleton::GetInstance()), std::move(request), access_token)); diff --git a/www/chromium-uc/patches/core/ungoogled-chromium/block-requests.patch b/www/chromium-uc/patches/core/ungoogled-chromium/block-requests.patch @@ -1,7 +1,7 @@ ## Prevent request attempts # chrome://discards/ attempts to use d3 to display the graph ---- a/chrome/browser/new_tab_page/one_google_bar/one_google_bar_loader_impl.cc -+++ b/chrome/browser/new_tab_page/one_google_bar/one_google_bar_loader_impl.cc +--- chrome/browser/new_tab_page/one_google_bar/one_google_bar_loader_impl.cc.orig ++++ chrome/browser/new_tab_page/one_google_bar/one_google_bar_loader_impl.cc @@ -286,6 +286,7 @@ OneGoogleBarLoaderImpl::OneGoogleBarLoad OneGoogleBarLoaderImpl::~OneGoogleBarLoaderImpl() = default; @@ -10,8 +10,8 @@ callbacks_.push_back(std::move(callback)); // Note: If there is an ongoing request, abandon it. It's possible that ---- a/chrome/browser/new_tab_page/promos/promo_service.cc -+++ b/chrome/browser/new_tab_page/promos/promo_service.cc +--- chrome/browser/new_tab_page/promos/promo_service.cc.orig ++++ chrome/browser/new_tab_page/promos/promo_service.cc @@ -138,6 +138,7 @@ PromoService::PromoService( PromoService::~PromoService() = default; @@ -20,8 +20,8 @@ net::NetworkTrafficAnnotationTag traffic_annotation = net::DefineNetworkTrafficAnnotation("promo_service", R"( semantics { ---- a/chrome/browser/resources/discards/graph_doc_template.html -+++ b/chrome/browser/resources/discards/graph_doc_template.html +--- chrome/browser/resources/discards/graph_doc_template.html.orig ++++ chrome/browser/resources/discards/graph_doc_template.html @@ -78,10 +78,6 @@ URL. As result, this document needs to b } @@ -33,8 +33,8 @@ <script type="application/javascript"> ${javascript_file} </script> ---- a/chrome/browser/search/background/ntp_background_service.cc -+++ b/chrome/browser/search/background/ntp_background_service.cc +--- chrome/browser/search/background/ntp_background_service.cc.orig ++++ chrome/browser/search/background/ntp_background_service.cc @@ -83,6 +83,7 @@ void NtpBackgroundService::Shutdown() { } @@ -43,8 +43,8 @@ if (collections_loader_ != nullptr) return; collection_error_info_.ClearError(); ---- a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc -+++ b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc +--- chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc.orig ++++ chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc @@ -286,6 +286,7 @@ GURL SpellcheckHunspellDictionary::GetDi } @@ -53,8 +53,8 @@ DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK(browser_context_); ---- a/components/assist_ranker/ranker_url_fetcher.cc -+++ b/components/assist_ranker/ranker_url_fetcher.cc +--- components/assist_ranker/ranker_url_fetcher.cc.orig ++++ components/assist_ranker/ranker_url_fetcher.cc @@ -31,6 +31,7 @@ bool RankerURLFetcher::Request( const GURL& url, RankerURLFetcher::Callback callback, @@ -63,11 +63,11 @@ // This function is not supposed to be called if the previous operation is not // finished. if (state_ == REQUESTING) { ---- a/components/update_client/update_checker.cc -+++ b/components/update_client/update_checker.cc -@@ -109,6 +109,7 @@ void UpdateCheckerImpl::CheckForUpdates( - const IdToComponentPtrMap& components, +--- components/update_client/update_checker.cc.orig ++++ components/update_client/update_checker.cc +@@ -129,6 +129,7 @@ void UpdateCheckerImpl::CheckForUpdates( const base::flat_map<std::string, std::string>& additional_attributes, + bool enabled_component_updates, UpdateCheckCallback update_check_callback) { + return; DCHECK(thread_checker_.CalledOnValidThread()); diff --git a/www/chromium-uc/patches/core/ungoogled-chromium/block-trk-and-subdomains.patch b/www/chromium-uc/patches/core/ungoogled-chromium/block-trk-and-subdomains.patch @@ -1,9 +1,9 @@ # Block all connection requests with 'qjz9zk' in the domain name or with a 'trk:' scheme. # This patch is based on Iridium's 'net: add "trk:" scheme and help identify URLs being retrieved' ---- a/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc -+++ b/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc -@@ -57,6 +57,7 @@ ChromeAutocompleteSchemeClassifier::GetI +--- chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.orig ++++ chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc +@@ -56,6 +56,7 @@ ChromeAutocompleteSchemeClassifier::GetI if (base::IsStringASCII(scheme) && (ProfileIOData::IsHandledProtocol(scheme) || base::LowerCaseEqualsASCII(scheme, content::kViewSourceScheme) || @@ -11,8 +11,8 @@ base::LowerCaseEqualsASCII(scheme, url::kJavaScriptScheme) || base::LowerCaseEqualsASCII(scheme, url::kDataScheme))) { return metrics::OmniboxInputType::URL; ---- a/chrome/browser/history/history_utils.cc -+++ b/chrome/browser/history/history_utils.cc +--- chrome/browser/history/history_utils.cc.orig ++++ chrome/browser/history/history_utils.cc @@ -21,6 +21,7 @@ bool CanAddURLToHistory(const GURL& url) url.SchemeIs(content::kChromeDevToolsScheme) || url.SchemeIs(content::kChromeUIScheme) || @@ -21,21 +21,21 @@ url.SchemeIs(chrome::kChromeNativeScheme) || url.SchemeIs(chrome::kChromeSearchScheme) || url.SchemeIs(dom_distiller::kDomDistillerScheme)) ---- a/chrome/browser/ui/singleton_tabs.cc -+++ b/chrome/browser/ui/singleton_tabs.cc -@@ -102,7 +102,8 @@ int GetIndexOfExistingTab(Browser* brows - // RewriteURLIfNecessary removes the "view-source:" scheme which could lead - // to incorrect matching, so ensure that the target and the candidate are - // either both view-source:, or neither is. -- if (tab_url.SchemeIs(content::kViewSourceScheme) != target_is_view_source) { -+ if (tab_url.SchemeIs(content::kViewSourceScheme) != target_is_view_source || -+ tab_url.SchemeIs(url::kTraceScheme)) { +--- chrome/browser/ui/singleton_tabs.cc.orig ++++ chrome/browser/ui/singleton_tabs.cc +@@ -99,7 +99,8 @@ int GetIndexOfExistingTab(Browser* brows + + // Skip view-source tabs. This is needed because RewriteURLIfNecessary + // removes the "view-source:" scheme which leads to incorrect matching. +- if (tab_url.SchemeIs(content::kViewSourceScheme)) ++ if (tab_url.SchemeIs(content::kViewSourceScheme) || ++ tab_url.SchemeIs(url::kTraceScheme)) continue; - } ---- a/components/omnibox/browser/autocomplete_input.cc -+++ b/components/omnibox/browser/autocomplete_input.cc -@@ -561,7 +561,8 @@ void AutocompleteInput::ParseForEmphasiz + GURL rewritten_tab_url = tab_url; +--- components/omnibox/browser/autocomplete_input.cc.orig ++++ components/omnibox/browser/autocomplete_input.cc +@@ -533,7 +533,8 @@ void AutocompleteInput::ParseForEmphasiz // For the view-source and blob schemes, we should emphasize the host of the // URL qualified by the view-source or blob prefix. if ((base::LowerCaseEqualsASCII(scheme_str, kViewSourceScheme) || @@ -45,8 +45,8 @@ (static_cast<int>(text.length()) > after_scheme_and_colon)) { // Obtain the URL prefixed by view-source or blob and parse it. std::u16string real_url(text.substr(after_scheme_and_colon)); ---- a/components/url_formatter/url_fixer.cc -+++ b/components/url_formatter/url_fixer.cc +--- components/url_formatter/url_fixer.cc.orig ++++ components/url_formatter/url_fixer.cc @@ -562,6 +562,10 @@ GURL FixupURL(const std::string& text, c } } @@ -58,19 +58,19 @@ // We handle the file scheme separately. if (scheme == url::kFileScheme) return GURL(parts.scheme.is_valid() ? text : FixupPath(text)); ---- a/content/browser/child_process_security_policy_impl.cc -+++ b/content/browser/child_process_security_policy_impl.cc -@@ -732,6 +732,7 @@ ChildProcessSecurityPolicyImpl::ChildPro - RegisterWebSafeScheme(url::kWssScheme); +--- content/browser/child_process_security_policy_impl.cc.orig ++++ content/browser/child_process_security_policy_impl.cc +@@ -861,6 +861,7 @@ ChildProcessSecurityPolicyImpl::ChildPro #endif // BUILDFLAG(ENABLE_WEBSOCKETS) + RegisterWebSafeScheme(url::kFtpScheme); RegisterWebSafeScheme(url::kDataScheme); + RegisterWebSafeScheme(url::kTraceScheme); + RegisterWebSafeScheme("feed"); // TODO(nick): https://crbug.com/651534 blob: and filesystem: schemes embed - // other origins, so we should not treat them as web safe. Remove callers of ---- a/net/BUILD.gn -+++ b/net/BUILD.gn -@@ -1019,6 +1019,8 @@ component("net") { +--- net/BUILD.gn.orig ++++ net/BUILD.gn +@@ -1010,6 +1010,8 @@ component("net") { "url_request/report_sender.h", "url_request/static_http_user_agent_settings.cc", "url_request/static_http_user_agent_settings.h", @@ -80,7 +80,7 @@ "url_request/url_fetcher.h", "url_request/url_fetcher_core.cc", --- /dev/null -+++ b/net/url_request/trk_protocol_handler.cc ++++ net/url_request/trk_protocol_handler.cc @@ -0,0 +1,25 @@ +// Copyright (c) 2018 The ungoogled-chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -108,8 +108,8 @@ + +} // namespace net --- /dev/null -+++ b/net/url_request/trk_protocol_handler.h -@@ -0,0 +1,30 @@ ++++ net/url_request/trk_protocol_handler.h +@@ -0,0 +1,32 @@ +// Copyright (c) 2018 The ungoogled-chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. @@ -118,6 +118,7 @@ +#define NET_URL_REQUEST_TRK_PROTOCOL_HANDLER_H_ + +#include "base/compiler_specific.h" ++#include "base/macros.h" +#include "net/base/net_export.h" +#include "net/url_request/url_request_job_factory.h" + @@ -130,18 +131,19 @@ + : public URLRequestJobFactory::ProtocolHandler { + public: + TrkProtocolHandler(); -+ TrkProtocolHandler(const TrkProtocolHandler&) = delete; -+ TrkProtocolHandler& operator=(const TrkProtocolHandler&) = delete; + std::unique_ptr<URLRequestJob> CreateJob( + URLRequest* request) const override; + bool IsSafeRedirectTarget(const GURL& location) const override; ++ ++ private: ++ DISALLOW_COPY_AND_ASSIGN(TrkProtocolHandler); +}; + +} // namespace net + +#endif // NET_URL_REQUEST_TRK_PROTOCOL_HANDLER_H_ ---- a/net/url_request/url_request.cc -+++ b/net/url_request/url_request.cc +--- net/url_request/url_request.cc.orig ++++ net/url_request/url_request.cc @@ -12,6 +12,7 @@ #include "base/compiler_specific.h" #include "base/metrics/histogram_macros.h" @@ -150,7 +152,7 @@ #include "base/strings/utf_string_conversions.h" #include "base/synchronization/lock.h" #include "base/threading/thread_task_runner_handle.h" -@@ -45,6 +46,7 @@ +@@ -46,6 +47,7 @@ #include "net/url_request/url_request_redirect_job.h" #include "url/gurl.h" #include "url/origin.h" @@ -158,7 +160,7 @@ using base::Time; using std::string; -@@ -609,6 +611,12 @@ URLRequest::URLRequest(const GURL& url, +@@ -595,6 +597,12 @@ URLRequest::URLRequest(const GURL& url, // Sanity check out environment. DCHECK(base::ThreadTaskRunnerHandle::IsSet()); @@ -171,17 +173,17 @@ context->url_requests()->insert(this); net_log_.BeginEvent(NetLogEventType::REQUEST_ALIVE, [&] { return NetLogURLRequestConstructorParams(url, priority_, ---- a/net/url_request/url_request_context_builder.cc -+++ b/net/url_request/url_request_context_builder.cc -@@ -48,6 +48,7 @@ - #include "net/socket/network_binding_client_socket_factory.h" +--- net/url_request/url_request_context_builder.cc.orig ++++ net/url_request/url_request_context_builder.cc +@@ -46,6 +46,7 @@ + #include "net/quic/quic_stream_factory.h" #include "net/ssl/ssl_config_service_defaults.h" #include "net/url_request/static_http_user_agent_settings.h" +#include "net/url_request/trk_protocol_handler.h" #include "net/url_request/url_request_context.h" #include "net/url_request/url_request_context_storage.h" #include "net/url_request/url_request_job_factory.h" -@@ -618,6 +619,9 @@ std::unique_ptr<URLRequestContext> URLRe +@@ -546,6 +547,9 @@ std::unique_ptr<URLRequestContext> URLRe } protocol_handlers_.clear(); @@ -191,30 +193,28 @@ storage->set_job_factory(std::move(job_factory)); return std::move(context); ---- a/url/url_constants.cc -+++ b/url/url_constants.cc -@@ -46,6 +46,8 @@ const char kQuicTransportScheme[] = "qui - const char16_t kQuicTransportScheme16[] = u"quic-transport"; +--- url/url_constants.cc.orig ++++ url/url_constants.cc +@@ -28,6 +28,7 @@ const char kMailToScheme[] = "mailto"; + // See also: https://www.iana.org/assignments/uri-schemes/prov/quic-transport + const char kQuicTransportScheme[] = "quic-transport"; const char kTelScheme[] = "tel"; - const char16_t kTelScheme16[] = u"tel"; +const char kTraceScheme[] = "trk"; -+const char16_t kTraceScheme16[] = u"trk"; const char kUrnScheme[] = "urn"; - const char16_t kUrnScheme16[] = u"urn"; - const char kUuidInPackageScheme[] = "uuid-in-package"; ---- a/url/url_constants.h -+++ b/url/url_constants.h -@@ -50,6 +50,8 @@ COMPONENT_EXPORT(URL) extern const char - COMPONENT_EXPORT(URL) extern const char16_t kQuicTransportScheme16[]; + const char kWsScheme[] = "ws"; + const char kWssScheme[] = "wss"; +--- url/url_constants.h.orig ++++ url/url_constants.h +@@ -32,6 +32,7 @@ COMPONENT_EXPORT(URL) extern const char + COMPONENT_EXPORT(URL) extern const char kMailToScheme[]; + COMPONENT_EXPORT(URL) extern const char kQuicTransportScheme[]; COMPONENT_EXPORT(URL) extern const char kTelScheme[]; - COMPONENT_EXPORT(URL) extern const char16_t kTelScheme16[]; +COMPONENT_EXPORT(URL) extern const char kTraceScheme[]; -+COMPONENT_EXPORT(URL) extern const char16_t kTraceScheme16[]; COMPONENT_EXPORT(URL) extern const char kUrnScheme[]; - COMPONENT_EXPORT(URL) extern const char16_t kUrnScheme16[]; - COMPONENT_EXPORT(URL) extern const char kUuidInPackageScheme[]; ---- a/url/url_util.cc -+++ b/url/url_util.cc + COMPONENT_EXPORT(URL) extern const char kWsScheme[]; + COMPONENT_EXPORT(URL) extern const char kWssScheme[]; +--- url/url_util.cc.orig ++++ url/url_util.cc @@ -63,7 +63,7 @@ struct SchemeRegistry { // Schemes that do not trigger mixed content warning. diff --git a/www/chromium-uc/patches/core/ungoogled-chromium/disable-crash-reporter.patch b/www/chromium-uc/patches/core/ungoogled-chromium/disable-crash-reporter.patch @@ -1,8 +1,8 @@ # Disable some background communication with clients2.google.com ---- a/components/crash/core/app/crashpad_linux.cc -+++ b/components/crash/core/app/crashpad_linux.cc -@@ -60,8 +60,7 @@ void SetFirstChanceExceptionHandler(bool +--- components/crash/core/app/crashpad_linux.cc.orig ++++ components/crash/core/app/crashpad_linux.cc +@@ -59,8 +59,7 @@ void SetFirstChanceExceptionHandler(bool } bool IsCrashpadEnabled() { diff --git a/www/chromium-uc/patches/core/ungoogled-chromium/disable-domain-reliability.patch b/www/chromium-uc/patches/core/ungoogled-chromium/disable-domain-reliability.patch @@ -2,8 +2,8 @@ # Many of these changes are for thoroughness, # the most significant changes are in service_factory.cc and uploader.cc ---- a/chrome/browser/domain_reliability/service_factory.cc -+++ b/chrome/browser/domain_reliability/service_factory.cc +--- chrome/browser/domain_reliability/service_factory.cc.orig ++++ chrome/browser/domain_reliability/service_factory.cc @@ -11,34 +11,12 @@ namespace domain_reliability { @@ -40,8 +40,8 @@ } } // namespace domain_reliability ---- a/components/domain_reliability/BUILD.gn -+++ b/components/domain_reliability/BUILD.gn +--- components/domain_reliability/BUILD.gn.orig ++++ components/domain_reliability/BUILD.gn @@ -7,26 +7,6 @@ action("bake_in_configs") { script = "bake_in_configs.py" @@ -98,8 +98,8 @@ } component("domain_reliability") { ---- a/components/domain_reliability/bake_in_configs.py -+++ b/components/domain_reliability/bake_in_configs.py +--- components/domain_reliability/bake_in_configs.py.orig ++++ components/domain_reliability/bake_in_configs.py @@ -490,7 +490,7 @@ def origin_is_whitelisted(origin): domain = origin[8:-1] else: @@ -109,9 +109,9 @@ def quote_and_wrap_text(text, width=79, prefix=' "', suffix='"'): ---- a/components/domain_reliability/google_configs.cc -+++ b/components/domain_reliability/google_configs.cc -@@ -11,548 +11,6 @@ +--- components/domain_reliability/google_configs.cc.orig ++++ components/domain_reliability/google_configs.cc +@@ -11,564 +11,6 @@ namespace domain_reliability { @@ -402,6 +402,9 @@ - {"ampproject.net", true, false, false}, - {"ampproject.org", true, false, false}, - {"android.com", true, false, false}, +- {"anycast-edge.metric.gstatic.com", true, false, false}, +- {"anycast-stb.metric.gstatic.com", true, false, false}, +- {"anycast.metric.gstatic.com", true, false, false}, - {"cdn.ampproject.org", true, false, false}, - {"chromecast.com", true, false, false}, - {"chromeexperiments.com", true, false, false}, @@ -458,6 +461,19 @@ - {"picasa.com", true, false, false}, - {"recaptcha.net", true, false, false}, - {"stackdriver.com", true, false, false}, +- {"stbcast-stb.metric.gstatic.com", true, false, false}, +- {"stbcast.metric.gstatic.com", true, false, false}, +- {"stbcast2-stb.metric.gstatic.com", true, false, false}, +- {"stbcast2.metric.gstatic.com", true, false, false}, +- {"stbcast3-stb.metric.gstatic.com", true, false, false}, +- {"stbcast3.metric.gstatic.com", true, false, false}, +- {"stbcast4-stb.metric.gstatic.com", true, false, false}, +- {"stbcast4.metric.gstatic.com", true, false, false}, +- {"unicast-edge.metric.gstatic.com", true, false, false}, +- {"unicast-stb.metric.gstatic.com", true, false, false}, +- {"unicast.metric.gstatic.com", true, false, false}, +- {"unicast2-stb.metric.gstatic.com", true, false, false}, +- {"unicast2.metric.gstatic.com", true, false, false}, - {"waze.com", true, false, false}, - {"withgoogle.com", true, false, false}, - {"youtu.be", true, false, false}, @@ -660,7 +676,7 @@ std::unique_ptr<const DomainReliabilityConfig> MaybeGetGoogleConfig( const std::string& hostname) { bool is_www_subdomain = -@@ -562,23 +20,6 @@ std::unique_ptr<const DomainReliabilityC +@@ -578,23 +20,6 @@ std::unique_ptr<const DomainReliabilityC std::unique_ptr<const DomainReliabilityConfig> config; std::unique_ptr<const DomainReliabilityConfig> superdomain_config; @@ -684,7 +700,7 @@ if (config) { DCHECK(config->origin.host() == hostname); return config; -@@ -597,11 +38,6 @@ std::vector<std::unique_ptr<const Domain +@@ -613,11 +38,6 @@ std::vector<std::unique_ptr<const Domain GetAllGoogleConfigsForTesting() { std::vector<std::unique_ptr<const DomainReliabilityConfig>> configs_out; @@ -696,9 +712,9 @@ return configs_out; } ---- a/components/domain_reliability/uploader.cc -+++ b/components/domain_reliability/uploader.cc -@@ -80,7 +80,7 @@ class DomainReliabilityUploaderImpl : pu +--- components/domain_reliability/uploader.cc.orig ++++ components/domain_reliability/uploader.cc +@@ -79,7 +79,7 @@ class DomainReliabilityUploaderImpl : pu if (discard_uploads_) discarded_upload_count_++; diff --git a/www/chromium-uc/patches/core/ungoogled-chromium/disable-floc.patch b/www/chromium-uc/patches/core/ungoogled-chromium/disable-floc.patch @@ -0,0 +1,78 @@ +--- chrome/browser/federated_learning/floc_id_provider_factory.cc.orig ++++ chrome/browser/federated_learning/floc_id_provider_factory.cc +@@ -49,42 +49,7 @@ FlocIdProviderFactory::~FlocIdProviderFa + + KeyedService* FlocIdProviderFactory::BuildServiceInstanceFor( + content::BrowserContext* context) const { +- if (!base::FeatureList::IsEnabled(kFederatedLearningOfCohorts)) +- return nullptr; +- +- Profile* profile = Profile::FromBrowserContext(context); +- +- syncer::SyncService* sync_service = +- SyncServiceFactory::GetForProfile(profile); +- if (!sync_service) +- return nullptr; +- +- PrivacySandboxSettings* privacy_sandbox_settings = +- PrivacySandboxSettingsFactory::GetForProfile(profile); +- if (!privacy_sandbox_settings) +- return nullptr; +- +- FlocRemotePermissionService* floc_remote_permission_service = +- FlocRemotePermissionServiceFactory::GetForProfile(profile); +- if (!floc_remote_permission_service) +- return nullptr; +- +- history::HistoryService* history_service = +- HistoryServiceFactory::GetForProfile(profile, +- ServiceAccessType::IMPLICIT_ACCESS); +- if (!history_service) +- return nullptr; +- +- syncer::UserEventService* user_event_service = +- browser_sync::UserEventServiceFactory::GetForProfile(profile); +- if (!user_event_service) +- return nullptr; +- +- auto floc_event_logger = std::make_unique<FlocEventLogger>( +- sync_service, floc_remote_permission_service, user_event_service); +- +- return new FlocIdProviderImpl(profile->GetPrefs(), privacy_sandbox_settings, +- history_service, std::move(floc_event_logger)); ++ return nullptr; + } + + } // namespace federated_learning +--- chrome/browser/privacy_sandbox/privacy_sandbox_settings.cc.orig ++++ chrome/browser/privacy_sandbox/privacy_sandbox_settings.cc +@@ -132,8 +132,7 @@ bool ShouldDisablePrivacySandbox( + + // Returns whether FLoC is allowable by the current state of |pref_service|. + bool IsFlocAllowedByPrefs(PrefService* pref_service) { +- return pref_service->GetBoolean(prefs::kPrivacySandboxFlocEnabled) && +- pref_service->GetBoolean(prefs::kPrivacySandboxApisEnabled); ++ return false; + } + + // Returns the number of days in |time|, rounded to the closest day by hour if +@@ -207,7 +206,7 @@ PrivacySandboxSettings::PrivacySandboxSe + PrivacySandboxSettings::~PrivacySandboxSettings() = default; + + bool PrivacySandboxSettings::IsFlocAllowed() const { +- return IsFlocAllowedByPrefs(pref_service_); ++ return false; + } + + bool PrivacySandboxSettings::IsFlocAllowedForContext( +--- components/privacy_sandbox/privacy_sandbox_prefs.cc.orig ++++ components/privacy_sandbox/privacy_sandbox_prefs.cc +@@ -42,7 +42,7 @@ void RegisterProfilePrefs(PrefRegistrySi + registry->RegisterTimePref(prefs::kPrivacySandboxFlocDataAccessibleSince, + base::Time()); + registry->RegisterBooleanPref( +- prefs::kPrivacySandboxFlocEnabled, true, ++ prefs::kPrivacySandboxFlocEnabled, false, + user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); + } + diff --git a/www/chromium-uc/patches/core/ungoogled-chromium/disable-fonts-googleapis-references.patch b/www/chromium-uc/patches/core/ungoogled-chromium/disable-fonts-googleapis-references.patch @@ -1,7 +1,7 @@ # Disables references to fonts.googleapis.com ---- a/chrome/browser/ash/child_accounts/time_limits/web_time_limit_error_page/resources/web_time_limit_error_page.html -+++ b/chrome/browser/ash/child_accounts/time_limits/web_time_limit_error_page/resources/web_time_limit_error_page.html +--- chrome/browser/ash/child_accounts/time_limits/web_time_limit_error_page/resources/web_time_limit_error_page.html.orig ++++ chrome/browser/ash/child_accounts/time_limits/web_time_limit_error_page/resources/web_time_limit_error_page.html @@ -5,7 +5,7 @@ <meta name="viewport" content="initial-scale=1, minimum-scale=1,width=device-width"> @@ -11,8 +11,8 @@ <link rel="stylesheet" href="../../../../../../../components/security_interstitials/core/common/resources/interstitial_core.css"> <link rel="stylesheet" href="../../../../../supervised_user/supervised_user_error_page/resources/supervised_user_block_interstitial.css"> </head> ---- a/chrome/browser/resources/chromeos/accessibility/chromevox/options/options.css -+++ b/chrome/browser/resources/chromeos/accessibility/chromevox/options/options.css +--- chrome/browser/resources/chromeos/accessibility/chromevox/options/options.css.orig ++++ chrome/browser/resources/chromeos/accessibility/chromevox/options/options.css @@ -2,7 +2,7 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ @@ -22,8 +22,8 @@ body { margin: 0 0 20px 0; ---- a/chrome/browser/resources/chromeos/accessibility/select_to_speak/options.css -+++ b/chrome/browser/resources/chromeos/accessibility/select_to_speak/options.css +--- chrome/browser/resources/chromeos/accessibility/select_to_speak/options.css.orig ++++ chrome/browser/resources/chromeos/accessibility/select_to_speak/options.css @@ -2,7 +2,7 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ @@ -33,8 +33,8 @@ body { margin: 0 0 20px 0; ---- a/chrome/browser/supervised_user/supervised_user_error_page/resources/supervised_user_block_interstitial.html -+++ b/chrome/browser/supervised_user/supervised_user_error_page/resources/supervised_user_block_interstitial.html +--- chrome/browser/supervised_user/supervised_user_error_page/resources/supervised_user_block_interstitial.html.orig ++++ chrome/browser/supervised_user/supervised_user_error_page/resources/supervised_user_block_interstitial.html @@ -5,7 +5,7 @@ <meta name="viewport" content="initial-scale=1, minimum-scale=1, width=device-width"> @@ -44,9 +44,9 @@ <link rel="stylesheet" href="../../../../../components/security_interstitials/core/common/resources/interstitial_core.css"> <link rel="stylesheet" href="supervised_user_block_interstitial.css"> <script src="../../../../../ui/webui/resources/js/cr.js"></script> ---- a/components/dom_distiller/content/browser/dom_distiller_viewer_source.cc -+++ b/components/dom_distiller/content/browser/dom_distiller_viewer_source.cc -@@ -298,7 +298,7 @@ bool DomDistillerViewerSource::ShouldSer +--- components/dom_distiller/content/browser/dom_distiller_viewer_source.cc.orig ++++ components/dom_distiller/content/browser/dom_distiller_viewer_source.cc +@@ -300,7 +300,7 @@ bool DomDistillerViewerSource::ShouldSer std::string DomDistillerViewerSource::GetContentSecurityPolicy( network::mojom::CSPDirectiveName directive) { if (directive == network::mojom::CSPDirectiveName::StyleSrc) { @@ -55,8 +55,8 @@ } else if (directive == network::mojom::CSPDirectiveName::ChildSrc) { return "child-src *;"; } else if (directive == ---- a/components/dom_distiller/core/html/preview.html -+++ b/components/dom_distiller/core/html/preview.html +--- components/dom_distiller/core/html/preview.html.orig ++++ components/dom_distiller/core/html/preview.html @@ -11,7 +11,7 @@ found in the LICENSE file. <meta name="theme-color" id="theme-color"> <title>Title goes here and it could be kind of lengthy - Publisher name</title> @@ -66,8 +66,8 @@ <style> .english :lang(th) {display: none} .english :lang(zh) {display: none} ---- a/components/dom_distiller/core/javascript/dom_distiller_viewer.js -+++ b/components/dom_distiller/core/javascript/dom_distiller_viewer.js +--- components/dom_distiller/core/javascript/dom_distiller_viewer.js.orig ++++ components/dom_distiller/core/javascript/dom_distiller_viewer.js @@ -109,7 +109,7 @@ function maybeSetWebFont() { } @@ -77,8 +77,8 @@ e.rel = 'stylesheet'; e.type = 'text/css'; document.head.appendChild(e); ---- a/third_party/crashpad/crashpad/doc/support/crashpad_doxygen.css -+++ b/third_party/crashpad/crashpad/doc/support/crashpad_doxygen.css +--- third_party/crashpad/crashpad/doc/support/crashpad_doxygen.css.orig ++++ third_party/crashpad/crashpad/doc/support/crashpad_doxygen.css @@ -12,8 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ @@ -89,8 +89,8 @@ body, table, ---- a/tools/md_browser/base.css -+++ b/tools/md_browser/base.css +--- tools/md_browser/base.css.orig ++++ tools/md_browser/base.css @@ -16,8 +16,7 @@ /* Common styles and definitions. */ diff --git a/www/chromium-uc/patches/core/ungoogled-chromium/disable-gaia.patch b/www/chromium-uc/patches/core/ungoogled-chromium/disable-gaia.patch @@ -1,9 +1,9 @@ # Disables Gaia code # Somehow it is still activated even without being signed-in: https://github.com/Eloston/ungoogled-chromium/issues/104 ---- a/google_apis/gaia/gaia_auth_fetcher.cc -+++ b/google_apis/gaia/gaia_auth_fetcher.cc -@@ -292,66 +292,6 @@ void GaiaAuthFetcher::CreateAndStartGaia +--- google_apis/gaia/gaia_auth_fetcher.cc.orig ++++ google_apis/gaia/gaia_auth_fetcher.cc +@@ -293,65 +293,6 @@ void GaiaAuthFetcher::CreateAndStartGaia network::mojom::CredentialsMode credentials_mode, const net::NetworkTrafficAnnotationTag& traffic_annotation) { DCHECK(!fetch_pending_) << "Tried to fetch two things at once!"; @@ -13,8 +13,7 @@ - original_url_ = gaia_gurl; - - if (credentials_mode != network::mojom::CredentialsMode::kOmit) { -- DCHECK_EQ(GaiaUrls::GetInstance()->gaia_url(), -- gaia_gurl.DeprecatedGetOriginAsURL()) +- DCHECK_EQ(GaiaUrls::GetInstance()->gaia_url(), gaia_gurl.GetOrigin()) - << gaia_gurl; - url::Origin origin = - url::Origin::Create(GaiaUrls::GetInstance()->gaia_url()); diff --git a/www/chromium-uc/patches/core/ungoogled-chromium/disable-gcm.patch b/www/chromium-uc/patches/core/ungoogled-chromium/disable-gcm.patch @@ -1,7 +1,7 @@ # Disable Google Cloud Messaging (GCM) client ---- a/components/gcm_driver/gcm_client_impl.cc -+++ b/components/gcm_driver/gcm_client_impl.cc +--- components/gcm_driver/gcm_client_impl.cc.orig ++++ components/gcm_driver/gcm_client_impl.cc @@ -465,6 +465,7 @@ void GCMClientImpl::StartGCM() { void GCMClientImpl::InitializeMCSClient() { @@ -52,7 +52,7 @@ - periodic_checkin_ptr_factory_.InvalidateWeakPtrs(); - - base::TimeDelta time_to_next_checkin = GetTimeToNextCheckin(); -- if (time_to_next_checkin.is_negative()) +- if (time_to_next_checkin < base::TimeDelta()) - time_to_next_checkin = base::TimeDelta(); - - io_task_runner_->PostDelayedTask( diff --git a/www/chromium-uc/patches/core/ungoogled-chromium/disable-google-host-detection.patch b/www/chromium-uc/patches/core/ungoogled-chromium/disable-google-host-detection.patch @@ -1,7 +1,7 @@ # Disables various detections of Google hosts and functionality specific to them ---- a/chrome/common/google_url_loader_throttle.cc -+++ b/chrome/common/google_url_loader_throttle.cc +--- chrome/common/google_url_loader_throttle.cc.orig ++++ chrome/common/google_url_loader_throttle.cc @@ -19,10 +19,6 @@ #include "ui/base/device_form_factor.h" #endif @@ -12,7 +12,7 @@ - namespace { - #if BUILDFLAG(IS_ANDROID) + #if defined(OS_ANDROID) @@ -65,52 +61,6 @@ void GoogleURLLoaderThrottle::DetachFrom void GoogleURLLoaderThrottle::WillStartRequest( network::ResourceRequest* request, @@ -43,7 +43,7 @@ - dynamic_params_.allowed_domains_for_apps); - } - --#if BUILDFLAG(IS_ANDROID) +-#if defined(OS_ANDROID) - if (!client_data_header_.empty() && - google_util::IsGoogleAssociatedDomainUrl(request->url)) { - request->cors_exempt_headers.SetHeader(kCCTClientDataHeader, @@ -95,7 +95,7 @@ - dynamic_params_.allowed_domains_for_apps); - } - --#if BUILDFLAG(IS_ANDROID) +-#if defined(OS_ANDROID) - if (!client_data_header_.empty() && - !google_util::IsGoogleAssociatedDomainUrl(redirect_info->new_url)) { - to_be_removed_headers->push_back(kCCTClientDataHeader); @@ -128,9 +128,9 @@ - } } #endif ---- a/components/google/core/common/google_util.cc -+++ b/components/google/core/common/google_util.cc -@@ -32,112 +32,6 @@ namespace google_util { +--- components/google/core/common/google_util.cc.orig ++++ components/google/core/common/google_util.cc +@@ -33,112 +33,6 @@ namespace google_util { namespace { @@ -243,7 +243,7 @@ } // namespace // Global functions ----------------------------------------------------------- -@@ -145,12 +39,6 @@ bool IsGoogleSearchSubdomainUrl(const GU +@@ -146,12 +40,6 @@ bool IsGoogleSearchSubdomainUrl(const GU const char kGoogleHomepageURL[] = "trk:113:https://www.google.com/"; bool HasGoogleSearchQueryParam(base::StringPiece str) { @@ -256,7 +256,7 @@ return false; } -@@ -161,161 +49,53 @@ std::string GetGoogleLocale(const std::s +@@ -162,161 +50,53 @@ std::string GetGoogleLocale(const std::s GURL AppendGoogleLocaleParam(const GURL& url, const std::string& application_locale) { @@ -428,9 +428,9 @@ return false; } ---- a/components/page_load_metrics/browser/page_load_metrics_util.cc -+++ b/components/page_load_metrics/browser/page_load_metrics_util.cc -@@ -199,9 +199,7 @@ bool DidObserveLoadingBehaviorInAnyFrame +--- components/page_load_metrics/browser/page_load_metrics_util.cc.orig ++++ components/page_load_metrics/browser/page_load_metrics_util.cc +@@ -196,9 +196,7 @@ bool DidObserveLoadingBehaviorInAnyFrame } bool IsGoogleSearchHostname(const GURL& url) { @@ -441,9 +441,9 @@ } bool IsGoogleSearchResultUrl(const GURL& url) { ---- a/components/page_load_metrics/common/page_load_metrics_util.cc -+++ b/components/page_load_metrics/common/page_load_metrics_util.cc -@@ -24,38 +24,7 @@ const int kExtraBufferTimerDelayMillis = +--- components/page_load_metrics/common/page_load_metrics_util.cc.orig ++++ components/page_load_metrics/common/page_load_metrics_util.cc +@@ -36,38 +36,7 @@ const char* kBufferTimerDelayParamName = } // namespace absl::optional<std::string> GetGoogleHostnamePrefix(const GURL& url) { @@ -483,9 +483,9 @@ } bool IsGoogleHostname(const GURL& url) { ---- a/components/search_engines/template_url.cc -+++ b/components/search_engines/template_url.cc -@@ -530,11 +530,7 @@ std::u16string TemplateURLRef::SearchTer +--- components/search_engines/template_url.cc.orig ++++ components/search_engines/template_url.cc +@@ -527,11 +527,7 @@ std::u16string TemplateURLRef::SearchTer bool TemplateURLRef::HasGoogleBaseURLs( const SearchTermsData& search_terms_data) const { ParseIfNecessary(search_terms_data); @@ -498,8 +498,8 @@ } bool TemplateURLRef::ExtractSearchTermsFromURL( ---- a/components/variations/net/variations_http_headers.cc -+++ b/components/variations/net/variations_http_headers.cc +--- components/variations/net/variations_http_headers.cc.orig ++++ components/variations/net/variations_http_headers.cc @@ -26,10 +26,6 @@ namespace variations { @@ -511,7 +511,7 @@ namespace { // The result of checking whether a request to a URL should have variations -@@ -238,30 +234,7 @@ class VariationsHeaderHelper { +@@ -238,29 +234,7 @@ class VariationsHeaderHelper { VariationsHeaderHelper& operator=(const VariationsHeaderHelper&) = delete; bool AppendHeaderIfNeeded(const GURL& url, InIncognito incognito) { @@ -533,9 +533,8 @@ - if (variations_header_.empty()) - return false; - -- // Set the variations header to cors_exempt_headers rather than headers to -- // be exempted from CORS checks, and to avoid exposing the header to service -- // workers. +- // Set the variations header to cors_exempt_headers rather than headers +- // to be exempted from CORS checks. - resource_request_->cors_exempt_headers.SetHeaderIfMissing( - kClientDataHeader, variations_header_); - return true; @@ -543,7 +542,7 @@ } private: -@@ -329,8 +302,6 @@ void RemoveVariationsHeaderIfNeeded( +@@ -328,8 +302,6 @@ void RemoveVariationsHeaderIfNeeded( const net::RedirectInfo& redirect_info, const network::mojom::URLResponseHead& response_head, std::vector<std::string>* to_be_removed_headers) { @@ -552,7 +551,13 @@ } std::unique_ptr<network::SimpleURLLoader> -@@ -360,9 +331,7 @@ CreateSimpleURLLoaderWithVariationsHeade +@@ -359,14 +331,11 @@ CreateSimpleURLLoaderWithVariationsHeade + } + + bool IsVariationsHeader(const std::string& header_name) { +- return header_name == kClientDataHeader || +- header_name == kOmniboxOnDeviceSuggestionsHeader; ++ return false; } bool HasVariationsHeader(const network::ResourceRequest& request) { @@ -563,7 +568,7 @@ } bool ShouldAppendVariationsHeaderForTesting( -@@ -373,12 +342,6 @@ bool ShouldAppendVariationsHeaderForTest +@@ -377,12 +346,6 @@ bool ShouldAppendVariationsHeaderForTest void UpdateCorsExemptHeaderForVariations( network::mojom::NetworkContextParams* params) { @@ -576,9 +581,9 @@ } } // namespace variations ---- a/net/base/url_util.cc -+++ b/net/base/url_util.cc -@@ -455,27 +455,6 @@ bool HasGoogleHost(const GURL& url) { +--- net/base/url_util.cc.orig ++++ net/base/url_util.cc +@@ -442,27 +442,6 @@ bool HasGoogleHost(const GURL& url) { } bool IsGoogleHost(base::StringPiece host) { diff --git a/www/chromium-uc/patches/core/ungoogled-chromium/disable-mei-preload.patch b/www/chromium-uc/patches/core/ungoogled-chromium/disable-mei-preload.patch @@ -5,9 +5,9 @@ # is enough local data to determine the user's preferred behavior." This feature # does not seem to outweigh the benefit of removing the binary, thus this patch. ---- a/chrome/BUILD.gn -+++ b/chrome/BUILD.gn -@@ -347,7 +347,6 @@ if (!is_android && !is_mac) { +--- chrome/BUILD.gn.orig ++++ chrome/BUILD.gn +@@ -351,7 +351,6 @@ if (!is_android && !is_mac) { } data_deps += [ @@ -15,8 +15,8 @@ "//third_party/widevine/cdm", ] } -@@ -1189,7 +1188,6 @@ if (is_win) { - ":optimization_guide_library", +@@ -1157,7 +1156,6 @@ if (is_win) { + ":keystone_registration_framework", ":swiftshader_library", ":widevine_cdm_library", - "//chrome/browser/resources/media/mei_preload:component_bundle", diff --git a/www/chromium-uc/patches/core/ungoogled-chromium/disable-network-time-tracker.patch b/www/chromium-uc/patches/core/ungoogled-chromium/disable-network-time-tracker.patch @@ -3,9 +3,9 @@ # date seems incorrect, according to https://bugs.chromium.org/p/chromium/issues/detail?id=725232, # Fixes https://github.com/Eloston/ungoogled-chromium/issues/302 ---- a/components/network_time/network_time_tracker.cc -+++ b/components/network_time/network_time_tracker.cc -@@ -273,7 +273,7 @@ void NetworkTimeTracker::UpdateNetworkTi +--- components/network_time/network_time_tracker.cc.orig ++++ components/network_time/network_time_tracker.cc +@@ -277,7 +277,7 @@ void NetworkTimeTracker::UpdateNetworkTi } bool NetworkTimeTracker::AreTimeFetchesEnabled() const { diff --git a/www/chromium-uc/patches/core/ungoogled-chromium/disable-privacy-sandbox.patch b/www/chromium-uc/patches/core/ungoogled-chromium/disable-privacy-sandbox.patch @@ -1,6 +1,26 @@ ---- a/chrome/browser/resources/settings/privacy_page/privacy_page.html -+++ b/chrome/browser/resources/settings/privacy_page/privacy_page.html -@@ -80,19 +80,6 @@ +--- chrome/browser/privacy_sandbox/privacy_sandbox_settings.cc.orig ++++ chrome/browser/privacy_sandbox/privacy_sandbox_settings.cc +@@ -378,7 +378,7 @@ std::vector<GURL> PrivacySandboxSettings + } + + bool PrivacySandboxSettings::IsPrivacySandboxAllowed() { +- return pref_service_->GetBoolean(prefs::kPrivacySandboxApisEnabled); ++ return false; + } + + bool PrivacySandboxSettings::IsPrivacySandboxEnabled() { +@@ -390,8 +390,6 @@ bool PrivacySandboxSettings::IsPrivacySa + } + + void PrivacySandboxSettings::SetPrivacySandboxEnabled(bool enabled) { +- pref_service_->SetBoolean(prefs::kPrivacySandboxManuallyControlled, true); +- pref_service_->SetBoolean(prefs::kPrivacySandboxApisEnabled, enabled); + } + + void PrivacySandboxSettings::OnCookiesCleared() { +--- chrome/browser/resources/settings/privacy_page/privacy_page.html.orig ++++ chrome/browser/resources/settings/privacy_page/privacy_page.html +@@ -64,19 +64,6 @@ sub-label="$i18n{permissionsPageDescription}" on-click="onPermissionsPageClick_" role-description="$i18n{subpageArrowRoleDescription}"></cr-link-row> @@ -9,7 +29,7 @@ - class="hr" - label="$i18n{privacySandboxTitle}" - sub-label="[[computePrivacySandboxSublabel_( -- prefs.privacy_sandbox.*)]]" +- prefs.privacy_sandbox.apis_enabled.*)]]" - on-click="onPrivacySandboxClick_" - external - role-description="$i18n{subpageArrowRoleDescription}"> @@ -20,48 +40,14 @@ </div> <if expr="use_nss_certs"> ---- a/components/privacy_sandbox/privacy_sandbox_prefs.cc -+++ b/components/privacy_sandbox/privacy_sandbox_prefs.cc -@@ -48,7 +48,7 @@ namespace privacy_sandbox { +--- components/privacy_sandbox/privacy_sandbox_prefs.cc.orig ++++ components/privacy_sandbox/privacy_sandbox_prefs.cc +@@ -31,7 +31,7 @@ namespace privacy_sandbox { void RegisterProfilePrefs(PrefRegistrySimple* registry) { registry->RegisterBooleanPref( - prefs::kPrivacySandboxApisEnabled, true, + prefs::kPrivacySandboxApisEnabled, false, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); - registry->RegisterBooleanPref(prefs::kPrivacySandboxApisEnabledV2, false); registry->RegisterBooleanPref( ---- a/components/privacy_sandbox/privacy_sandbox_settings.cc -+++ b/components/privacy_sandbox/privacy_sandbox_settings.cc -@@ -290,31 +290,10 @@ std::vector<GURL> PrivacySandboxSettings - } - - bool PrivacySandboxSettings::IsPrivacySandboxEnabled() const { -- // Which preference is consulted is dependent on whether release 3 of the -- // settings is available. -- if (base::FeatureList::IsEnabled(privacy_sandbox::kPrivacySandboxSettings3)) { -- // For Privacy Sandbox Settings 3, APIs are disabled in incognito. -- if (incognito_profile_) - return false; -- -- // The V2 pref was introduced with the 3rd Privacy Sandbox release. -- return pref_service_->GetBoolean(prefs::kPrivacySandboxApisEnabledV2); -- } -- -- return pref_service_->GetBoolean(prefs::kPrivacySandboxApisEnabled); - } - - void PrivacySandboxSettings::SetPrivacySandboxEnabled(bool enabled) { -- pref_service_->SetBoolean(prefs::kPrivacySandboxManuallyControlled, true); -- -- // Only apply the decision to the appropriate preference. Confirmation logic -- // DCHECKS that the user has not been able to enable the V2 preference -- // without seeing a dialog. -- if (base::FeatureList::IsEnabled(privacy_sandbox::kPrivacySandboxSettings3)) { -- pref_service_->SetBoolean(prefs::kPrivacySandboxApisEnabledV2, enabled); -- } else { -- pref_service_->SetBoolean(prefs::kPrivacySandboxApisEnabled, enabled); -- } - } - - bool PrivacySandboxSettings::IsTrustTokensAllowed() { + prefs::kPrivacySandboxManuallyControlled, false, diff --git a/www/chromium-uc/patches/core/ungoogled-chromium/disable-profile-avatar-downloading.patch b/www/chromium-uc/patches/core/ungoogled-chromium/disable-profile-avatar-downloading.patch @@ -1,7 +1,7 @@ # Stop downloading of profile avatar (trk:271:...) ---- a/chrome/browser/profiles/profile_avatar_downloader.cc -+++ b/chrome/browser/profiles/profile_avatar_downloader.cc +--- chrome/browser/profiles/profile_avatar_downloader.cc.orig ++++ chrome/browser/profiles/profile_avatar_downloader.cc @@ -27,8 +27,7 @@ ProfileAvatarDownloader::ProfileAvatarDo FetchCompleteCallback callback) : icon_index_(icon_index), callback_(std::move(callback)) { diff --git a/www/chromium-uc/patches/core/ungoogled-chromium/disable-signin.patch b/www/chromium-uc/patches/core/ungoogled-chromium/disable-signin.patch @@ -1,8 +1,8 @@ # Disables browser sign-in ---- a/chrome/browser/ui/chrome_pages.cc -+++ b/chrome/browser/ui/chrome_pages.cc -@@ -509,32 +509,6 @@ GURL GetOSSettingsUrl(const std::string& +--- chrome/browser/ui/chrome_pages.cc.orig ++++ chrome/browser/ui/chrome_pages.cc +@@ -480,32 +480,6 @@ GURL GetOSSettingsUrl(const std::string& void ShowBrowserSignin(Browser* browser, signin_metrics::AccessPoint access_point, signin::ConsentLevel consent_level) { diff --git a/www/chromium-uc/patches/core/ungoogled-chromium/disable-untraceable-urls.patch b/www/chromium-uc/patches/core/ungoogled-chromium/disable-untraceable-urls.patch @@ -1,7 +1,7 @@ # Disable additional URLs that are not caught by the "trk" scheme ---- a/chrome/browser/plugins/plugins_resource_service.cc -+++ b/chrome/browser/plugins/plugins_resource_service.cc +--- chrome/browser/plugins/plugins_resource_service.cc.orig ++++ chrome/browser/plugins/plugins_resource_service.cc @@ -53,9 +53,6 @@ const int kStartResourceFetchDelayMs = 6 // Delay between calls to update the cache 1 day and 2 minutes in testing mode. const int kCacheUpdateDelayMs = 24 * 60 * 60 * 1000; @@ -11,7 +11,7 @@ - GURL GetPluginsServerURL() { std::string filename; - #if BUILDFLAG(IS_WIN) + #if defined(OS_WIN) @@ -70,7 +67,7 @@ GURL GetPluginsServerURL() { #error Unknown platform #endif @@ -21,8 +21,37 @@ } } // namespace ---- a/rlz/lib/financial_ping.cc -+++ b/rlz/lib/financial_ping.cc +--- components/safe_browsing/content/browser/client_side_model_loader.cc.orig ++++ components/safe_browsing/content/browser/client_side_model_loader.cc +@@ -61,8 +61,6 @@ std::string ReadFileIntoString(base::Fil + // Model Loader strings + const size_t ModelLoader::kMaxModelSizeBytes = 150 * 1024; + const int ModelLoader::kClientModelFetchIntervalMs = 3600 * 1000; +-const char ModelLoader::kClientModelUrlPrefix[] = +- "https://ssl.gstatic.com/safebrowsing/csd/"; + const char ModelLoader::kClientModelNamePattern[] = + "client_model_v5%s_variation_%d.pb"; + #if !BUILDFLAG(FULL_SAFE_BROWSING) +@@ -123,7 +121,7 @@ ModelLoader::ModelLoader( + scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory, + bool is_extended_reporting) + : name_(FillInModelName(is_extended_reporting, GetModelNumber())), +- url_(kClientModelUrlPrefix + name_), ++ url_("about:blank"), + update_renderers_callback_(update_renderers_callback), + url_loader_factory_(url_loader_factory), + last_client_model_status_(ClientModelStatus::MODEL_NEVER_FETCHED) { +@@ -136,7 +134,7 @@ ModelLoader::ModelLoader( + scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory, + const std::string& model_name) + : name_(model_name), +- url_(kClientModelUrlPrefix + name_), ++ url_("about:blank"), + update_renderers_callback_(update_renderers_callback), + url_loader_factory_(url_loader_factory), + last_client_model_status_(ClientModelStatus::MODEL_NEVER_FETCHED) { +--- rlz/lib/financial_ping.cc.orig ++++ rlz/lib/financial_ping.cc @@ -338,7 +338,7 @@ FinancialPing::PingResponse FinancialPin // Open network connection. @@ -41,8 +70,8 @@ // Use a waitable event to cause this function to block, to match the // wininet implementation. ---- a/rlz/lib/lib_values.cc -+++ b/rlz/lib/lib_values.cc +--- rlz/lib/lib_values.cc.orig ++++ rlz/lib/lib_values.cc @@ -40,7 +40,6 @@ const char kSetDccResponseVariable[] = " // @@ -51,8 +80,8 @@ const int kFinancialPort = 443; // Ping times in 100-nanosecond intervals. ---- a/rlz/lib/lib_values.h -+++ b/rlz/lib/lib_values.h +--- rlz/lib/lib_values.h.orig ++++ rlz/lib/lib_values.h @@ -72,7 +72,6 @@ extern const char kSetDccResponseVariabl // diff --git a/www/chromium-uc/patches/core/ungoogled-chromium/disable-webrtc-log-uploader.patch b/www/chromium-uc/patches/core/ungoogled-chromium/disable-webrtc-log-uploader.patch @@ -1,7 +1,7 @@ # Disables WebRTC log uploading to Google ---- a/chrome/browser/media/webrtc/webrtc_log_uploader.cc -+++ b/chrome/browser/media/webrtc/webrtc_log_uploader.cc +--- chrome/browser/media/webrtc/webrtc_log_uploader.cc.orig ++++ chrome/browser/media/webrtc/webrtc_log_uploader.cc @@ -127,28 +127,11 @@ void WebRtcLogUploader::LoggingStoppedDo DCHECK(meta_data.get()); DCHECK(!upload_done_data.paths.directory.empty()); diff --git a/www/chromium-uc/patches/core/ungoogled-chromium/disable-webstore-urls.patch b/www/chromium-uc/patches/core/ungoogled-chromium/disable-webstore-urls.patch @@ -1,8 +1,8 @@ # Disables Chrome Webstore-related URLs and other internal functionality. Mainly for disabling auto updates via the Chrome Webstore. ---- a/chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc -+++ b/chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc -@@ -555,10 +555,6 @@ std::vector<url::Origin> ChromeContentBr +--- chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc.orig ++++ chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc +@@ -655,10 +655,6 @@ std::vector<url::Origin> ChromeContentBr GetOriginsRequiringDedicatedProcess() { std::vector<url::Origin> list; @@ -13,9 +13,9 @@ return list; } ---- a/chrome/browser/extensions/chrome_content_verifier_delegate.cc -+++ b/chrome/browser/extensions/chrome_content_verifier_delegate.cc -@@ -289,17 +289,7 @@ bool ChromeContentVerifierDelegate::IsFr +--- chrome/browser/extensions/chrome_content_verifier_delegate.cc.orig ++++ chrome/browser/extensions/chrome_content_verifier_delegate.cc +@@ -288,17 +288,7 @@ bool ChromeContentVerifierDelegate::IsFr // between which extensions are considered in-store. // See https://crbug.com/766806 for details. if (!InstallVerifier::IsFromStore(extension, context_)) { @@ -34,8 +34,8 @@ } return true; } ---- a/chrome/browser/extensions/extension_migrator.cc -+++ b/chrome/browser/extensions/extension_migrator.cc +--- chrome/browser/extensions/extension_migrator.cc.orig ++++ chrome/browser/extensions/extension_migrator.cc @@ -18,7 +18,9 @@ namespace extensions { ExtensionMigrator::ExtensionMigrator(Profile* profile, const std::string& old_id, @@ -56,26 +56,26 @@ prefs->SetKey(new_id_, base::Value::FromUniquePtrValue(std::move(entry))); } ---- a/chrome/browser/extensions/extension_migrator.h -+++ b/chrome/browser/extensions/extension_migrator.h +--- chrome/browser/extensions/extension_migrator.h.orig ++++ chrome/browser/extensions/extension_migrator.h @@ -9,6 +9,7 @@ - #include "base/memory/raw_ptr.h" + #include "base/macros.h" #include "chrome/browser/extensions/external_loader.h" +#include "url/gurl.h" class Profile; @@ -40,6 +41,7 @@ class ExtensionMigrator : public Externa - raw_ptr<Profile> profile_; + Profile* profile_; const std::string old_id_; const std::string new_id_; + GURL chrome_blank_; }; } // namespace extensions ---- a/extensions/browser/updater/extension_downloader.cc -+++ b/extensions/browser/updater/extension_downloader.cc +--- extensions/browser/updater/extension_downloader.cc.orig ++++ extensions/browser/updater/extension_downloader.cc @@ -93,27 +93,18 @@ const char kNotFromWebstoreInstallSource const char kDefaultInstallSource[] = ""; const char kReinstallInstallSource[] = "reinstall"; @@ -106,7 +106,7 @@ bool ShouldRetryRequest(const network::SimpleURLLoader* loader) { DCHECK(loader); -@@ -326,12 +317,6 @@ void ExtensionDownloader::DoStartAllPend +@@ -309,12 +300,6 @@ void ExtensionDownloader::DoStartAllPend ReportStats(); url_stats_ = URLStats(); @@ -119,18 +119,7 @@ fetches_preparing_.clear(); } -@@ -353,9 +338,7 @@ void ExtensionDownloader::SetBackoffPoli - - void ExtensionDownloader::UpdateURLStats(const GURL& update_url, - Manifest::Type extension_type) { -- if (update_url.DomainIs(kGoogleDotCom)) { -- url_stats_.google_url_count++; -- } else if (update_url.is_empty()) { -+ if (update_url.is_empty()) { - url_stats_.no_url_count++; - } else { - url_stats_.other_url_count++; -@@ -395,11 +378,6 @@ bool ExtensionDownloader::AddExtensionDa +@@ -353,11 +338,6 @@ bool ExtensionDownloader::AddExtensionDa return false; } @@ -140,18 +129,24 @@ - update_url = extension_urls::GetWebstoreUpdateUrl(); - // Skip extensions with empty IDs. - if (task.id.empty()) { + if (id.empty()) { DLOG(WARNING) << "Found extension with empty ID"; -@@ -411,7 +389,7 @@ bool ExtensionDownloader::AddExtensionDa - UpdateURLStats(update_url, task.type); - if (update_url.is_empty()) { +@@ -366,12 +346,10 @@ bool ExtensionDownloader::AddExtensionDa + return false; + } + +- if (update_url.DomainIs(kGoogleDotCom)) { +- url_stats_.google_url_count++; +- } else if (update_url.is_empty()) { ++ if (update_url.is_empty()) { + url_stats_.no_url_count++; // Fill in default update URL. - update_url = extension_urls::GetWebstoreUpdateUrl(); + update_url = GURL("chrome://blank/"); + } else { + url_stats_.other_url_count++; } - - DCHECK(!update_url.is_empty()); -@@ -864,20 +842,6 @@ void ExtensionDownloader::HandleManifest +@@ -845,20 +823,6 @@ void ExtensionDownloader::HandleManifest update->info); } @@ -172,7 +167,7 @@ NotifyExtensionsDownloadStageChanged( no_updates, ExtensionDownloaderDelegate::Stage::FINISHED); NotifyExtensionsDownloadFailed( -@@ -1436,11 +1400,7 @@ bool ExtensionDownloader::IterateFetchCr +@@ -1417,11 +1381,7 @@ bool ExtensionDownloader::IterateFetchCr // fetch. switch (fetch->credentials) { case ExtensionFetch::CREDENTIALS_NONE: diff --git a/www/chromium-uc/patches/core/ungoogled-chromium/doh-changes.patch b/www/chromium-uc/patches/core/ungoogled-chromium/doh-changes.patch @@ -1,11 +1,11 @@ ---- a/chrome/common/chrome_features.cc -+++ b/chrome/common/chrome_features.cc -@@ -329,12 +329,7 @@ const base::Feature kDesktopPWAsWebAppSe +--- chrome/common/chrome_features.cc.orig ++++ chrome/common/chrome_features.cc +@@ -323,12 +323,7 @@ const base::Feature kDesktopPWAsWebBundl // Enable DNS over HTTPS (DoH). const base::Feature kDnsOverHttps { "DnsOverHttps", --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ -- BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +-#if defined(OS_WIN) || defined(OS_CHROMEOS) || defined(OS_MAC) || \ +- defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD) - base::FEATURE_ENABLED_BY_DEFAULT -#else base::FEATURE_DISABLED_BY_DEFAULT @@ -13,9 +13,9 @@ }; // Provides a mechanism to remove providers from the dropdown list in the ---- a/net/dns/public/doh_provider_entry.cc -+++ b/net/dns/public/doh_provider_entry.cc -@@ -125,24 +125,6 @@ const DohProviderEntry::List& DohProvide +--- net/dns/public/doh_provider_entry.cc.orig ++++ net/dns/public/doh_provider_entry.cc +@@ -117,24 +117,6 @@ const DohProviderEntry::List& DohProvide /*privacy_policy=*/"https://dns.sb/privacy/", /*display_globally=*/false, /*display_countries=*/{"EE", "DE"}, LoggingLevel::kNormal), @@ -40,14 +40,14 @@ new DohProviderEntry("Iij", DohProviderIdForHistogram::kIij, {} /* ip_strs */, {} /* dns_over_tls_hostnames */, "https://public.dns.iij.jp/dns-query", ---- a/services/network/public/cpp/features.cc -+++ b/services/network/public/cpp/features.cc -@@ -92,12 +92,7 @@ const base::Feature kSplitAuthCacheByNet +--- services/network/public/cpp/features.cc.orig ++++ services/network/public/cpp/features.cc +@@ -114,12 +114,7 @@ const base::Feature kSplitAuthCacheByNet // Enable usage of hardcoded DoH upgrade mapping for use in automatic mode. const base::Feature kDnsOverHttpsUpgrade { "DnsOverHttpsUpgrade", --#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_MAC) || \ -- BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_WIN) +-#if BUILDFLAG(IS_CHROMEOS_ASH) || defined(OS_MAC) || defined(OS_ANDROID) || \ +- defined(OS_WIN) - base::FEATURE_ENABLED_BY_DEFAULT -#else base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/chromium-uc/patches/core/ungoogled-chromium/fix-building-with-prunned-binaries.patch b/www/chromium-uc/patches/core/ungoogled-chromium/fix-building-with-prunned-binaries.patch @@ -1,9 +1,9 @@ # Contains tests and features that are unneeded and would otherwise # require binaries to be whitelisted in the pruning list ---- a/chrome/test/chromedriver/BUILD.gn -+++ b/chrome/test/chromedriver/BUILD.gn -@@ -314,11 +314,7 @@ source_set("lib") { +--- chrome/test/chromedriver/BUILD.gn.orig ++++ chrome/test/chromedriver/BUILD.gn +@@ -311,11 +311,7 @@ source_set("lib") { } } @@ -15,7 +15,7 @@ executable("$chromedriver_output") { testonly = true -@@ -340,16 +336,6 @@ executable("$chromedriver_output") { +@@ -337,16 +333,6 @@ executable("$chromedriver_output") { } } @@ -32,11 +32,11 @@ python_library("chromedriver_py_tests") { testonly = true deps = [ ---- a/third_party/devtools-frontend/src/BUILD.gn -+++ b/third_party/devtools-frontend/src/BUILD.gn -@@ -13,7 +13,6 @@ import("./third_party/blink/public/publi - +--- third_party/devtools-frontend/src/BUILD.gn.orig ++++ third_party/devtools-frontend/src/BUILD.gn +@@ -136,7 +136,6 @@ foreach(module_file, non_autostart_non_r devtools_frontend_resources_deps = [ + ":build_release_devtools", "front_end", - "test", ] diff --git a/www/chromium-uc/patches/core/ungoogled-chromium/fix-building-without-enabling-reporting.patch b/www/chromium-uc/patches/core/ungoogled-chromium/fix-building-without-enabling-reporting.patch @@ -0,0 +1,215 @@ +--- content/browser/BUILD.gn.orig ++++ content/browser/BUILD.gn +@@ -1274,6 +1274,10 @@ source_set("browser") { + "net/browser_online_state_observer.cc", + "net/browser_online_state_observer.h", + "net/cookie_store_factory.cc", ++ "net/cross_origin_embedder_policy_reporter.cc", ++ "net/cross_origin_embedder_policy_reporter.h", ++ "net/cross_origin_opener_policy_reporter.cc", ++ "net/cross_origin_opener_policy_reporter.h", + "net/network_errors_listing_ui.cc", + "net/network_errors_listing_ui.h", + "net/network_quality_observer_impl.cc", +@@ -3034,10 +3038,6 @@ source_set("browser") { + + if (enable_reporting) { + sources += [ +- "net/cross_origin_embedder_policy_reporter.cc", +- "net/cross_origin_embedder_policy_reporter.h", +- "net/cross_origin_opener_policy_reporter.cc", +- "net/cross_origin_opener_policy_reporter.h", + "net/reporting_service_proxy.cc", + "net/reporting_service_proxy.h", + ] +--- content/browser/devtools/protocol/network_handler.h.orig ++++ content/browser/devtools/protocol/network_handler.h +@@ -309,8 +309,10 @@ class NetworkHandler : public DevToolsDo + Response response, + mojo::ScopedDataPipeConsumerHandle pipe, + const std::string& mime_type); ++#if BUILDFLAG(ENABLE_REPORTING) + std::unique_ptr<protocol::Network::ReportingApiReport> BuildProtocolReport( + const net::ReportingReport& report); ++#endif + + // TODO(dgozman): Remove this. + const std::string host_id_; +--- content/public/common/content_switch_dependent_feature_overrides.cc.orig ++++ content/public/common/content_switch_dependent_feature_overrides.cc +@@ -40,9 +40,11 @@ GetSwitchDependentFeatureOverrides(const + {switches::kEnableExperimentalWebPlatformFeatures, + std::cref(features::kDocumentPolicyNegotiation), + base::FeatureList::OVERRIDE_ENABLE_FEATURE}, ++#if BUILDFLAG(ENABLE_REPORTING) + {switches::kEnableExperimentalWebPlatformFeatures, + std::cref(net::features::kDocumentReporting), + base::FeatureList::OVERRIDE_ENABLE_FEATURE}, ++#endif + {switches::kEnableExperimentalWebPlatformFeatures, + std::cref(features::kExperimentalContentSecurityPolicyFeatures), + base::FeatureList::OVERRIDE_ENABLE_FEATURE}, +--- services/network/network_context.cc.orig ++++ services/network/network_context.cc +@@ -1140,6 +1140,11 @@ void NetworkContext::QueueSignedExchange + const net::NetworkIsolationKey& network_isolation_key) { + NOTREACHED(); + } ++ ++void NetworkContext::AddReportingApiObserver( ++ mojo::PendingRemote<network::mojom::ReportingApiObserver> observer) { ++ NOTREACHED(); ++} + #endif // BUILDFLAG(ENABLE_REPORTING) + + void NetworkContext::ClearDomainReliability( +--- services/network/network_context.h.orig ++++ services/network/network_context.h +@@ -570,10 +570,10 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) + return require_network_isolation_key_; + } + +-#if BUILDFLAG(ENABLE_REPORTING) + void AddReportingApiObserver( + mojo::PendingRemote<network::mojom::ReportingApiObserver> observer) + override; ++#if BUILDFLAG(ENABLE_REPORTING) + void OnReportAdded(const net::ReportingReport* service_report) override; + void OnReportUpdated(const net::ReportingReport* service_report) override; + void OnReportingObserverDisconnect(mojo::RemoteSetElementId mojo_id); +--- third_party/blink/renderer/core/frame/local_frame.cc.orig ++++ third_party/blink/renderer/core/frame/local_frame.cc +@@ -39,6 +39,7 @@ + #include "base/values.h" + #include "mojo/public/cpp/bindings/self_owned_receiver.h" + #include "mojo/public/cpp/system/message_pipe.h" ++#include "net/net_buildflags.h" + #include "services/data_decoder/public/mojom/resource_snapshot_for_web_bundle.mojom-blink.h" + #include "services/network/public/cpp/features.h" + #include "services/network/public/mojom/content_security_policy.mojom-blink.h" +@@ -2304,9 +2305,11 @@ const base::UnguessableToken& LocalFrame + return base::UnguessableToken::Null(); + } + ++#if BUILDFLAG(ENABLE_REPORTING) + mojom::blink::ReportingServiceProxy* LocalFrame::GetReportingService() { + return mojo_handler_->ReportingService(); + } ++#endif + + // static + void LocalFrame::NotifyUserActivation( +--- third_party/blink/renderer/core/frame/local_frame.h.orig ++++ third_party/blink/renderer/core/frame/local_frame.h +@@ -37,6 +37,7 @@ + #include "build/build_config.h" + #include "mojo/public/cpp/bindings/pending_associated_receiver.h" + #include "mojo/public/cpp/bindings/pending_receiver.h" ++#include "net/net_buildflags.h" + #include "services/device/public/mojom/device_posture_provider.mojom-blink-forward.h" + #include "services/network/public/mojom/fetch_api.mojom-blink-forward.h" + #include "third_party/blink/public/common/frame/frame_ad_evidence.h" +@@ -546,7 +547,9 @@ class CORE_EXPORT LocalFrame final : pub + + SmoothScrollSequencer& GetSmoothScrollSequencer(); + ++#if BUILDFLAG(ENABLE_REPORTING) + mojom::blink::ReportingServiceProxy* GetReportingService(); ++#endif + + // Returns the frame host ptr. The interface returned is backed by an + // associated interface with the legacy Chrome IPC channel. +--- third_party/blink/renderer/core/frame/reporting_context.cc.orig ++++ third_party/blink/renderer/core/frame/reporting_context.cc +@@ -4,6 +4,7 @@ + + #include "third_party/blink/renderer/core/frame/reporting_context.h" + ++#include "net/net_buildflags.h" + #include "third_party/blink/public/common/browser_interface_broker_proxy.h" + #include "third_party/blink/public/platform/platform.h" + #include "third_party/blink/public/platform/task_type.h" +@@ -54,7 +55,9 @@ const char ReportingContext::kSupplement + ReportingContext::ReportingContext(ExecutionContext& context) + : Supplement<ExecutionContext>(context), + execution_context_(context), ++#if BUILDFLAG(ENABLE_REPORTING) + reporting_service_(&context), ++#endif + receiver_(this, &context) {} + + // static +@@ -118,7 +121,9 @@ void ReportingContext::Trace(Visitor* vi + visitor->Trace(observers_); + visitor->Trace(report_buffer_); + visitor->Trace(execution_context_); ++#if BUILDFLAG(ENABLE_REPORTING) + visitor->Trace(reporting_service_); ++#endif + visitor->Trace(receiver_); + Supplement<ExecutionContext>::Trace(visitor); + } +@@ -140,6 +145,7 @@ void ReportingContext::CountReport(Repor + UseCounter::Count(execution_context_, feature); + } + ++#if BUILDFLAG(ENABLE_REPORTING) + const HeapMojoRemote<mojom::blink::ReportingServiceProxy>& + ReportingContext::GetReportingService() const { + if (!reporting_service_.is_bound()) { +@@ -149,6 +155,7 @@ ReportingContext::GetReportingService() + } + return reporting_service_; + } ++#endif + + void ReportingContext::NotifyInternal(Report* report) { + // Buffer the report. +@@ -171,6 +178,7 @@ void ReportingContext::NotifyInternal(Re + + void ReportingContext::SendToReportingAPI(Report* report, + const String& endpoint) const { ++#if BUILDFLAG(ENABLE_REPORTING) + const String& type = report->type(); + if (!(type == ReportType::kCSPViolation || type == ReportType::kDeprecation || + type == ReportType::kPermissionsPolicyViolation || +@@ -226,6 +234,7 @@ void ReportingContext::SendToReportingAP + url, endpoint, body->featureId(), body->disposition(), body->message(), + body->sourceFile(), line_number, column_number); + } ++#endif + } + + } // namespace blink +--- third_party/blink/renderer/core/frame/reporting_context.h.orig ++++ third_party/blink/renderer/core/frame/reporting_context.h +@@ -5,6 +5,7 @@ + #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_FRAME_REPORTING_CONTEXT_H_ + #define THIRD_PARTY_BLINK_RENDERER_CORE_FRAME_REPORTING_CONTEXT_H_ + ++#include "net/net_buildflags.h" + #include "third_party/blink/public/mojom/frame/reporting_observer.mojom-blink.h" + #include "third_party/blink/public/mojom/reporting/reporting.mojom-blink.h" + #include "third_party/blink/renderer/core/core_export.h" +@@ -54,8 +55,10 @@ class CORE_EXPORT ReportingContext : pub + // Counts the use of a report type via UseCounter. + void CountReport(Report*); + ++#if BUILDFLAG(ENABLE_REPORTING) + const HeapMojoRemote<mojom::blink::ReportingServiceProxy>& + GetReportingService() const; ++#endif + + void NotifyInternal(Report* report); + // Send |report| via the Reporting API to |endpoint|. +@@ -67,8 +70,10 @@ class CORE_EXPORT ReportingContext : pub + + // This is declared mutable so that the service endpoint can be cached by + // const methods. ++#if BUILDFLAG(ENABLE_REPORTING) + mutable HeapMojoRemote<mojom::blink::ReportingServiceProxy> + reporting_service_; ++#endif + + HeapMojoReceiver<mojom::blink::ReportingObserver, ReportingContext> receiver_; + }; diff --git a/www/chromium-uc/patches/core/ungoogled-chromium/fix-building-without-one-click-signin.patch b/www/chromium-uc/patches/core/ungoogled-chromium/fix-building-without-one-click-signin.patch @@ -1,7 +1,7 @@ # Fix building without one click signin ---- a/chrome/browser/ui/sync/one_click_signin_links_delegate_impl.cc -+++ b/chrome/browser/ui/sync/one_click_signin_links_delegate_impl.cc +--- chrome/browser/ui/sync/one_click_signin_links_delegate_impl.cc.orig ++++ chrome/browser/ui/sync/one_click_signin_links_delegate_impl.cc @@ -16,9 +16,4 @@ OneClickSigninLinksDelegateImpl::OneClic OneClickSigninLinksDelegateImpl::~OneClickSigninLinksDelegateImpl() {} @@ -12,17 +12,17 @@ - : WindowOpenDisposition::NEW_FOREGROUND_TAB; - Navigate(¶ms); } ---- a/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc -+++ b/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc -@@ -342,6 +342,7 @@ void InlineSigninHelper::OnClientOAuthSu - void InlineSigninHelper::OnClientOAuthSuccessAndBrowserOpened( +--- chrome/browser/ui/webui/signin/inline_login_handler_impl.cc.orig ++++ chrome/browser/ui/webui/signin/inline_login_handler_impl.cc +@@ -360,6 +360,7 @@ void InlineSigninHelper::OnClientOAuthSu const ClientOAuthResult& result, - Profile* /*profile*/) { + Profile* /*profile*/, + Profile::CreateStatus /*status*/) { +#if BUILDFLAG(ENABLE_ONE_CLICK_SIGNIN) HandlerSigninReason reason = GetHandlerSigninReason(current_url_); if (reason == HandlerSigninReason::kFetchLstOnly) { // Constants are only available on Windows for the Google Credential -@@ -418,6 +419,7 @@ void InlineSigninHelper::OnClientOAuthSu +@@ -436,6 +437,7 @@ void InlineSigninHelper::OnClientOAuthSu } base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this); diff --git a/www/chromium-uc/patches/core/ungoogled-chromium/fix-building-without-safebrowsing.patch b/www/chromium-uc/patches/core/ungoogled-chromium/fix-building-without-safebrowsing.patch @@ -1,8 +1,8 @@ # Additional changes to Inox's fix-building-without-safebrowsing.patch ---- a/chrome/browser/BUILD.gn -+++ b/chrome/browser/BUILD.gn -@@ -1927,7 +1927,6 @@ static_library("browser") { +--- chrome/browser/BUILD.gn.orig ++++ chrome/browser/BUILD.gn +@@ -1953,7 +1953,6 @@ static_library("browser") { "//chrome/browser/net:probe_message_proto", "//chrome/browser/new_tab_page/modules/drive:mojo_bindings", "//chrome/browser/new_tab_page/modules/photos:mojo_bindings", @@ -10,7 +10,7 @@ "//chrome/browser/new_tab_page/modules/task_module:mojo_bindings", "//chrome/browser/notifications", "//chrome/browser/notifications/scheduler:factory", -@@ -3739,9 +3738,6 @@ static_library("browser") { +@@ -3726,9 +3725,6 @@ static_library("browser") { "download/offline_item_model_manager_factory.h", "enterprise/connectors/analysis/analysis_service_settings.cc", "enterprise/connectors/analysis/analysis_service_settings.h", @@ -20,7 +20,7 @@ "enterprise/connectors/analysis/content_analysis_dialog.cc", "enterprise/connectors/analysis/content_analysis_dialog.h", "enterprise/connectors/analysis/content_analysis_downloads_delegate.cc", -@@ -3988,10 +3984,6 @@ static_library("browser") { +@@ -3978,10 +3974,6 @@ static_library("browser") { "new_tab_page/modules/photos/photos_service.h", "new_tab_page/modules/photos/photos_service_factory.cc", "new_tab_page/modules/photos/photos_service_factory.h", @@ -31,7 +31,7 @@ "new_tab_page/modules/task_module/task_module_handler.cc", "new_tab_page/modules/task_module/task_module_handler.h", "new_tab_page/modules/task_module/task_module_service.cc", -@@ -7285,9 +7277,14 @@ static_library("browser") { +@@ -7012,9 +7004,14 @@ static_library("browser") { "//components/safe_browsing/content/browser:safe_browsing_blocking_page", "//components/safe_browsing/content/browser/download:download_stats", "//components/safe_browsing/content/common:file_type_policies", @@ -47,8 +47,8 @@ if (!is_fuchsia) { sources += [ ---- a/chrome/browser/accuracy_tips/accuracy_service_factory.cc -+++ b/chrome/browser/accuracy_tips/accuracy_service_factory.cc +--- chrome/browser/accuracy_tips/accuracy_service_factory.cc.orig ++++ chrome/browser/accuracy_tips/accuracy_service_factory.cc @@ -48,10 +48,7 @@ KeyedService* AccuracyServiceFactory::Bu content::BrowserContext* browser_context) const { DCHECK(base::FeatureList::IsEnabled(safe_browsing::kAccuracyTipsFeature)); @@ -61,9 +61,9 @@ auto* history_service = HistoryServiceFactory::GetForProfile( profile, ServiceAccessType::IMPLICIT_ACCESS); auto delegate = std::make_unique<AccuracyServiceDelegate>(profile); ---- a/chrome/browser/chrome_content_browser_client.cc -+++ b/chrome/browser/chrome_content_browser_client.cc -@@ -4285,11 +4285,13 @@ ChromeContentBrowserClient::CreateThrott +--- chrome/browser/chrome_content_browser_client.cc.orig ++++ chrome/browser/chrome_content_browser_client.cc +@@ -4229,11 +4229,13 @@ ChromeContentBrowserClient::CreateThrott &throttles); #endif @@ -77,7 +77,7 @@ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -@@ -5689,26 +5691,7 @@ ChromeContentBrowserClient::GetSafeBrows +@@ -5632,26 +5634,7 @@ ChromeContentBrowserClient::GetSafeBrows const std::vector<std::string>& allowlist_domains) { DCHECK_CURRENTLY_ON(BrowserThread::IO); @@ -105,7 +105,7 @@ } safe_browsing::RealTimeUrlLookupServiceBase* -@@ -5729,11 +5712,6 @@ ChromeContentBrowserClient::GetUrlLookup +@@ -5672,11 +5655,6 @@ ChromeContentBrowserClient::GetUrlLookup GetForProfile(profile); } #endif @@ -117,9 +117,9 @@ return nullptr; } ---- a/chrome/browser/chrome_content_browser_client_receiver_bindings.cc -+++ b/chrome/browser/chrome_content_browser_client_receiver_bindings.cc -@@ -143,45 +143,6 @@ void MaybeCreateSafeBrowsingForRenderer( +--- chrome/browser/chrome_content_browser_client_receiver_bindings.cc.orig ++++ chrome/browser/chrome_content_browser_client_receiver_bindings.cc +@@ -139,45 +139,6 @@ void MaybeCreateSafeBrowsingForRenderer( const std::vector<std::string>& allowlist_domains)> get_checker_delegate, mojo::PendingReceiver<safe_browsing::mojom::SafeBrowsing> receiver) { @@ -165,9 +165,9 @@ } // BadgeManager is not used for Android. ---- a/chrome/browser/component_updater/chrome_client_side_phishing_component_installer.cc -+++ b/chrome/browser/component_updater/chrome_client_side_phishing_component_installer.cc -@@ -30,20 +30,6 @@ namespace { +--- chrome/browser/component_updater/client_side_phishing_component_installer.cc.orig ++++ chrome/browser/component_updater/client_side_phishing_component_installer.cc +@@ -36,20 +36,6 @@ const char kClientSidePhishingManifestNa void LoadFromDisk(const base::FilePath& pb_path, const base::FilePath& visual_tflite_model_path) { @@ -187,9 +187,9 @@ - ->PopulateFromDynamicUpdate(binary_pb, std::move(visual_tflite_model)); } - void PopulateModelFromFiles(const base::FilePath& install_dir) { -@@ -57,9 +43,6 @@ void PopulateModelFromFiles(const base:: - update_client::InstallerAttributes GetInstallerAttributes() { + base::FilePath GetInstalledProtoPath(const base::FilePath& base) { +@@ -123,9 +109,6 @@ update_client::InstallerAttributes + ClientSidePhishingComponentInstallerPolicy::GetInstallerAttributes() const { update_client::InstallerAttributes attributes; - // Pass the tag parameter to the installer as the "tag" attribute; it will @@ -198,9 +198,9 @@ return attributes; } ---- a/chrome/browser/download/chrome_download_manager_delegate.cc -+++ b/chrome/browser/download/chrome_download_manager_delegate.cc -@@ -130,7 +130,6 @@ using content::DownloadManager; +--- chrome/browser/download/chrome_download_manager_delegate.cc.orig ++++ chrome/browser/download/chrome_download_manager_delegate.cc +@@ -135,7 +135,6 @@ using content::DownloadManager; using download::DownloadItem; using download::DownloadPathReservationTracker; using download::PathValidationResult; @@ -208,7 +208,7 @@ using safe_browsing::DownloadProtectionService; using ConnectionType = net::NetworkChangeNotifier::ConnectionType; -@@ -1527,8 +1526,6 @@ void ChromeDownloadManagerDelegate::OnDo +@@ -1517,8 +1516,6 @@ void ChromeDownloadManagerDelegate::OnDo if (item->GetOriginalMimeType() == "application/x-x509-user-cert") DownloadItemModel(item).SetShouldPreferOpeningInBrowser(true); #endif @@ -217,7 +217,7 @@ } if (ShouldBlockFile(target_info->danger_type, item)) { MaybeReportDangerousDownloadBlocked( -@@ -1680,7 +1677,6 @@ void ChromeDownloadManagerDelegate::Mayb +@@ -1670,7 +1667,6 @@ void ChromeDownloadManagerDelegate::Mayb service->MaybeSendDangerousDownloadOpenedReport(download, show_download_in_folder); } @@ -225,7 +225,7 @@ if (!download->GetAutoOpened()) { download::DownloadContent download_content = download::DownloadContentFromMimeType(download->GetMimeType(), false); -@@ -1688,6 +1684,7 @@ void ChromeDownloadManagerDelegate::Mayb +@@ -1678,6 +1674,7 @@ void ChromeDownloadManagerDelegate::Mayb download->GetDangerType(), download_content, base::Time::Now(), download->GetEndTime(), show_download_in_folder); } @@ -233,7 +233,7 @@ } void ChromeDownloadManagerDelegate::CheckDownloadAllowed( -@@ -1764,30 +1761,6 @@ void ChromeDownloadManagerDelegate::Chec +@@ -1754,30 +1751,6 @@ void ChromeDownloadManagerDelegate::Chec std::move(callback).Run(true); return; } @@ -264,17 +264,17 @@ #endif std::move(callback).Run(true); } ---- a/chrome/browser/download/download_stats.cc -+++ b/chrome/browser/download/download_stats.cc -@@ -9,6 +9,7 @@ +--- chrome/browser/download/download_stats.cc.orig ++++ chrome/browser/download/download_stats.cc +@@ -8,6 +8,7 @@ + #include "base/metrics/user_metrics.h" #include "base/notreached.h" - #include "build/build_config.h" #include "components/profile_metrics/browser_profile_type.h" +#include "components/safe_browsing/buildflags.h" #include "components/safe_browsing/content/browser/download/download_stats.h" void RecordDownloadCount(ChromeDownloadCountTypes type) { -@@ -28,8 +29,10 @@ void RecordDangerousDownloadWarningShown +@@ -27,8 +28,10 @@ void RecordDangerousDownloadWarningShown bool has_user_gesture) { base::UmaHistogramEnumeration("Download.ShowedDownloadWarning", danger_type, download::DOWNLOAD_DANGER_TYPE_MAX); @@ -285,24 +285,23 @@ } void RecordOpenedDangerousConfirmDialog( ---- a/chrome/browser/download/download_target_determiner.cc -+++ b/chrome/browser/download/download_target_determiner.cc -@@ -869,12 +869,14 @@ void DownloadTargetDeterminer::CheckVisi +--- chrome/browser/download/download_target_determiner.cc.orig ++++ chrome/browser/download/download_target_determiner.cc +@@ -872,11 +872,13 @@ void DownloadTargetDeterminer::CheckVisi bool visited_referrer_before) { DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK_EQ(STATE_DETERMINE_INTERMEDIATE_PATH, next_state_); +#if BUILDFLAG(FULL_SAFE_BROWSING) safe_browsing::RecordDownloadFileTypeAttributes( safe_browsing::FileTypePolicies::GetInstance()->GetFileDangerLevel( - virtual_path_.BaseName(), download_->GetURL(), - GetProfile()->GetPrefs()), + virtual_path_.BaseName()), download_->HasUserGesture(), visited_referrer_before, GetLastDownloadBypassTimestamp()); +#endif // BUILDFLAG(FULL_SAFE_BROWSING) danger_level_ = GetDangerLevel( visited_referrer_before ? VISITED_REFERRER : NO_VISITS_TO_REFERRER); if (danger_level_ != DownloadFileType::NOT_DANGEROUS && -@@ -1109,6 +1111,7 @@ DownloadFileType::DangerLevel DownloadTa +@@ -1111,6 +1113,7 @@ DownloadFileType::DangerLevel DownloadTa absl::optional<base::Time> DownloadTargetDeterminer::GetLastDownloadBypassTimestamp() const { @@ -310,7 +309,7 @@ safe_browsing::SafeBrowsingMetricsCollector* metrics_collector = safe_browsing::SafeBrowsingMetricsCollectorFactory::GetForProfile( GetProfile()); -@@ -1117,6 +1120,9 @@ DownloadTargetDeterminer::GetLastDownloa +@@ -1119,6 +1122,9 @@ DownloadTargetDeterminer::GetLastDownloa safe_browsing::SafeBrowsingMetricsCollector:: EventType::DANGEROUS_DOWNLOAD_BYPASS) : absl::nullopt; @@ -320,19 +319,19 @@ } void DownloadTargetDeterminer::OnDownloadDestroyed( ---- a/chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc -+++ b/chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc -@@ -33,7 +33,6 @@ +--- chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc.orig ++++ chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc +@@ -32,7 +32,6 @@ #include "chrome/browser/safe_browsing/cloud_content_scanning/binary_upload_service_factory.h" #include "chrome/browser/safe_browsing/cloud_content_scanning/deep_scanning_utils.h" #include "chrome/browser/safe_browsing/cloud_content_scanning/file_analysis_request.h" -#include "chrome/browser/safe_browsing/download_protection/check_client_download_request.h" #include "chrome/grit/generated_resources.h" #include "components/enterprise/common/proto/connectors.pb.h" - #include "components/policy/core/common/chrome_schema.h" ---- a/chrome/browser/enterprise/connectors/connectors_service.cc -+++ b/chrome/browser/enterprise/connectors/connectors_service.cc -@@ -460,19 +460,6 @@ absl::optional<std::string> ConnectorsSe + #include "components/policy/core/browser/url_util.h" +--- chrome/browser/enterprise/connectors/connectors_service.cc.orig ++++ chrome/browser/enterprise/connectors/connectors_service.cc +@@ -475,19 +475,6 @@ absl::optional<std::string> ConnectorsSe return absl::nullopt; } @@ -352,9 +351,9 @@ ConnectorsManager* ConnectorsService::ConnectorsManagerForTesting() { return connectors_manager_.get(); } ---- a/chrome/browser/enterprise/connectors/connectors_service.h -+++ b/chrome/browser/enterprise/connectors/connectors_service.h -@@ -80,12 +80,6 @@ class ConnectorsService : public KeyedSe +--- chrome/browser/enterprise/connectors/connectors_service.h.orig ++++ chrome/browser/enterprise/connectors/connectors_service.h +@@ -78,12 +78,6 @@ class ConnectorsService : public KeyedSe // is no token to use. absl::optional<std::string> GetDMTokenForRealTimeUrlCheck() const; @@ -367,18 +366,18 @@ // Returns the CBCM domain or profile domain that enables connector policies. // If both set Connector policies, the CBCM domain is returned as it has // precedence. ---- a/chrome/browser/enterprise/connectors/device_trust/signals/decorators/common/common_signals_decorator.cc -+++ b/chrome/browser/enterprise/connectors/device_trust/signals/decorators/common/common_signals_decorator.cc -@@ -41,9 +41,6 @@ void CommonSignalsDecorator::Decorate(Si +--- chrome/browser/enterprise/connectors/device_trust/signals/decorators/common/common_signals_decorator.cc.orig ++++ chrome/browser/enterprise/connectors/device_trust/signals/decorators/common/common_signals_decorator.cc +@@ -38,9 +38,6 @@ void CommonSignalsDecorator::Decorate(Si // Get signals from policy values. signals.set_built_in_dns_client_enabled( enterprise_signals::utils::GetBuiltInDnsClientEnabled(local_state_)); - signals.set_safe_browsing_protection_level(static_cast<int32_t>( - enterprise_signals::utils::GetSafeBrowsingProtectionLevel( - profile_prefs_))); - - absl::optional<bool> third_party_blocking_enabled = - enterprise_signals::utils::GetThirdPartyBlockingEnabled(local_state_); + signals.set_remote_desktop_available( + enterprise_signals::utils::GetChromeRemoteDesktopAppBlocked( + policy_blocklist_service_)); @@ -58,15 +55,6 @@ void CommonSignalsDecorator::Decorate(Si signals.set_chrome_cleanup_enabled(chrome_cleanup_enabled.value()); } @@ -392,12 +391,12 @@ - static_cast<int32_t>(password_protection_warning_trigger.value())); - } - - if (cached_device_model_ && cached_device_manufacturer_) { - UpdateFromCache(signals); - LogSignalsCollectionLatency(kLatencyHistogramWithCacheVariant, start_time); ---- a/chrome/browser/enterprise/signals/context_info_fetcher.cc -+++ b/chrome/browser/enterprise/signals/context_info_fetcher.cc -@@ -204,7 +204,6 @@ void ContextInfoFetcher::Fetch(ContextIn + std::move(done_closure).Run(); + } + +--- chrome/browser/enterprise/signals/context_info_fetcher.cc.orig ++++ chrome/browser/enterprise/signals/context_info_fetcher.cc +@@ -169,7 +169,6 @@ void ContextInfoFetcher::Fetch(ContextIn GetAnalysisConnectorProviders(enterprise_connectors::FILE_DOWNLOADED); info.on_bulk_data_entry_providers = GetAnalysisConnectorProviders(enterprise_connectors::BULK_DATA_ENTRY); @@ -405,7 +404,7 @@ info.on_security_event_providers = GetOnSecurityEventProviders(); info.browser_version = version_info::GetVersionNumber(); info.site_isolation_enabled = -@@ -262,11 +261,6 @@ std::vector<std::string> ContextInfoFetc +@@ -227,11 +226,6 @@ std::vector<std::string> ContextInfoFetc return connectors_service_->GetAnalysisServiceProviderNames(connector); } @@ -417,8 +416,8 @@ std::vector<std::string> ContextInfoFetcher::GetOnSecurityEventProviders() { return connectors_service_->GetReportingServiceProviderNames( enterprise_connectors::ReportingConnector::SECURITY_EVENT); ---- a/chrome/browser/enterprise/signals/context_info_fetcher.h -+++ b/chrome/browser/enterprise/signals/context_info_fetcher.h +--- chrome/browser/enterprise/signals/context_info_fetcher.h.orig ++++ chrome/browser/enterprise/signals/context_info_fetcher.h @@ -6,6 +6,7 @@ #define CHROME_BROWSER_ENTERPRISE_SIGNALS_CONTEXT_INFO_FETCHER_H_ @@ -427,7 +426,7 @@ #include <vector> #include "base/callback_forward.h" -@@ -38,7 +39,6 @@ struct ContextInfo { +@@ -37,7 +38,6 @@ struct ContextInfo { std::vector<std::string> on_file_downloaded_providers; std::vector<std::string> on_bulk_data_entry_providers; std::vector<std::string> on_security_event_providers; @@ -435,7 +434,7 @@ std::string browser_version; safe_browsing::SafeBrowsingState safe_browsing_protection_level; bool site_isolation_enabled; -@@ -89,7 +89,6 @@ class ContextInfoFetcher { +@@ -88,7 +88,6 @@ class ContextInfoFetcher { std::vector<std::string> GetAnalysisConnectorProviders( enterprise_connectors::AnalysisConnector connector); @@ -443,8 +442,8 @@ std::vector<std::string> GetOnSecurityEventProviders(); ---- a/chrome/browser/enterprise/signals/signals_utils.cc -+++ b/chrome/browser/enterprise/signals/signals_utils.cc +--- chrome/browser/enterprise/signals/signals_utils.cc.orig ++++ chrome/browser/enterprise/signals/signals_utils.cc @@ -33,24 +33,6 @@ bool IsURLBlocked(const GURL& url, Polic } // namespace @@ -469,7 +468,7 @@ - absl::optional<bool> GetThirdPartyBlockingEnabled(PrefService* local_state) { DCHECK(local_state); - #if BUILDFLAG(IS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING) + #if defined(OS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING) @@ -65,15 +47,6 @@ bool GetBuiltInDnsClientEnabled(PrefServ return local_state->GetBoolean(prefs::kBuiltInDnsClientEnabled); } @@ -485,9 +484,9 @@ - absl::optional<bool> GetChromeCleanupEnabled(PrefService* local_state) { DCHECK(local_state); - #if BUILDFLAG(IS_WIN) ---- a/chrome/browser/enterprise/signals/signals_utils.h -+++ b/chrome/browser/enterprise/signals/signals_utils.h + #if defined(OS_WIN) +--- chrome/browser/enterprise/signals/signals_utils.h.orig ++++ chrome/browser/enterprise/signals/signals_utils.h @@ -21,12 +21,6 @@ bool GetBuiltInDnsClientEnabled(PrefServ absl::optional<bool> GetChromeCleanupEnabled(PrefService* local_state); @@ -501,9 +500,9 @@ bool GetChromeRemoteDesktopAppBlocked(PolicyBlocklistService* service); } // namespace utils ---- a/chrome/browser/extensions/BUILD.gn -+++ b/chrome/browser/extensions/BUILD.gn -@@ -636,8 +636,6 @@ static_library("extensions") { +--- chrome/browser/extensions/BUILD.gn.orig ++++ chrome/browser/extensions/BUILD.gn +@@ -650,8 +650,6 @@ static_library("extensions") { "menu_manager_factory.h", "navigation_observer.cc", "navigation_observer.h", @@ -512,8 +511,8 @@ "pack_extension_job.cc", "pack_extension_job.h", "pending_extension_info.cc", ---- a/chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc -+++ b/chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc +--- chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc.orig ++++ chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc @@ -72,17 +72,8 @@ api::enterprise_reporting_private::Conte : nullptr; info.os_firewall = ToInfoSettingValue(signals.os_firewall); @@ -532,9 +531,9 @@ info.browser_version = std::move(signals.browser_version); info.built_in_dns_client_enabled = signals.built_in_dns_client_enabled; ---- a/chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_event_router.cc -+++ b/chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_event_router.cc -@@ -328,6 +328,7 @@ void SafeBrowsingPrivateEventRouter::OnP +--- chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_event_router.cc.orig ++++ chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_event_router.cc +@@ -326,6 +326,7 @@ void SafeBrowsingPrivateEventRouter::OnD event_router_->BroadcastEvent(std::move(extension_event)); } @@ -542,7 +541,7 @@ absl::optional<enterprise_connectors::ReportingSettings> settings = GetReportingSettings(); if (!settings.has_value() || -@@ -399,6 +400,7 @@ void SafeBrowsingPrivateEventRouter::OnD +@@ -356,6 +357,7 @@ void SafeBrowsingPrivateEventRouter::OnD ReportRealtimeEvent(kKeyDangerousDownloadEvent, std::move(settings.value()), std::move(event)); @@ -550,7 +549,7 @@ } void SafeBrowsingPrivateEventRouter::OnSecurityInterstitialShown( -@@ -426,6 +428,7 @@ void SafeBrowsingPrivateEventRouter::OnS +@@ -383,6 +385,7 @@ void SafeBrowsingPrivateEventRouter::OnS event_router_->BroadcastEvent(std::move(extension_event)); } @@ -558,7 +557,7 @@ absl::optional<enterprise_connectors::ReportingSettings> settings = GetReportingSettings(); if (!settings.has_value() || -@@ -448,6 +451,7 @@ void SafeBrowsingPrivateEventRouter::OnS +@@ -406,6 +409,7 @@ void SafeBrowsingPrivateEventRouter::OnS ReportRealtimeEvent(kKeyInterstitialEvent, std::move(settings.value()), std::move(event)); @@ -566,7 +565,7 @@ } void SafeBrowsingPrivateEventRouter::OnSecurityInterstitialProceeded( -@@ -475,6 +479,7 @@ void SafeBrowsingPrivateEventRouter::OnS +@@ -433,6 +437,7 @@ void SafeBrowsingPrivateEventRouter::OnS event_router_->BroadcastEvent(std::move(extension_event)); } @@ -574,7 +573,7 @@ absl::optional<enterprise_connectors::ReportingSettings> settings = GetReportingSettings(); if (!settings.has_value() || -@@ -493,6 +498,7 @@ void SafeBrowsingPrivateEventRouter::OnS +@@ -452,6 +457,7 @@ void SafeBrowsingPrivateEventRouter::OnS ReportRealtimeEvent(kKeyInterstitialEvent, std::move(settings.value()), std::move(event)); @@ -582,7 +581,7 @@ } void SafeBrowsingPrivateEventRouter::OnAnalysisConnectorResult( -@@ -506,6 +512,7 @@ void SafeBrowsingPrivateEventRouter::OnA +@@ -465,6 +471,7 @@ void SafeBrowsingPrivateEventRouter::OnA const enterprise_connectors::ContentAnalysisResponse::Result& result, const int64_t content_size, safe_browsing::EventResult event_result) { @@ -590,7 +589,7 @@ if (result.tag() == "malware") { DCHECK_EQ(1, result.triggered_rules().size()); OnDangerousDeepScanningResult( -@@ -517,6 +524,7 @@ void SafeBrowsingPrivateEventRouter::OnA +@@ -476,6 +483,7 @@ void SafeBrowsingPrivateEventRouter::OnA OnSensitiveDataEvent(url, file_name, download_digest_sha256, mime_type, trigger, scan_id, result, content_size, event_result); } @@ -598,7 +597,7 @@ } void SafeBrowsingPrivateEventRouter::OnDangerousDeepScanningResult( -@@ -532,6 +540,7 @@ void SafeBrowsingPrivateEventRouter::OnD +@@ -491,6 +499,7 @@ void SafeBrowsingPrivateEventRouter::OnD const std::string& malware_category, const std::string& evidence_locker_filepath, const std::string& scan_id) { @@ -606,7 +605,7 @@ absl::optional<enterprise_connectors::ReportingSettings> settings = GetReportingSettings(); if (!settings.has_value() || -@@ -572,6 +581,7 @@ void SafeBrowsingPrivateEventRouter::OnD +@@ -528,6 +537,7 @@ void SafeBrowsingPrivateEventRouter::OnD ReportRealtimeEvent(kKeyDangerousDownloadEvent, std::move(settings.value()), std::move(event)); @@ -614,7 +613,7 @@ } void SafeBrowsingPrivateEventRouter::OnSensitiveDataEvent( -@@ -584,6 +594,7 @@ void SafeBrowsingPrivateEventRouter::OnS +@@ -540,6 +550,7 @@ void SafeBrowsingPrivateEventRouter::OnS const enterprise_connectors::ContentAnalysisResponse::Result& result, const int64_t content_size, safe_browsing::EventResult event_result) { @@ -622,7 +621,7 @@ absl::optional<enterprise_connectors::ReportingSettings> settings = GetReportingSettings(); if (!settings.has_value() || -@@ -615,6 +626,7 @@ void SafeBrowsingPrivateEventRouter::OnS +@@ -572,6 +583,7 @@ void SafeBrowsingPrivateEventRouter::OnS ReportRealtimeEvent(kKeySensitiveDataEvent, std::move(settings.value()), std::move(event)); @@ -630,15 +629,15 @@ } void SafeBrowsingPrivateEventRouter::OnAnalysisConnectorWarningBypassed( -@@ -628,6 +640,7 @@ void SafeBrowsingPrivateEventRouter::OnA +@@ -584,6 +596,7 @@ void SafeBrowsingPrivateEventRouter::OnA + safe_browsing::DeepScanAccessPoint access_point, const enterprise_connectors::ContentAnalysisResponse::Result& result, - const int64_t content_size, - absl::optional<std::u16string> user_justification) { + const int64_t content_size) { +#if defined(FULL_SAFE_BROWSING) absl::optional<enterprise_connectors::ReportingSettings> settings = GetReportingSettings(); if (!settings.has_value() || -@@ -662,6 +675,7 @@ void SafeBrowsingPrivateEventRouter::OnA +@@ -616,6 +629,7 @@ void SafeBrowsingPrivateEventRouter::OnA ReportRealtimeEvent(kKeySensitiveDataEvent, std::move(settings.value()), std::move(event)); @@ -646,7 +645,7 @@ } void SafeBrowsingPrivateEventRouter::OnUnscannedFileEvent( -@@ -674,6 +688,7 @@ void SafeBrowsingPrivateEventRouter::OnU +@@ -628,6 +642,7 @@ void SafeBrowsingPrivateEventRouter::OnU const std::string& reason, const int64_t content_size, safe_browsing::EventResult event_result) { @@ -654,7 +653,7 @@ absl::optional<enterprise_connectors::ReportingSettings> settings = GetReportingSettings(); if (!settings.has_value() || -@@ -700,6 +715,7 @@ void SafeBrowsingPrivateEventRouter::OnU +@@ -654,6 +669,7 @@ void SafeBrowsingPrivateEventRouter::OnU ReportRealtimeEvent(kKeyUnscannedFileEvent, std::move(settings.value()), std::move(event)); @@ -662,7 +661,7 @@ } void SafeBrowsingPrivateEventRouter::OnDangerousDownloadEvent( -@@ -725,6 +741,7 @@ void SafeBrowsingPrivateEventRouter::OnD +@@ -679,6 +695,7 @@ void SafeBrowsingPrivateEventRouter::OnD const std::string& scan_id, const int64_t content_size, safe_browsing::EventResult event_result) { @@ -670,7 +669,7 @@ absl::optional<enterprise_connectors::ReportingSettings> settings = GetReportingSettings(); if (!settings.has_value() || -@@ -756,6 +773,7 @@ void SafeBrowsingPrivateEventRouter::OnD +@@ -709,6 +726,7 @@ void SafeBrowsingPrivateEventRouter::OnD ReportRealtimeEvent(kKeyDangerousDownloadEvent, std::move(settings.value()), std::move(event)); @@ -678,7 +677,7 @@ } void SafeBrowsingPrivateEventRouter::OnDangerousDownloadWarningBypassed( -@@ -779,6 +797,7 @@ void SafeBrowsingPrivateEventRouter::OnD +@@ -732,6 +750,7 @@ void SafeBrowsingPrivateEventRouter::OnD const std::string& mime_type, const std::string& scan_id, const int64_t content_size) { @@ -686,7 +685,7 @@ absl::optional<enterprise_connectors::ReportingSettings> settings = GetReportingSettings(); if (!settings.has_value() || -@@ -810,6 +829,7 @@ void SafeBrowsingPrivateEventRouter::OnD +@@ -762,6 +781,7 @@ void SafeBrowsingPrivateEventRouter::OnD ReportRealtimeEvent(kKeyDangerousDownloadEvent, std::move(settings.value()), std::move(event)); @@ -694,7 +693,7 @@ } void SafeBrowsingPrivateEventRouter::OnLoginEvent( -@@ -1155,7 +1175,11 @@ void SafeBrowsingPrivateEventRouter::Rep +@@ -1087,7 +1107,11 @@ void SafeBrowsingPrivateEventRouter::Rep } std::string SafeBrowsingPrivateEventRouter::GetProfileUserName() const { @@ -706,27 +705,9 @@ } #if BUILDFLAG(IS_CHROMEOS_ASH) ---- a/chrome/browser/extensions/chrome_extensions_browser_client.cc -+++ b/chrome/browser/extensions/chrome_extensions_browser_client.cc -@@ -608,15 +608,6 @@ void ChromeExtensionsBrowserClient::Noti - content::BrowserContext* context, - const ExtensionId& extension_id, - const std::string& code) const { -- auto* telemetry_service = -- safe_browsing::ExtensionTelemetryServiceFactory::GetForProfile( -- Profile::FromBrowserContext(context)); -- if (!telemetry_service || !telemetry_service->enabled()) -- return; -- -- auto signal = std::make_unique<safe_browsing::TabsExecuteScriptSignal>( -- extension_id, code); -- telemetry_service->AddSignal(std::move(signal)); - } - - // static ---- a/chrome/browser/extensions/extension_service.cc -+++ b/chrome/browser/extensions/extension_service.cc -@@ -51,7 +51,6 @@ +--- chrome/browser/extensions/extension_service.cc.orig ++++ chrome/browser/extensions/extension_service.cc +@@ -52,7 +52,6 @@ #include "chrome/browser/extensions/forced_extensions/install_stage_tracker.h" #include "chrome/browser/extensions/install_verifier.h" #include "chrome/browser/extensions/installed_loader.h" @@ -734,15 +715,7 @@ #include "chrome/browser/extensions/pending_extension_manager.h" #include "chrome/browser/extensions/permissions_updater.h" #include "chrome/browser/extensions/shared_module_service.h" -@@ -205,7 +204,6 @@ void ExtensionService::BlocklistExtensio - blocklist_prefs::SetSafeBrowsingExtensionBlocklistState( - extension_id, BitMapBlocklistState::BLOCKLISTED_MALWARE, - extension_prefs_); -- OnBlocklistStateAdded(extension_id); - } - - bool ExtensionService::OnExternalExtensionUpdateUrlFound( -@@ -368,7 +366,6 @@ ExtensionService::ExtensionService(Profi +@@ -370,7 +369,6 @@ ExtensionService::ExtensionService(Profi safe_browsing_verdict_handler_(extension_prefs, ExtensionRegistry::Get(profile), this), @@ -750,7 +723,7 @@ registry_(ExtensionRegistry::Get(profile)), pending_extension_manager_(profile), install_directory_(install_directory), -@@ -868,100 +865,6 @@ bool ExtensionService::IsExtensionEnable +@@ -852,47 +850,6 @@ bool ExtensionService::IsExtensionEnable return extension_registrar_.IsExtensionEnabled(extension_id); } @@ -758,14 +731,56 @@ - const std::string& extension_id, - const base::Value& attributes) { - DCHECK_CURRENTLY_ON(BrowserThread::UI); +- HandleMalwareOmahaAttribute(extension_id, attributes); - omaha_attributes_handler_.PerformActionBasedOnOmahaAttributes(extension_id, - attributes); - allowlist_.PerformActionBasedOnOmahaAttributes(extension_id, attributes); +-} +- +-void ExtensionService::HandleMalwareOmahaAttribute( +- const std::string& extension_id, +- const base::Value& attributes) { +- bool has_malware_value = +- OmahaAttributesHandler::HasOmahaBlocklistStateInAttributes( +- attributes, BitMapBlocklistState::BLOCKLISTED_MALWARE); +- if (!has_malware_value) { +- OmahaAttributesHandler::ReportNoUpdateCheckKeys(); +- // Omaha attributes may have previously have the "_malware" key. +- MaybeEnableRemotelyDisabledExtension(extension_id); +- return; +- } +- +- if (extension_prefs_->HasDisableReason( +- extension_id, disable_reason::DISABLE_REMOTELY_FOR_MALWARE)) { +- // The extension is already disabled. No work needs to be done. +- return; +- } +- +- OmahaAttributesHandler::ReportExtensionDisabledRemotely( +- extension_registrar_.IsExtensionEnabled(extension_id), +- ExtensionUpdateCheckDataKey::kMalware); +- +- // Add the extension to the blocklisted extensions set. +- UpdateBlocklistedExtensions({extension_id}, +- registry_->blocklisted_extensions().GetIDs()); +- extension_prefs_->AddDisableReason( +- extension_id, disable_reason::DISABLE_REMOTELY_FOR_MALWARE); - // Show an error for the newly blocklisted extension. - error_controller_->ShowErrorIfNeeded(); -} + + void ExtensionService::MaybeEnableRemotelyDisabledExtension( + const std::string& extension_id) { +@@ -909,56 +866,6 @@ void ExtensionService::MaybeEnableRemote + unchanged.erase(extension_id); + // Remove the extension from the blocklist. + UpdateBlocklistedExtensions({}, unchanged); +- OmahaAttributesHandler::ReportReenableExtension( +- ExtensionUpdateCheckDataKey::kMalware); +-} - --void ExtensionService::OnGreylistStateRemoved(const std::string& extension_id) { +-void ExtensionService::ClearGreylistedAcknowledgedStateAndMaybeReenable( +- const std::string& extension_id) { - bool is_on_sb_list = (blocklist_prefs::GetSafeBrowsingExtensionBlocklistState( - extension_id, extension_prefs_) != - BitMapBlocklistState::NOT_BLOCKLISTED); @@ -782,8 +797,9 @@ - disable_reason::DISABLE_GREYLIST); -} - --void ExtensionService::OnGreylistStateAdded(const std::string& extension_id, -- BitMapBlocklistState new_state) { +-void ExtensionService::MaybeDisableGreylistedExtension( +- const std::string& extension_id, +- BitMapBlocklistState new_state) { -#if DCHECK_IS_ON() - bool has_new_state_on_sb_list = - (blocklist_prefs::GetSafeBrowsingExtensionBlocklistState( @@ -809,51 +825,12 @@ - blocklist_prefs::UpdateCurrentGreylistStatesAsAcknowledged(extension_id, - extension_prefs_); - DisableExtension(extension_id, disable_reason::DISABLE_GREYLIST); --} -- --void ExtensionService::OnBlocklistStateRemoved( -- const std::string& extension_id) { -- if (blocklist_prefs::IsExtensionBlocklisted(extension_id, extension_prefs_)) { -- return; -- } -- -- // Clear acknowledged state. -- blocklist_prefs::RemoveAcknowledgedBlocklistState( -- extension_id, BitMapBlocklistState::BLOCKLISTED_MALWARE, -- extension_prefs_); -- -- scoped_refptr<const Extension> extension = -- registry_->blocklisted_extensions().GetByID(extension_id); -- DCHECK(extension); -- registry_->RemoveBlocklisted(extension_id); -- AddExtension(extension.get()); --} -- --void ExtensionService::OnBlocklistStateAdded(const std::string& extension_id) { -- DCHECK( -- blocklist_prefs::IsExtensionBlocklisted(extension_id, extension_prefs_)); -- // The extension was already acknowledged by the user, it should already be in -- // the unloaded state. -- if (blocklist_prefs::HasAcknowledgedBlocklistState( -- extension_id, BitMapBlocklistState::BLOCKLISTED_MALWARE, -- extension_prefs_)) { -- DCHECK(base::Contains(registry_->blocklisted_extensions().GetIDs(), -- extension_id)); -- return; -- } -- -- scoped_refptr<const Extension> extension = -- registry_->GetInstalledExtension(extension_id); -- registry_->AddBlocklisted(extension); -- UnloadExtension(extension_id, UnloadedExtensionReason::BLOCKLIST); --} -- + } + void ExtensionService::RemoveDisableReasonAndMaybeEnable( - const std::string& extension_id, - disable_reason::DisableReason reason_to_remove) { ---- a/chrome/browser/extensions/extension_service.h -+++ b/chrome/browser/extensions/extension_service.h -@@ -26,7 +26,6 @@ +--- chrome/browser/extensions/extension_service.h.orig ++++ chrome/browser/extensions/extension_service.h +@@ -25,7 +25,6 @@ #include "chrome/browser/extensions/forced_extensions/force_installed_metrics.h" #include "chrome/browser/extensions/forced_extensions/force_installed_tracker.h" #include "chrome/browser/extensions/install_gate.h" @@ -861,7 +838,7 @@ #include "chrome/browser/extensions/pending_extension_manager.h" #include "chrome/browser/extensions/safe_browsing_verdict_handler.h" #include "chrome/browser/profiles/profile_manager.h" -@@ -276,40 +275,11 @@ class ExtensionService : public Extensio +@@ -269,28 +268,11 @@ class ExtensionService : public Extensio // nothing. void EnableExtension(const std::string& extension_id); @@ -869,26 +846,14 @@ - // whether to remove greylist disabled reason. Called when a greylisted - // state is removed from the Safe Browsing blocklist or Omaha blocklist. Also - // clears all acknowledged states if the greylist disabled reason is removed. -- void OnGreylistStateRemoved(const std::string& extension_id); +- void ClearGreylistedAcknowledgedStateAndMaybeReenable( +- const std::string& extension_id); - - // Takes acknowledged blocklist states into account and decides whether to - // disable the greylisted extension. Called when a new greylisted state is - // added to the Safe Browsing blocklist or Omaha blocklist. -- void OnGreylistStateAdded(const std::string& extension_id, -- BitMapBlocklistState new_state); -- -- // Takes Safe Browsing and Omaha malware blocklist states into account and -- // decides whether to remove the extension from the blocklist and reload it. -- // Called when a blocklisted extension is removed from the Safe Browsing -- // malware blocklist or Omaha malware blocklist. Also clears the acknowledged -- // state if the extension is reloaded. -- void OnBlocklistStateRemoved(const std::string& extension_id); -- -- // Takes acknowledged malware blocklist state into account and decides whether -- // to add the extension to the blocklist and unload it. Called when the -- // extension is added to the Safe Browsing malware blocklist or the Omaha -- // malware blocklist. -- void OnBlocklistStateAdded(const std::string& extension_id); +- void MaybeDisableGreylistedExtension(const std::string& extension_id, +- BitMapBlocklistState new_state); - // Removes the disable reason and enable the extension if there are no disable // reasons left and is not blocked for another reason. @@ -902,18 +867,30 @@ // Disables the extension. If the extension is already disabled, just adds // the |disable_reasons| (a bitmask of disable_reason::DisableReason - there // can be multiple DisableReasons e.g. when an extension comes in disabled -@@ -649,8 +619,6 @@ class ExtensionService : public Extensio +@@ -562,11 +544,6 @@ class ExtensionService : public Extensio + // Helper method to determine if an extension can be blocked. + bool CanBlockExtension(const Extension* extension) const; + +- // Handles the malware Omaha attribute for remotely disabled extensions. +- // TODO(crbug.com/1193695): Move this function to OmahaAttributesHandler. +- void HandleMalwareOmahaAttribute(const std::string& extension_id, +- const base::Value& attributes); +- + // Enables an extension that was only previously disabled remotely. + void MaybeEnableRemotelyDisabledExtension(const std::string& extension_id); + +@@ -639,8 +616,6 @@ class ExtensionService : public Extensio SafeBrowsingVerdictHandler safe_browsing_verdict_handler_; - OmahaAttributesHandler omaha_attributes_handler_; - // Sets of enabled/disabled/terminated/blocklisted extensions. Not owned. - raw_ptr<ExtensionRegistry> registry_ = nullptr; + ExtensionRegistry* registry_ = nullptr; ---- a/chrome/browser/extensions/extension_system_impl.cc -+++ b/chrome/browser/extensions/extension_system_impl.cc -@@ -464,8 +464,6 @@ void ExtensionSystemImpl::InstallUpdate( +--- chrome/browser/extensions/extension_system_impl.cc.orig ++++ chrome/browser/extensions/extension_system_impl.cc +@@ -465,8 +465,6 @@ void ExtensionSystemImpl::InstallUpdate( void ExtensionSystemImpl::PerformActionBasedOnOmahaAttributes( const std::string& extension_id, const base::Value& attributes) { @@ -922,42 +899,28 @@ } bool ExtensionSystemImpl::FinishDelayedInstallationIfReady( ---- a/chrome/browser/extensions/safe_browsing_verdict_handler.cc -+++ b/chrome/browser/extensions/safe_browsing_verdict_handler.cc -@@ -119,7 +119,6 @@ void SafeBrowsingVerdictHandler::UpdateB - blocklist_.Remove(id); - blocklist_prefs::SetSafeBrowsingExtensionBlocklistState( - id, BitMapBlocklistState::NOT_BLOCKLISTED, extension_prefs_); -- extension_service_->OnBlocklistStateRemoved(id); - UMA_HISTOGRAM_ENUMERATION("ExtensionBlacklist.UnblacklistInstalled", - extension->location()); - } -@@ -133,7 +132,6 @@ void SafeBrowsingVerdictHandler::UpdateB - blocklist_.Insert(extension); - blocklist_prefs::SetSafeBrowsingExtensionBlocklistState( - id, BitMapBlocklistState::BLOCKLISTED_MALWARE, extension_prefs_); -- extension_service_->OnBlocklistStateAdded(id); - UMA_HISTOGRAM_ENUMERATION("ExtensionBlacklist.BlacklistInstalled", - extension->location()); - } -@@ -157,7 +155,6 @@ void SafeBrowsingVerdictHandler::UpdateG +--- chrome/browser/extensions/safe_browsing_verdict_handler.cc.orig ++++ chrome/browser/extensions/safe_browsing_verdict_handler.cc +@@ -101,8 +101,6 @@ void SafeBrowsingVerdictHandler::UpdateG blocklist_prefs::SetSafeBrowsingExtensionBlocklistState( extension->id(), BitMapBlocklistState::NOT_BLOCKLISTED, extension_prefs_); -- extension_service_->OnGreylistStateRemoved(extension->id()); +- extension_service_->ClearGreylistedAcknowledgedStateAndMaybeReenable( +- extension->id()); UMA_HISTOGRAM_ENUMERATION("Extensions.Greylist.Enabled", extension->location()); } -@@ -177,7 +174,6 @@ void SafeBrowsingVerdictHandler::UpdateG +@@ -125,8 +123,6 @@ void SafeBrowsingVerdictHandler::UpdateG blocklist_prefs::BlocklistStateToBitMapBlocklistState(greylist_state); blocklist_prefs::SetSafeBrowsingExtensionBlocklistState( extension->id(), bitmap_greylist_state, extension_prefs_); -- extension_service_->OnGreylistStateAdded(id, bitmap_greylist_state); +- extension_service_->MaybeDisableGreylistedExtension(id, +- bitmap_greylist_state); UMA_HISTOGRAM_ENUMERATION("Extensions.Greylist.Disabled", extension->location()); } ---- a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc -+++ b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc +--- chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc.orig ++++ chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc @@ -35,8 +35,6 @@ #include "chrome/browser/file_system_access/file_system_access_permission_request_manager.h" #include "chrome/browser/installable/installable_utils.h" @@ -967,7 +930,7 @@ #include "chrome/browser/ui/file_system_access_dialogs.h" #include "chrome/common/chrome_paths.h" #include "components/content_settings/core/browser/host_content_settings_map.h" -@@ -305,83 +303,6 @@ BindResultCallbackToCurrentSequence( +@@ -299,83 +297,6 @@ BindResultCallbackToCurrentSequence( base::SequencedTaskRunnerHandle::Get(), std::move(callback)); } @@ -1051,7 +1014,7 @@ std::string GenerateLastPickedDirectoryKey(const std::string& id) { return id.empty() ? kDefaultLastPickedDirectoryKey : base::StrCat({kCustomLastPickedDirectoryKey, "-", id}); -@@ -1134,28 +1055,6 @@ void ChromeFileSystemAccessPermissionCon +@@ -1106,28 +1027,6 @@ void ChromeFileSystemAccessPermissionCon std::move(callback))); } @@ -1080,9 +1043,9 @@ void ChromeFileSystemAccessPermissionContext:: DidConfirmSensitiveDirectoryAccess( const url::Origin& origin, ---- a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.h -+++ b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.h -@@ -86,10 +86,6 @@ class ChromeFileSystemAccessPermissionCo +--- chrome/browser/file_system_access/chrome_file_system_access_permission_context.h.orig ++++ chrome/browser/file_system_access/chrome_file_system_access_permission_context.h +@@ -85,10 +85,6 @@ class ChromeFileSystemAccessPermissionCo HandleType handle_type, content::GlobalRenderFrameHostId frame_id, base::OnceCallback<void(SensitiveDirectoryResult)> callback) override; @@ -1093,9 +1056,9 @@ bool CanObtainReadPermission(const url::Origin& origin) override; bool CanObtainWritePermission(const url::Origin& origin) override; ---- a/chrome/browser/media/webrtc/display_media_access_handler.cc -+++ b/chrome/browser/media/webrtc/display_media_access_handler.cc -@@ -23,6 +23,7 @@ +--- chrome/browser/media/webrtc/display_media_access_handler.cc.orig ++++ chrome/browser/media/webrtc/display_media_access_handler.cc +@@ -25,6 +25,7 @@ #include "chrome/browser/safe_browsing/user_interaction_observer.h" #include "chrome/common/pref_names.h" #include "components/prefs/pref_service.h" @@ -1103,7 +1066,7 @@ #include "components/url_formatter/elide_url.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/desktop_capture.h" -@@ -106,6 +107,7 @@ void DisplayMediaAccessHandler::HandleRe +@@ -111,6 +112,7 @@ void DisplayMediaAccessHandler::HandleRe return; } @@ -1111,41 +1074,25 @@ // SafeBrowsing Delayed Warnings experiment can delay some SafeBrowsing // warnings until user interaction. If the current page has a delayed warning, // it'll have a user interaction observer attached. Show the warning -@@ -121,6 +123,7 @@ void DisplayMediaAccessHandler::HandleRe +@@ -125,6 +127,7 @@ void DisplayMediaAccessHandler::HandleRe observer->OnDesktopCaptureRequest(); return; } + #endif // BUILDFLAG(FULL_SAFE_BROWSING) - #if BUILDFLAG(IS_MAC) + #if defined(OS_MAC) // Do not allow picker UI to be shown on a page that isn't in the foreground ---- a/chrome/browser/notifications/notification_display_service_impl.cc -+++ b/chrome/browser/notifications/notification_display_service_impl.cc -@@ -89,13 +89,6 @@ NotificationDisplayServiceImpl::Notifica - profile_)); - #endif - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ -- BUILDFLAG(IS_WIN) -- AddNotificationHandler( -- NotificationHandler::Type::TAILORED_SECURITY, -- std::make_unique<safe_browsing::TailoredSecurityNotificationHandler>()); --#endif -- - #if BUILDFLAG(ENABLE_EXTENSIONS) - AddNotificationHandler( - NotificationHandler::Type::EXTENSION, ---- a/chrome/browser/password_manager/chrome_password_manager_client.cc -+++ b/chrome/browser/password_manager/chrome_password_manager_client.cc -@@ -34,7 +34,6 @@ - #include "chrome/browser/password_manager/password_scripts_fetcher_factory.h" +--- chrome/browser/password_manager/chrome_password_manager_client.cc.orig ++++ chrome/browser/password_manager/chrome_password_manager_client.cc +@@ -33,7 +33,6 @@ + #include "chrome/browser/password_manager/password_reuse_manager_factory.h" #include "chrome/browser/password_manager/password_store_factory.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/browser/safe_browsing/chrome_password_protection_service.h" #include "chrome/browser/safe_browsing/user_interaction_observer.h" #include "chrome/browser/signin/identity_manager_factory.h" #include "chrome/browser/sync/sync_service_factory.h" -@@ -112,11 +111,11 @@ +@@ -110,11 +109,11 @@ #if BUILDFLAG(FULL_SAFE_BROWSING) #include "chrome/browser/safe_browsing/advanced_protection_status_manager.h" #include "chrome/browser/safe_browsing/advanced_protection_status_manager_factory.h" @@ -1156,9 +1103,9 @@ #include "ui/events/keycodes/keyboard_codes.h" -#endif - #if BUILDFLAG(IS_ANDROID) + #if defined(OS_ANDROID) #include "chrome/browser/android/tab_android.h" -@@ -807,6 +806,7 @@ autofill::LanguageCode ChromePasswordMan +@@ -826,6 +825,7 @@ autofill::LanguageCode ChromePasswordMan return autofill::LanguageCode(); } @@ -1166,9 +1113,32 @@ safe_browsing::PasswordProtectionService* ChromePasswordManagerClient::GetPasswordProtectionService() const { return safe_browsing::ChromePasswordProtectionService:: -@@ -842,13 +842,9 @@ void ChromePasswordManagerClient::CheckP - web_contents(), web_contents()->GetLastCommittedURL(), username, - password_type, matching_reused_credentials, password_field_exists); +@@ -836,13 +836,6 @@ ChromePasswordManagerClient::GetPassword + void ChromePasswordManagerClient::CheckSafeBrowsingReputation( + const GURL& form_action, + const GURL& frame_url) { +- safe_browsing::PasswordProtectionService* pps = +- GetPasswordProtectionService(); +- if (pps) { +- pps->MaybeStartPasswordFieldOnFocusRequest( +- web_contents(), web_contents()->GetLastCommittedURL(), form_action, +- frame_url, pps->GetAccountInfo().hosted_domain); +- } + } + #endif // defined(ON_FOCUS_PING_ENABLED) + +@@ -852,22 +845,10 @@ void ChromePasswordManagerClient::CheckP + const std::vector<password_manager::MatchingReusedCredential>& + matching_reused_credentials, + bool password_field_exists) { +- safe_browsing::PasswordProtectionService* pps = +- GetPasswordProtectionService(); +- if (!pps) +- return; +- +- pps->MaybeStartProtectedPasswordEntryRequest( +- web_contents(), web_contents()->GetLastCommittedURL(), username, +- password_type, matching_reused_credentials, password_field_exists); } +#endif // BUILDFLAG(FULL_SAFE_BROWSING) @@ -1180,8 +1150,8 @@ - } } - #if !BUILDFLAG(IS_ANDROID) -@@ -1355,9 +1351,11 @@ void ChromePasswordManagerClient::OnPast + #if !defined(OS_ANDROID) +@@ -1365,9 +1346,11 @@ void ChromePasswordManagerClient::OnPast } was_on_paste_called_ = true; @@ -1190,11 +1160,11 @@ +#endif // defined(SYNC_PASSWORD_REUSE_WARNING_ENABLED) } -#endif -+#endif // !BUILDFLAG(IS_ANDROID) ++#endif // !defined(OS_ANDROID) void ChromePasswordManagerClient::RenderFrameCreated( content::RenderFrameHost* render_frame_host) { -@@ -1392,7 +1390,9 @@ void ChromePasswordManagerClient::OnInpu +@@ -1402,7 +1385,9 @@ void ChromePasswordManagerClient::OnInpu if (key_event.windows_key_code == (ui::VKEY_V & 0x1f)) { OnPaste(); } else { @@ -1202,9 +1172,9 @@ password_reuse_detection_manager_.OnKeyPressedCommitted(key_event.text); +#endif // defined(SYNC_PASSWORD_REUSE_DETECTION_ENABLED) } - #endif // BUILDFLAG(IS_ANDROID) + #endif // defined(OS_ANDROID) } -@@ -1431,6 +1431,7 @@ bool ChromePasswordManagerClient::IsPass +@@ -1441,6 +1426,7 @@ bool ChromePasswordManagerClient::IsPass is_enabled = false; } @@ -1212,7 +1182,7 @@ // SafeBrowsing Delayed Warnings experiment can delay some SafeBrowsing // warnings until user interaction. If the current page has a delayed warning, // it'll have a user interaction observer attached. Disable password -@@ -1441,6 +1442,7 @@ bool ChromePasswordManagerClient::IsPass +@@ -1451,6 +1437,7 @@ bool ChromePasswordManagerClient::IsPass observer->OnPasswordSaveOrAutofillDenied(); is_enabled = false; } @@ -1220,9 +1190,9 @@ if (log_manager_->IsLoggingActive()) { password_manager::BrowserSavePasswordProgressLogger logger( ---- a/chrome/browser/password_manager/chrome_password_manager_client.h -+++ b/chrome/browser/password_manager/chrome_password_manager_client.h -@@ -206,13 +206,14 @@ class ChromePasswordManagerClient +--- chrome/browser/password_manager/chrome_password_manager_client.h.orig ++++ chrome/browser/password_manager/chrome_password_manager_client.h +@@ -207,13 +207,14 @@ class ChromePasswordManagerClient void AnnotateNavigationEntry(bool has_password_field) override; autofill::LanguageCode GetPageLanguage() const override; @@ -1238,7 +1208,7 @@ void CheckProtectedPasswordEntry( password_manager::metrics_util::PasswordType reused_password_type, -@@ -220,6 +221,7 @@ class ChromePasswordManagerClient +@@ -221,6 +222,7 @@ class ChromePasswordManagerClient const std::vector<password_manager::MatchingReusedCredential>& matching_reused_credentials, bool password_field_exists) override; @@ -1246,8 +1216,8 @@ void LogPasswordReuseDetectedEvent() override; ---- a/chrome/browser/permissions/abusive_origin_permission_revocation_request.cc -+++ b/chrome/browser/permissions/abusive_origin_permission_revocation_request.cc +--- chrome/browser/permissions/abusive_origin_permission_revocation_request.cc.orig ++++ chrome/browser/permissions/abusive_origin_permission_revocation_request.cc @@ -136,6 +136,7 @@ void AbusiveOriginPermissionRevocationRe DCHECK(profile_); DCHECK(callback_); @@ -1264,8 +1234,8 @@ } void AbusiveOriginPermissionRevocationRequest::OnSafeBrowsingVerdictReceived( ---- a/chrome/browser/permissions/contextual_notification_permission_ui_selector.cc -+++ b/chrome/browser/permissions/contextual_notification_permission_ui_selector.cc +--- chrome/browser/permissions/contextual_notification_permission_ui_selector.cc.orig ++++ chrome/browser/permissions/contextual_notification_permission_ui_selector.cc @@ -17,7 +17,6 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/permissions/quiet_notification_permission_ui_config.h" @@ -1314,77 +1284,22 @@ } void ContextualNotificationPermissionUiSelector::OnSafeBrowsingVerdictReceived( ---- a/chrome/browser/permissions/prediction_based_permission_ui_selector.cc -+++ b/chrome/browser/permissions/prediction_based_permission_ui_selector.cc -@@ -312,47 +312,5 @@ bool PredictionBasedPermissionUiSelector - - PredictionSource PredictionBasedPermissionUiSelector::GetPredictionTypeToUse( +--- chrome/browser/permissions/prediction_based_permission_ui_selector.cc.orig ++++ chrome/browser/permissions/prediction_based_permission_ui_selector.cc +@@ -212,10 +212,8 @@ bool PredictionBasedPermissionUiSelector permissions::RequestType request_type) { -- if (!safe_browsing::IsSafeBrowsingEnabled(*(profile_->GetPrefs()))) { - return PredictionSource::USE_NONE; -- } -- -- bool is_server_side_prediction_enabled = false; -- bool is_ondevice_prediction_enabled = false; -- -- bool is_tflite_available = false; --#if BUILDFLAG(BUILD_WITH_TFLITE_LIB) -- is_tflite_available = true; --#endif // BUILDFLAG(BUILD_WITH_TFLITE_LIB) -- -- // Notification supports both flavours of the quiet prompt -- if (request_type == permissions::RequestType::kNotifications && -- (base::FeatureList::IsEnabled(features::kQuietNotificationPrompts) || -- base::FeatureList::IsEnabled( -- permissions::features::kPermissionQuietChip))) { -- is_server_side_prediction_enabled = -- base::FeatureList::IsEnabled(features::kPermissionPredictions); -- -- is_ondevice_prediction_enabled = -- is_tflite_available && -- base::FeatureList::IsEnabled( -- permissions::features::kPermissionOnDeviceNotificationPredictions); -- } -- -- // Geolocation supports only the quiet chip ui -- if (request_type == permissions::RequestType::kGeolocation && -- base::FeatureList::IsEnabled( -- permissions::features::kPermissionQuietChip)) { -- is_server_side_prediction_enabled = base::FeatureList::IsEnabled( -- features::kPermissionGeolocationPredictions); -- } -- -- if (is_server_side_prediction_enabled && is_ondevice_prediction_enabled) { -- return PredictionSource::USE_ANY; -- } else if (is_server_side_prediction_enabled) { -- return PredictionSource::USE_SERVER_SIDE; -- } else if (is_ondevice_prediction_enabled) { -- return PredictionSource::USE_ONDEVICE; -- } else { -- return PredictionSource::USE_NONE; + // We need to also check `kQuietNotificationPrompts` here since there is no + // generic safeguard anywhere else in the stack. +- if (!base::FeatureList::IsEnabled(features::kQuietNotificationPrompts) || +- !safe_browsing::IsSafeBrowsingEnabled(*(profile_->GetPrefs()))) { ++ if (!base::FeatureList::IsEnabled(features::kQuietNotificationPrompts)) + return false; - } - } ---- a/chrome/browser/policy/configuration_policy_handler_list_factory.cc -+++ b/chrome/browser/policy/configuration_policy_handler_list_factory.cc -@@ -92,6 +92,7 @@ - #include "components/policy/core/common/schema.h" - #include "components/policy/policy_constants.h" - #include "components/proxy_config/proxy_policy_handler.h" -+#include "components/safe_browsing/buildflags.h" - #include "components/safe_browsing/content/common/file_type_policies_prefs.h" - #include "components/safe_browsing/core/common/safe_browsing_policy_handler.h" - #include "components/safe_browsing/core/common/safe_browsing_prefs.h" -@@ -2297,7 +2298,7 @@ std::unique_ptr<ConfigurationPolicyHandl - base::Value::Type::BOOLEAN))); - #endif // BUILDFLAG(IS_LINUX) - --#if !BUILDFLAG(IS_ANDROID) -+#if !BUILDFLAG(IS_ANDROID) && BUILDFLAG(FULL_SAFE_BROWSING) - handlers->AddHandler(std::make_unique<SimpleSchemaValidatingPolicyHandler>( - key::kExemptDomainFileTypePairsFromFileTypeDownloadWarnings, - safe_browsing::file_type::prefs:: ---- a/chrome/browser/prefs/browser_prefs.cc -+++ b/chrome/browser/prefs/browser_prefs.cc + double hold_back_chance = 0.0; + bool is_permissions_predictions_enabled = false; + switch (request_type) { +--- chrome/browser/prefs/browser_prefs.cc.orig ++++ chrome/browser/prefs/browser_prefs.cc @@ -243,7 +243,6 @@ #include "chrome/browser/nearby_sharing/common/nearby_share_prefs.h" #include "chrome/browser/new_tab_page/modules/drive/drive_service.h" @@ -1393,7 +1308,7 @@ #include "chrome/browser/new_tab_page/modules/task_module/task_module_service.h" #include "chrome/browser/new_tab_page/promos/promo_service.h" #include "chrome/browser/search/background/ntp_custom_background_service.h" -@@ -1354,7 +1353,6 @@ void RegisterProfilePrefs(user_prefs::Pr +@@ -1277,7 +1276,6 @@ void RegisterProfilePrefs(user_prefs::Pr NewTabPageHandler::RegisterProfilePrefs(registry); NewTabPageUI::RegisterProfilePrefs(registry); NewTabUI::RegisterProfilePrefs(registry); @@ -1401,18 +1316,8 @@ ntp_tiles::CustomLinksManagerImpl::RegisterProfilePrefs(registry); PhotosService::RegisterProfilePrefs(registry); PinnedTabCodec::RegisterProfilePrefs(registry); ---- a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc -+++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc -@@ -525,7 +525,6 @@ void ChromeBrowserMainExtraPartsProfiles - SystemExtensionsProviderFactory::GetInstance(); - #endif - TabRestoreServiceFactory::GetInstance(); -- safe_browsing::TailoredSecurityServiceFactory::GetInstance(); - TemplateURLFetcherFactory::GetInstance(); - TemplateURLServiceFactory::GetInstance(); - #if !BUILDFLAG(IS_ANDROID) ---- a/chrome/browser/reputation/reputation_service.cc -+++ b/chrome/browser/reputation/reputation_service.cc +--- chrome/browser/reputation/reputation_service.cc.orig ++++ chrome/browser/reputation/reputation_service.cc @@ -120,9 +120,7 @@ void ReputationService::GetReputationSta ReputationCheckCallback callback) { DCHECK(url.SchemeIsHTTPOrHTTPS()); @@ -1424,18 +1329,8 @@ LookalikeUrlService* service = LookalikeUrlService::Get(profile_); if (service->EngagedSitesNeedUpdating()) { ---- a/chrome/browser/resources/settings/privacy_page/privacy_guide/privacy_guide_page.ts -+++ b/chrome/browser/resources/settings/privacy_page/privacy_guide/privacy_guide_page.ts -@@ -17,7 +17,6 @@ import './privacy_guide_completion_fragm - import './privacy_guide_cookies_fragment.js'; - import './privacy_guide_history_sync_fragment.js'; - import './privacy_guide_msbb_fragment.js'; --import './privacy_guide_safe_browsing_fragment.js'; - import './privacy_guide_welcome_fragment.js'; - import './step_indicator.js'; - ---- a/chrome/browser/safe_browsing/metrics/safe_browsing_metrics_provider.cc -+++ b/chrome/browser/safe_browsing/metrics/safe_browsing_metrics_provider.cc +--- chrome/browser/safe_browsing/metrics/safe_browsing_metrics_provider.cc.orig ++++ chrome/browser/safe_browsing/metrics/safe_browsing_metrics_provider.cc @@ -17,15 +17,6 @@ SafeBrowsingMetricsProvider::~SafeBrowsi void SafeBrowsingMetricsProvider::ProvideCurrentSessionData( @@ -1452,8 +1347,8 @@ } } // namespace safe_browsing ---- a/chrome/browser/safe_browsing/url_lookup_service_factory.cc -+++ b/chrome/browser/safe_browsing/url_lookup_service_factory.cc +--- chrome/browser/safe_browsing/url_lookup_service_factory.cc.orig ++++ chrome/browser/safe_browsing/url_lookup_service_factory.cc @@ -59,28 +59,7 @@ RealTimeUrlLookupServiceFactory::RealTim KeyedService* RealTimeUrlLookupServiceFactory::BuildServiceInstanceFor( @@ -1484,9 +1379,9 @@ } } // namespace safe_browsing ---- a/chrome/browser/ssl/chrome_security_blocking_page_factory.cc -+++ b/chrome/browser/ssl/chrome_security_blocking_page_factory.cc -@@ -143,15 +143,6 @@ CreateSettingsPageHelper() { +--- chrome/browser/ssl/chrome_security_blocking_page_factory.cc.orig ++++ chrome/browser/ssl/chrome_security_blocking_page_factory.cc +@@ -142,15 +142,6 @@ CreateSettingsPageHelper() { CreateChromeSettingsPageHelper(); } @@ -1502,9 +1397,9 @@ } // namespace std::unique_ptr<SSLBlockingPage> -@@ -175,10 +166,6 @@ ChromeSecurityBlockingPageFactory::Creat - Profile::FromBrowserContext(web_contents->GetBrowserContext())); - state->DidDisplayErrorPage(cert_error); +@@ -192,10 +183,6 @@ ChromeSecurityBlockingPageFactory::Creat + } + } - LogSafeBrowsingSecuritySensitiveAction( - safe_browsing::SafeBrowsingMetricsCollectorFactory::GetForProfile( @@ -1513,7 +1408,18 @@ auto controller_client = std::make_unique<SSLErrorControllerClient>( web_contents, ssl_info, cert_error, request_url, std::move(metrics_helper), CreateSettingsPageHelper()); -@@ -248,10 +235,6 @@ ChromeSecurityBlockingPageFactory::Creat +@@ -264,10 +251,6 @@ ChromeSecurityBlockingPageFactory::Creat + const GURL& request_url, + std::unique_ptr<SSLCertReporter> ssl_cert_reporter, + const net::SSLInfo& ssl_info) { +- LogSafeBrowsingSecuritySensitiveAction( +- safe_browsing::SafeBrowsingMetricsCollectorFactory::GetForProfile( +- Profile::FromBrowserContext(web_contents->GetBrowserContext()))); +- + auto page = std::make_unique<LegacyTLSBlockingPage>( + web_contents, cert_error, request_url, std::move(ssl_cert_reporter), + /*can_show_enhanced_protection_message=*/true, ssl_info, +@@ -289,10 +272,6 @@ ChromeSecurityBlockingPageFactory::Creat std::unique_ptr<SSLCertReporter> ssl_cert_reporter, const net::SSLInfo& ssl_info, const std::string& mitm_software_name) { @@ -1524,7 +1430,7 @@ auto page = std::make_unique<MITMSoftwareBlockingPage>( web_contents, cert_error, request_url, std::move(ssl_cert_reporter), /*can_show_enhanced_protection_message=*/true, ssl_info, -@@ -273,10 +256,6 @@ ChromeSecurityBlockingPageFactory::Creat +@@ -314,10 +293,6 @@ ChromeSecurityBlockingPageFactory::Creat const GURL& request_url, std::unique_ptr<SSLCertReporter> ssl_cert_reporter, const net::SSLInfo& ssl_info) { @@ -1535,8 +1441,8 @@ auto page = std::make_unique<BlockedInterceptionBlockingPage>( web_contents, cert_error, request_url, std::move(ssl_cert_reporter), /*can_show_enhanced_protection_message=*/true, ssl_info, ---- a/chrome/browser/ssl/sct_reporting_service_factory.cc -+++ b/chrome/browser/ssl/sct_reporting_service_factory.cc +--- chrome/browser/ssl/sct_reporting_service_factory.cc.orig ++++ chrome/browser/ssl/sct_reporting_service_factory.cc @@ -32,15 +32,7 @@ SCTReportingServiceFactory::~SCTReportin KeyedService* SCTReportingServiceFactory::BuildServiceInstanceFor( @@ -1554,8 +1460,8 @@ } content::BrowserContext* SCTReportingServiceFactory::GetBrowserContextToUse( ---- a/chrome/browser/subresource_filter/chrome_content_subresource_filter_web_contents_helper_factory.cc -+++ b/chrome/browser/subresource_filter/chrome_content_subresource_filter_web_contents_helper_factory.cc +--- chrome/browser/subresource_filter/chrome_content_subresource_filter_web_contents_helper_factory.cc.orig ++++ chrome/browser/subresource_filter/chrome_content_subresource_filter_web_contents_helper_factory.cc @@ -6,7 +6,6 @@ #include "chrome/browser/browser_process.h" @@ -1576,9 +1482,9 @@ } } // namespace ---- a/chrome/browser/ui/BUILD.gn -+++ b/chrome/browser/ui/BUILD.gn -@@ -534,7 +534,6 @@ static_library("ui") { +--- chrome/browser/ui/BUILD.gn.orig ++++ chrome/browser/ui/BUILD.gn +@@ -533,7 +533,6 @@ static_library("ui") { "//components/renderer_context_menu", "//components/resources", "//components/safe_browsing/content/browser", @@ -1586,17 +1492,8 @@ "//components/safe_browsing/content/browser/password_protection", "//components/safe_browsing/content/browser/web_ui", "//components/safe_browsing/core/browser/db:database_manager", -@@ -4602,8 +4601,6 @@ static_library("ui") { - "views/safe_browsing/password_reuse_modal_warning_dialog.h", - "views/safe_browsing/prompt_for_scanning_modal_dialog.cc", - "views/safe_browsing/prompt_for_scanning_modal_dialog.h", -- "views/safe_browsing/tailored_security_unconsented_modal.cc", -- "views/safe_browsing/tailored_security_unconsented_modal.h", - "views/send_tab_to_self/send_tab_to_self_bubble_device_button.cc", - "views/send_tab_to_self/send_tab_to_self_bubble_device_button.h", - "views/send_tab_to_self/send_tab_to_self_bubble_view_impl.cc", ---- a/chrome/browser/ui/javascript_dialogs/javascript_tab_modal_dialog_manager_delegate_desktop.cc -+++ b/chrome/browser/ui/javascript_dialogs/javascript_tab_modal_dialog_manager_delegate_desktop.cc +--- chrome/browser/ui/javascript_dialogs/javascript_tab_modal_dialog_manager_delegate_desktop.cc.orig ++++ chrome/browser/ui/javascript_dialogs/javascript_tab_modal_dialog_manager_delegate_desktop.cc @@ -16,6 +16,7 @@ #include "components/javascript_dialogs/tab_modal_dialog_manager.h" #include "components/javascript_dialogs/tab_modal_dialog_view.h" @@ -1621,12 +1518,12 @@ } void JavaScriptTabModalDialogManagerDelegateDesktop::DidCloseDialog() { ---- a/chrome/browser/ui/tab_contents/chrome_web_contents_view_handle_drop.cc -+++ b/chrome/browser/ui/tab_contents/chrome_web_contents_view_handle_drop.cc +--- chrome/browser/ui/tab_contents/chrome_web_contents_view_handle_drop.cc.orig ++++ chrome/browser/ui/tab_contents/chrome_web_contents_view_handle_drop.cc @@ -11,7 +11,10 @@ #include "base/task/post_task.h" - #include "base/task/task_runner_util.h" #include "base/task/thread_pool.h" + #include "base/task_runner_util.h" +#include "components/safe_browsing/buildflags.h" +#if BUILDFLAG(FULL_SAFE_BROWSING) #include "chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.h" @@ -1683,7 +1580,7 @@ if (!enterprise_connectors::ContentAnalysisDelegate::IsEnabled( profile, web_contents->GetLastCommittedURL(), &data, connector)) { std::move(callback).Run( -@@ -152,4 +162,8 @@ void HandleOnPerformDrop( +@@ -154,4 +164,8 @@ void HandleOnPerformDrop( std::move(callback).Run( content::WebContentsViewDelegate::DropCompletionResult::kContinue); } @@ -1692,9 +1589,9 @@ + content::WebContentsViewDelegate::DropCompletionResult::kContinue); +#endif // BUILDFLAG(FULL_SAFE_BROWSING) } ---- a/chrome/browser/ui/views/download/download_item_view.cc -+++ b/chrome/browser/ui/views/download/download_item_view.cc -@@ -838,9 +838,7 @@ void DownloadItemView::UpdateLabels() { +--- chrome/browser/ui/views/download/download_item_view.cc.orig ++++ chrome/browser/ui/views/download/download_item_view.cc +@@ -837,9 +837,7 @@ void DownloadItemView::UpdateLabels() { deep_scanning_label_->SetVisible(mode_ == download::DownloadItemMode::kDeepScanning); if (deep_scanning_label_->GetVisible()) { @@ -1705,7 +1602,7 @@ ? IDS_PROMPT_DEEP_SCANNING_DOWNLOAD : IDS_PROMPT_DEEP_SCANNING_APP_DOWNLOAD; const std::u16string filename = ElidedFilename(*deep_scanning_label_); -@@ -887,11 +885,15 @@ void DownloadItemView::UpdateButtons() { +@@ -886,11 +884,15 @@ void DownloadItemView::UpdateButtons() { } const bool allow_open_during_deep_scan = @@ -1721,7 +1618,7 @@ open_button_->SetEnabled((mode_ == download::DownloadItemMode::kNormal) || prompt_to_scan || allow_open_during_deep_scan); -@@ -1432,7 +1434,9 @@ void DownloadItemView::ShowContextMenuIm +@@ -1427,7 +1429,9 @@ void DownloadItemView::ShowContextMenuIm } void DownloadItemView::OpenDownloadDuringAsyncScanning() { @@ -1731,9 +1628,9 @@ model_->SetOpenWhenComplete(true); } ---- a/chrome/browser/ui/webui/downloads/downloads_dom_handler.cc -+++ b/chrome/browser/ui/webui/downloads/downloads_dom_handler.cc -@@ -367,7 +367,6 @@ void DownloadsDOMHandler::OpenDuringScan +--- chrome/browser/ui/webui/downloads/downloads_dom_handler.cc.orig ++++ chrome/browser/ui/webui/downloads/downloads_dom_handler.cc +@@ -366,7 +366,6 @@ void DownloadsDOMHandler::OpenDuringScan if (download) { DownloadItemModel model(download); model.SetOpenWhenComplete(true); @@ -1741,9 +1638,9 @@ } } ---- a/chrome/browser/ui/webui/management/management_ui_handler.cc -+++ b/chrome/browser/ui/webui/management/management_ui_handler.cc -@@ -834,12 +834,6 @@ base::Value ManagementUIHandler::GetThre +--- chrome/browser/ui/webui/management/management_ui_handler.cc.orig ++++ chrome/browser/ui/webui/management/management_ui_handler.cc +@@ -805,12 +805,6 @@ base::Value ManagementUIHandler::GetThre &info); } @@ -1756,9 +1653,9 @@ const std::string enterprise_manager = connectors_service->GetManagementDomain(); ---- a/chrome/browser/webshare/share_service_impl.cc -+++ b/chrome/browser/webshare/share_service_impl.cc -@@ -17,7 +17,9 @@ +--- chrome/browser/webshare/share_service_impl.cc.orig ++++ chrome/browser/webshare/share_service_impl.cc +@@ -14,7 +14,9 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/safe_browsing/safe_browsing_service.h" #include "chrome/common/chrome_features.h" @@ -1768,10 +1665,10 @@ #include "components/safe_browsing/core/browser/db/database_manager.h" #include "content/public/browser/web_contents.h" #include "mojo/public/cpp/bindings/self_owned_receiver.h" -@@ -198,11 +200,13 @@ void ShareServiceImpl::Share(const std:: - +@@ -182,11 +184,13 @@ void ShareServiceImpl::Share(const std:: // Check if at least one file is marked by the download protection service // to send a ping to check this file type. + const base::FilePath path = base::FilePath::FromUTF8Unsafe(file->name); +#if BUILDFLAG(SAFE_BROWSING_AVAILABLE) if (!should_check_url && safe_browsing::FileTypePolicies::GetInstance()->IsCheckedBinaryFile( @@ -1782,7 +1679,7 @@ // In the case where the original blob handle was to a native file (of // unknown size), the serialized data does not contain an accurate file -@@ -212,6 +216,7 @@ void ShareServiceImpl::Share(const std:: +@@ -196,6 +200,7 @@ void ShareServiceImpl::Share(const std:: } DCHECK(!safe_browsing_request_); @@ -1790,7 +1687,7 @@ if (should_check_url && g_browser_process->safe_browsing_service()) { safe_browsing_request_.emplace( g_browser_process->safe_browsing_service()->database_manager(), -@@ -221,6 +226,7 @@ void ShareServiceImpl::Share(const std:: +@@ -205,6 +210,7 @@ void ShareServiceImpl::Share(const std:: std::move(files), std::move(callback))); return; } @@ -1798,9 +1695,9 @@ OnSafeBrowsingResultReceived(title, text, share_url, std::move(files), std::move(callback), ---- a/chrome/test/BUILD.gn -+++ b/chrome/test/BUILD.gn -@@ -1283,7 +1283,6 @@ if (!is_android) { +--- chrome/test/BUILD.gn.orig ++++ chrome/test/BUILD.gn +@@ -1196,7 +1196,6 @@ if (!is_android && !is_fuchsia) { "//components/resources", "//components/safe_browsing:buildflags", "//components/safe_browsing/content/browser", @@ -1808,7 +1705,7 @@ "//components/safe_browsing/content/browser:safe_browsing_service", "//components/safe_browsing/content/browser/password_protection", "//components/safe_browsing/content/browser/password_protection:test_support", -@@ -5540,7 +5539,6 @@ test("unit_tests") { +@@ -5349,7 +5348,6 @@ test("unit_tests") { "//components/resources", "//components/safe_browsing:buildflags", "//components/safe_browsing/content/browser", @@ -1816,20 +1713,20 @@ "//components/safe_browsing/content/browser/password_protection", "//components/safe_browsing/content/browser/password_protection:mock_password_protection", "//components/safe_browsing/content/browser/web_ui", ---- a/components/password_manager/content/browser/content_password_manager_driver.cc -+++ b/components/password_manager/content/browser/content_password_manager_driver.cc -@@ -408,7 +408,7 @@ void ContentPasswordManagerDriver::Check - if (!password_manager::bad_message::CheckFrameNotPrerendering( - render_frame_host_)) - return; +--- components/password_manager/content/browser/content_password_manager_driver.cc.orig ++++ components/password_manager/content/browser/content_password_manager_driver.cc +@@ -407,7 +407,7 @@ void ContentPasswordManagerDriver::Check + if (client_->GetMetricsRecorder()) { + client_->GetMetricsRecorder()->RecordUserFocusedPasswordField(); + } -#if defined(ON_FOCUS_PING_ENABLED) +#if defined(ON_FOCUS_PING_ENABLED) && BUILDFLAG(FULL_SAFE_BROWSING) client_->CheckSafeBrowsingReputation(form_action, frame_url); #endif } ---- a/components/password_manager/core/browser/password_manager_client.h -+++ b/components/password_manager/core/browser/password_manager_client.h -@@ -344,11 +344,14 @@ class PasswordManagerClient { +--- components/password_manager/core/browser/password_manager_client.h.orig ++++ components/password_manager/core/browser/password_manager_client.h +@@ -339,11 +339,14 @@ class PasswordManagerClient { // Returns the current best guess as to the page's display language. virtual autofill::LanguageCode GetPageLanguage() const; @@ -1845,7 +1742,7 @@ // Checks the safe browsing reputation of the webpage when the // user focuses on a username/password field. This is used for reporting // only, and won't trigger a warning. -@@ -356,6 +359,7 @@ class PasswordManagerClient { +@@ -351,6 +354,7 @@ class PasswordManagerClient { const GURL& frame_url) = 0; #endif @@ -1853,7 +1750,7 @@ // Checks the safe browsing reputation of the webpage where password reuse // happens. This is called by the PasswordReuseDetectionManager when a // protected password is typed on the wrong domain. This may trigger a -@@ -368,6 +372,7 @@ class PasswordManagerClient { +@@ -363,6 +367,7 @@ class PasswordManagerClient { const std::string& username, const std::vector<MatchingReusedCredential>& matching_reused_credentials, bool password_field_exists) = 0; @@ -1861,8 +1758,8 @@ // Records a Chrome Sync event that GAIA password reuse was detected. virtual void LogPasswordReuseDetectedEvent() = 0; ---- a/components/password_manager/core/browser/password_reuse_detection_manager.cc -+++ b/components/password_manager/core/browser/password_reuse_detection_manager.cc +--- components/password_manager/core/browser/password_reuse_detection_manager.cc.orig ++++ components/password_manager/core/browser/password_reuse_detection_manager.cc @@ -161,9 +161,11 @@ void PasswordReuseDetectionManager::OnRe ? reused_protected_password_hash->username : ""; @@ -1875,8 +1772,19 @@ } void PasswordReuseDetectionManager::SetClockForTesting(base::Clock* clock) { ---- a/components/safe_browsing/content/common/proto/BUILD.gn -+++ b/components/safe_browsing/content/common/proto/BUILD.gn +--- components/safe_browsing/content/browser/BUILD.gn.orig ++++ components/safe_browsing/content/browser/BUILD.gn +@@ -82,8 +82,6 @@ source_set("browser") { + "threat_details_cache.h", + "threat_details_history.cc", + "threat_details_history.h", +- "user_population.cc", +- "user_population.h", + "web_api_handshake_checker.cc", + "web_api_handshake_checker.h", + ] +--- components/safe_browsing/content/common/proto/BUILD.gn.orig ++++ components/safe_browsing/content/common/proto/BUILD.gn @@ -5,8 +5,12 @@ import("//components/safe_browsing/buildflags.gni") import("//third_party/protobuf/proto_library.gni") @@ -1892,8 +1800,8 @@ } -} +# } ---- a/components/safe_browsing/content/common/safe_browsing.mojom -+++ b/components/safe_browsing/content/common/safe_browsing.mojom +--- components/safe_browsing/content/common/safe_browsing.mojom.orig ++++ components/safe_browsing/content/common/safe_browsing.mojom @@ -120,7 +120,6 @@ enum PhishingDetectorResult { INVALID_SCORE = 4, }; @@ -1902,20 +1810,9 @@ // Interface for setting the CSD model and to start phishing classification. interface PhishingDetector { // A classification model for client-side phishing detection. ---- a/components/safe_browsing/core/browser/BUILD.gn -+++ b/components/safe_browsing/core/browser/BUILD.gn -@@ -11,8 +11,6 @@ source_set("browser") { - "safe_browsing_url_checker_impl.cc", - "safe_browsing_url_checker_impl.h", - "url_checker_delegate.h", -- "user_population.cc", -- "user_population.h", - ] - - public_deps = [ "//google_apis:google_apis" ] ---- a/content/browser/file_system_access/safe_move_helper.cc -+++ b/content/browser/file_system_access/safe_move_helper.cc -@@ -151,14 +151,8 @@ void SafeMoveHelper::Start(SafeMoveHelpe +--- content/browser/file_system_access/safe_move_helper.cc.orig ++++ content/browser/file_system_access/safe_move_helper.cc +@@ -150,14 +150,8 @@ void SafeMoveHelper::Start(SafeMoveHelpe return; } @@ -1930,7 +1827,7 @@ } void SafeMoveHelper::ComputeHashForSourceFile(HashCallback callback) { -@@ -178,38 +172,6 @@ void SafeMoveHelper::ComputeHashForSourc +@@ -177,38 +171,6 @@ void SafeMoveHelper::ComputeHashForSourc std::move(wrapped_callback), source_url())); } @@ -1969,8 +1866,8 @@ void SafeMoveHelper::DidAfterWriteCheck( FileSystemAccessPermissionContext::AfterWriteCheckResult result) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); ---- a/content/browser/file_system_access/safe_move_helper.h -+++ b/content/browser/file_system_access/safe_move_helper.h +--- content/browser/file_system_access/safe_move_helper.h.orig ++++ content/browser/file_system_access/safe_move_helper.h @@ -52,9 +52,6 @@ class CONTENT_EXPORT SafeMoveHelper { private: SEQUENCE_CHECKER(sequence_checker_); @@ -1981,8 +1878,8 @@ void DidAfterWriteCheck( FileSystemAccessPermissionContext::AfterWriteCheckResult result); void DidFileSkipQuarantine(base::File::Error result); ---- a/content/public/browser/file_system_access_permission_context.h -+++ b/content/public/browser/file_system_access_permission_context.h +--- content/public/browser/file_system_access_permission_context.h.orig ++++ content/public/browser/file_system_access_permission_context.h @@ -107,12 +107,6 @@ class FileSystemAccessPermissionContext base::OnceCallback<void(SensitiveDirectoryResult)> callback) = 0; @@ -1996,9 +1893,9 @@ // Returns whether the give |origin| already allows read permission, or it is // possible to request one. This is used to block file dialogs from being ---- a/extensions/browser/updater/update_service.cc -+++ b/extensions/browser/updater/update_service.cc -@@ -122,13 +122,6 @@ void UpdateService::OnEvent(Events event +--- extensions/browser/updater/update_service.cc.orig ++++ extensions/browser/updater/update_service.cc +@@ -111,13 +111,6 @@ void UpdateService::OnEvent(Events event break; } @@ -2012,9 +1909,9 @@ } UpdateService::UpdateService( ---- a/weblayer/BUILD.gn -+++ b/weblayer/BUILD.gn -@@ -462,7 +462,6 @@ source_set("weblayer_lib_base") { +--- weblayer/BUILD.gn.orig ++++ weblayer/BUILD.gn +@@ -463,7 +463,6 @@ source_set("weblayer_lib_base") { "//components/prefs", "//components/profile_metrics", "//components/safe_browsing/content/browser", diff --git a/www/chromium-uc/patches/core/ungoogled-chromium/fix-learn-doubleclick-hsts.patch b/www/chromium-uc/patches/core/ungoogled-chromium/fix-learn-doubleclick-hsts.patch @@ -1,7 +1,7 @@ # Split up the learn.doubleclick.net string literal to prevent domain substitution breaking compilation due to the use of the excluded HSTS list json file in this code. ---- a/net/tools/transport_security_state_generator/transport_security_state_generator.cc -+++ b/net/tools/transport_security_state_generator/transport_security_state_generator.cc +--- net/tools/transport_security_state_generator/transport_security_state_generator.cc.orig ++++ net/tools/transport_security_state_generator/transport_security_state_generator.cc @@ -125,7 +125,7 @@ bool CheckDuplicateEntries(const Transpo bool CheckNoopEntries(const TransportSecurityStateEntries& entries) { for (const auto& entry : entries) { diff --git a/www/chromium-uc/patches/core/ungoogled-chromium/remove-unused-preferences-fields.patch b/www/chromium-uc/patches/core/ungoogled-chromium/remove-unused-preferences-fields.patch @@ -2,8 +2,8 @@ # TODO: This patch should probably be split up and merged into # disable-signin.patch and fix-building-without-safebrowsing.patch ---- a/android_webview/browser/aw_browser_context.cc -+++ b/android_webview/browser/aw_browser_context.cc +--- android_webview/browser/aw_browser_context.cc.orig ++++ android_webview/browser/aw_browser_context.cc @@ -49,7 +49,6 @@ #include "components/prefs/pref_service_factory.h" #include "components/prefs/segregated_pref_store.h" @@ -11,8 +11,8 @@ -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "components/url_formatter/url_fixer.h" #include "components/user_prefs/user_prefs.h" - #include "components/variations/variations_client.h" -@@ -520,8 +519,6 @@ void AwBrowserContext::RebuildTable( + #include "components/visitedlink/browser/visitedlink_writer.h" +@@ -470,8 +469,6 @@ void AwBrowserContext::RebuildTable( } void AwBrowserContext::SetExtendedReportingAllowed(bool allowed) { @@ -21,9 +21,9 @@ } // TODO(amalova): Make sure NetworkContextParams is configured correctly when ---- a/chrome/app/settings_strings.grdp -+++ b/chrome/app/settings_strings.grdp -@@ -1800,69 +1800,9 @@ +--- chrome/app/settings_strings.grdp.orig ++++ chrome/app/settings_strings.grdp +@@ -1591,78 +1591,9 @@ <message name="IDS_SETTINGS_NETWORK_PREDICTION_ENABLED_DESC_COOKIES_PAGE" desc="On the cookies page, the secondary text next to the checkbox that enables prediction of network actions."> Preloads pages that Chrome thinks you might visit. To do this, Chrome may use cookies, if you allow cookies, and may encrypt and send pages through Google to hide your identity from sites. </message> @@ -33,6 +33,9 @@ - <message name="IDS_SETTINGS_SAFEBROWSING_ENABLEPROTECTION_DESC" desc="Checkbox label: should Chrome protect user and user's device from dangerous sites"> - Sends URLs of some pages you visit to Google, when your security is at risk - </message> +- <message name="IDS_SETTINGS_SAFEBROWSING_ENABLE_REPORTING" desc="The section title of the extended safe browsing checkbox to help improve safe browsing"> +- Help improve Chrome security +- </message> - <message name="IDS_SETTINGS_SAFEBROWSING_ENABLE_REPORTING_DESC" desc="Description for extended safe browsing"> - Sends URLs of some pages you visit, limited system information, and some page content to Google, to help discover new threats and protect everyone on the web. - </message> @@ -51,6 +54,9 @@ - <message name="IDS_SETTINGS_SAFEBROWSING_ENHANCED_BULLET_ONE" desc="First bullet point under the safe browsing enhanced protection mode"> - Predicts and warns you about dangerous events before they happen - </message> +- <message name="IDS_SETTINGS_SAFEBROWSING_ENHANCED_BULLET_TWO" desc="Second bullet point under the safe browsing enhanced protection mode"> +- Keeps you safe on Chrome and may be used to improve your security in other Google apps when you are signed in +- </message> - <message name="IDS_SETTINGS_SAFEBROWSING_ENHANCED_BULLET_THREE" desc="Third bullet point under the safe browsing enhanced protection mode"> - Improves security for you and everyone on the web - </message> @@ -64,7 +70,7 @@ - Standard protection - </message> - <message name="IDS_SETTINGS_SAFEBROWSING_STANDARD_DESC" desc="Description for safe browsing standard protection mode"> -- Standard protection against websites, downloads, and extensions that are known to be dangerous +- Standard protection against websites, downloads, and extensions that are known to be dangerous. - </message> - <message name="IDS_SETTINGS_SAFEBROWSING_STANDARD_EXPAND_ACCESSIBILITY_LABEL" desc="Label for the button that toggles showing the detailed description of safe browsing standard protection. Only visible by screen reader software."> - Show standard protection details @@ -72,6 +78,9 @@ - <message name="IDS_SETTINGS_SAFEBROWSING_STANDARD_BULLET_ONE" desc="First bullet point under the safe browsing standard protection mode"> - Detects and warns you about dangerous events when they happen - </message> +- <message name="IDS_SETTINGS_SAFEBROWSING_STANDARD_BULLET_TWO" desc="First bullet point under the safe browsing standard protection mode"> +- Checks URLs with a list of unsafe sites stored in Chrome. If a site tries to steal your password, or when you download a harmful file, Chrome may also send URLs, including bits of page content, to Safe Browsing. +- </message> - <message name="IDS_SETTINGS_SAFEBROWSING_STANDARD_HELP_IMPROVE" desc="The name of the toggle to enable reporting to help improve safe browsing"> - Help improve security on the web for everyone - </message> @@ -93,9 +102,9 @@ <message name="IDS_SETTINGS_ENABLE_DO_NOT_TRACK" desc="The label of the checkbox to enable/disable sending the 'Do Not track' header"> Send a "Do Not Track" request with your browsing traffic </message> ---- a/chrome/browser/android/signin/signin_manager_android.cc -+++ b/chrome/browser/android/signin/signin_manager_android.cc -@@ -15,7 +15,6 @@ +--- chrome/browser/android/signin/signin_manager_android.cc.orig ++++ chrome/browser/android/signin/signin_manager_android.cc +@@ -14,7 +14,6 @@ #include "chrome/android/chrome_jni_headers/SigninManagerImpl_jni.h" #include "chrome/common/pref_names.h" #include "components/prefs/pref_service.h" @@ -103,7 +112,7 @@ #include "google_apis/gaia/gaia_auth_util.h" #include "base/android/callback_android.h" -@@ -31,7 +30,6 @@ +@@ -30,7 +29,6 @@ #include "components/policy/core/browser/browser_policy_connector.h" #include "components/policy/core/common/cloud/user_cloud_policy_manager.h" #include "components/prefs/pref_service.h" @@ -111,7 +120,7 @@ #include "components/signin/public/identity_manager/accounts_cookie_mutator.h" #include "components/signin/public/identity_manager/identity_manager.h" #include "content/public/browser/browser_context.h" -@@ -96,8 +94,6 @@ class ProfileDataRemover : public conten +@@ -95,8 +93,6 @@ class ProfileDataRemover : public conten // All the Profile data has been wiped. Clear the last signed in username // as well, so that the next signin doesn't trigger the account // change dialog. @@ -120,7 +129,7 @@ } origin_runner_->PostTask(FROM_HERE, std::move(callback_)); -@@ -133,11 +129,6 @@ SigninManagerAndroid::SigninManagerAndro +@@ -132,11 +128,6 @@ SigninManagerAndroid::SigninManagerAndro DCHECK(user_cloud_policy_manager_); DCHECK(user_policy_signin_service_); @@ -132,7 +141,7 @@ force_browser_signin_.Init(prefs::kForceBrowserSignin, g_browser_process->local_state()); -@@ -161,7 +152,7 @@ void SigninManagerAndroid::Shutdown() { +@@ -160,7 +151,7 @@ void SigninManagerAndroid::Shutdown() { } bool SigninManagerAndroid::IsSigninAllowed() const { @@ -141,11 +150,11 @@ } jboolean SigninManagerAndroid::IsSigninAllowedByPolicy(JNIEnv* env) const { ---- a/chrome/browser/android/signin/signin_manager_android.h -+++ b/chrome/browser/android/signin/signin_manager_android.h +--- chrome/browser/android/signin/signin_manager_android.h.orig ++++ chrome/browser/android/signin/signin_manager_android.h @@ -117,9 +117,6 @@ class SigninManagerAndroid : public Keye - const raw_ptr<Profile> profile_ = nullptr; + Profile* const profile_ = nullptr; - // Handler for prefs::kSigninAllowed set in user's profile. - BooleanPrefMember signin_allowed_; @@ -153,8 +162,8 @@ // Handler for prefs::kForceBrowserSignin. This preference is set in Local // State, not in user prefs. BooleanPrefMember force_browser_signin_; ---- a/chrome/browser/ash/lock_screen_apps/lock_screen_profile_creator_impl.cc -+++ b/chrome/browser/ash/lock_screen_apps/lock_screen_profile_creator_impl.cc +--- chrome/browser/ash/lock_screen_apps/lock_screen_profile_creator_impl.cc.orig ++++ chrome/browser/ash/lock_screen_apps/lock_screen_profile_creator_impl.cc @@ -18,7 +18,6 @@ #include "chrome/browser/profiles/profile_manager.h" #include "chrome/common/pref_names.h" @@ -172,18 +181,18 @@ return; } ---- a/chrome/browser/ash/lock_screen_apps/lock_screen_profile_creator_impl_unittest.cc -+++ b/chrome/browser/ash/lock_screen_apps/lock_screen_profile_creator_impl_unittest.cc +--- chrome/browser/ash/lock_screen_apps/lock_screen_profile_creator_impl_unittest.cc.orig ++++ chrome/browser/ash/lock_screen_apps/lock_screen_profile_creator_impl_unittest.cc @@ -37,7 +37,6 @@ - #include "chromeos/dbus/dbus_thread_manager.h" + #include "components/arc/session/arc_session.h" #include "components/crx_file/id_util.h" #include "components/prefs/pref_service.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "content/public/test/browser_task_environment.h" #include "extensions/common/extension.h" #include "extensions/common/extension_builder.h" ---- a/chrome/browser/ash/login/signin/device_id_browsertest.cc -+++ b/chrome/browser/ash/login/signin/device_id_browsertest.cc +--- chrome/browser/ash/login/signin/device_id_browsertest.cc.orig ++++ chrome/browser/ash/login/signin/device_id_browsertest.cc @@ -24,7 +24,6 @@ #include "chrome/common/chrome_switches.h" #include "chrome/test/base/in_process_browser_test.h" @@ -192,7 +201,7 @@ #include "components/user_manager/known_user.h" #include "components/user_manager/user_manager.h" #include "content/public/test/browser_test.h" -@@ -248,15 +247,6 @@ IN_PROC_BROWSER_TEST_F(DeviceIDTest, PRE +@@ -249,15 +248,6 @@ IN_PROC_BROWSER_TEST_F(DeviceIDTest, PRE SignInOnline(FakeGaiaMixin::kFakeUserEmail, FakeGaiaMixin::kFakeUserPassword, kRefreshToken1, FakeGaiaMixin::kFakeUserGaiaId); @@ -208,7 +217,7 @@ // Can't use SetKnownUserDeviceId here, because it forbids changing a device // ID. user_manager::known_user::SetStringPref( -@@ -281,13 +271,6 @@ IN_PROC_BROWSER_TEST_F(DeviceIDTest, PRE +@@ -282,13 +272,6 @@ IN_PROC_BROWSER_TEST_F(DeviceIDTest, PRE SignInOnline(FakeGaiaMixin::kFakeUserEmail, FakeGaiaMixin::kFakeUserPassword, kRefreshToken1, FakeGaiaMixin::kFakeUserGaiaId); @@ -222,9 +231,9 @@ // Can't use SetKnownUserDeviceId here, because it forbids changing a device // ID. user_manager::known_user::SetStringPref( ---- a/chrome/browser/chrome_content_browser_client.cc -+++ b/chrome/browser/chrome_content_browser_client.cc -@@ -233,7 +233,6 @@ +--- chrome/browser/chrome_content_browser_client.cc.orig ++++ chrome/browser/chrome_content_browser_client.cc +@@ -225,7 +225,6 @@ #include "components/safe_browsing/core/browser/realtime/url_lookup_service.h" #include "components/safe_browsing/core/browser/url_checker_delegate.h" #include "components/safe_browsing/core/common/features.h" @@ -232,8 +241,8 @@ #include "components/security_interstitials/content/insecure_form_navigation_throttle.h" #include "components/security_interstitials/content/origin_policy_ui.h" #include "components/security_interstitials/content/ssl_cert_reporter.h" ---- a/chrome/browser/download/download_browsertest.cc -+++ b/chrome/browser/download/download_browsertest.cc +--- chrome/browser/download/download_browsertest.cc.orig ++++ chrome/browser/download/download_browsertest.cc @@ -103,7 +103,6 @@ #include "components/safe_browsing/content/browser/safe_browsing_service_interface.h" #include "components/safe_browsing/content/common/proto/download_file_types.pb.h" @@ -242,9 +251,9 @@ #include "components/security_state/core/features.h" #include "components/security_state/core/security_state.h" #include "components/services/quarantine/test_support.h" ---- a/chrome/browser/download/download_item_model.cc -+++ b/chrome/browser/download/download_item_model.cc -@@ -790,6 +790,7 @@ void DownloadItemModel::ExecuteCommand(D +--- chrome/browser/download/download_item_model.cc.orig ++++ chrome/browser/download/download_item_model.cc +@@ -783,6 +783,7 @@ void DownloadItemModel::ExecuteCommand(D DownloadUIModel::ExecuteCommand(download_commands, command); break; case DownloadCommands::DEEP_SCAN: @@ -252,7 +261,7 @@ safe_browsing::SafeBrowsingService* sb_service = g_browser_process->safe_browsing_service(); if (!sb_service) -@@ -815,6 +816,7 @@ void DownloadItemModel::ExecuteCommand(D +@@ -808,6 +809,7 @@ void DownloadItemModel::ExecuteCommand(D safe_browsing::DeepScanningRequest::DeepScanTrigger:: TRIGGER_APP_PROMPT, safe_browsing::DownloadCheckResult::UNKNOWN, std::move(settings)); @@ -260,8 +269,8 @@ break; } } ---- a/chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc -+++ b/chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc +--- chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc.orig ++++ chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc @@ -38,7 +38,6 @@ #include "components/policy/core/common/chrome_schema.h" #include "components/prefs/pref_service.h" @@ -270,33 +279,35 @@ #include "components/url_matcher/url_matcher.h" #include "content/public/browser/web_contents.h" #include "crypto/secure_hash.h" ---- a/chrome/browser/enterprise/connectors/connectors_manager.cc -+++ b/chrome/browser/enterprise/connectors/connectors_manager.cc -@@ -6,12 +6,12 @@ +--- chrome/browser/enterprise/connectors/connectors_manager.cc.orig ++++ chrome/browser/enterprise/connectors/connectors_manager.cc +@@ -6,6 +6,7 @@ #include <memory> +#include "base/bind.h" #include "base/feature_list.h" + #include "base/no_destructor.h" #include "base/values.h" - #include "chrome/browser/browser_process.h" +@@ -13,7 +14,6 @@ #include "chrome/browser/enterprise/connectors/connectors_prefs.h" + #include "components/policy/core/browser/url_util.h" #include "components/prefs/pref_service.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "components/url_matcher/url_matcher.h" #include "url/gurl.h" ---- a/chrome/browser/enterprise/connectors/connectors_service.cc -+++ b/chrome/browser/enterprise/connectors/connectors_service.cc -@@ -37,7 +37,6 @@ +--- chrome/browser/enterprise/connectors/connectors_service.cc.orig ++++ chrome/browser/enterprise/connectors/connectors_service.cc +@@ -36,7 +36,6 @@ #include "components/policy/core/common/cloud/machine_level_user_cloud_policy_store.h" #include "components/policy/core/common/cloud/user_cloud_policy_manager.h" #include "components/policy/core/common/policy_types.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" - #include "components/signin/public/base/consent_level.h" + #include "components/signin/public/identity_manager/consent_level.h" #include "components/signin/public/identity_manager/identity_manager.h" #include "components/user_prefs/user_prefs.h" -@@ -390,8 +389,7 @@ std::string ConnectorsService::GetManage +@@ -406,8 +405,7 @@ std::string ConnectorsService::GetManage absl::optional<policy::PolicyScope> scope = absl::nullopt; for (const char* scope_pref : @@ -305,8 +316,8 @@ + {ConnectorScopePref(AnalysisConnector::FILE_ATTACHED), ConnectorScopePref(AnalysisConnector::FILE_DOWNLOADED), ConnectorScopePref(AnalysisConnector::BULK_DATA_ENTRY), - ConnectorScopePref(AnalysisConnector::PRINT), -@@ -443,20 +441,6 @@ std::string ConnectorsService::GetManage + ConnectorScopePref(ReportingConnector::SECURITY_EVENT)}) { +@@ -458,20 +456,6 @@ std::string ConnectorsService::GetManage absl::optional<std::string> ConnectorsService::GetDMTokenForRealTimeUrlCheck() const { @@ -327,9 +338,9 @@ return absl::nullopt; } ---- a/chrome/browser/enterprise/connectors/connectors_service.h -+++ b/chrome/browser/enterprise/connectors/connectors_service.h -@@ -15,7 +15,6 @@ +--- chrome/browser/enterprise/connectors/connectors_service.h.orig ++++ chrome/browser/enterprise/connectors/connectors_service.h +@@ -13,7 +13,6 @@ #include "components/keyed_service/content/browser_context_keyed_service_factory.h" #include "components/keyed_service/core/keyed_service.h" #include "components/policy/core/common/policy_types.h" @@ -337,9 +348,9 @@ #include "content/public/browser/browser_context.h" namespace base { ---- a/chrome/browser/enterprise/signals/context_info_fetcher.cc -+++ b/chrome/browser/enterprise/signals/context_info_fetcher.cc -@@ -218,11 +218,6 @@ void ContextInfoFetcher::Fetch(ContextIn +--- chrome/browser/enterprise/signals/context_info_fetcher.cc.orig ++++ chrome/browser/enterprise/signals/context_info_fetcher.cc +@@ -183,11 +183,6 @@ void ContextInfoFetcher::Fetch(ContextIn info.third_party_blocking_enabled = utils::GetThirdPartyBlockingEnabled(g_browser_process->local_state()); @@ -349,19 +360,19 @@ - info.password_protection_warning_trigger = - utils::GetPasswordProtectionWarningTrigger(profile->GetPrefs()); - #if BUILDFLAG(IS_WIN) + #if defined(OS_WIN) base::ThreadPool::CreateCOMSTATaskRunner({base::MayBlock()}) ---- a/chrome/browser/enterprise/signals/context_info_fetcher.h -+++ b/chrome/browser/enterprise/signals/context_info_fetcher.h -@@ -13,7 +13,6 @@ - #include "base/memory/raw_ptr.h" +--- chrome/browser/enterprise/signals/context_info_fetcher.h.orig ++++ chrome/browser/enterprise/signals/context_info_fetcher.h +@@ -12,7 +12,6 @@ + #include "base/callback_forward.h" #include "build/build_config.h" #include "chrome/browser/enterprise/signals/signals_common.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" namespace content { class BrowserContext; -@@ -40,11 +39,8 @@ struct ContextInfo { +@@ -39,11 +38,8 @@ struct ContextInfo { std::vector<std::string> on_bulk_data_entry_providers; std::vector<std::string> on_security_event_providers; std::string browser_version; @@ -373,18 +384,18 @@ absl::optional<bool> chrome_cleanup_enabled; bool chrome_remote_desktop_app_blocked; absl::optional<bool> third_party_blocking_enabled; ---- a/chrome/browser/enterprise/signals/signals_utils.cc -+++ b/chrome/browser/enterprise/signals/signals_utils.cc +--- chrome/browser/enterprise/signals/signals_utils.cc.orig ++++ chrome/browser/enterprise/signals/signals_utils.cc @@ -10,7 +10,6 @@ #include "components/policy/content/policy_blocklist_service.h" #include "components/policy/core/browser/url_blocklist_manager.h" #include "components/prefs/pref_service.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" - #if BUILDFLAG(IS_WIN) + #if defined(OS_WIN) #include "components/component_updater/pref_names.h" ---- a/chrome/browser/enterprise/signals/signals_utils.h -+++ b/chrome/browser/enterprise/signals/signals_utils.h +--- chrome/browser/enterprise/signals/signals_utils.h.orig ++++ chrome/browser/enterprise/signals/signals_utils.h @@ -5,8 +5,6 @@ #ifndef CHROME_BROWSER_ENTERPRISE_SIGNALS_SIGNALS_UTILS_H_ #define CHROME_BROWSER_ENTERPRISE_SIGNALS_SIGNALS_UTILS_H_ @@ -394,8 +405,8 @@ #include "third_party/abseil-cpp/absl/types/optional.h" class PolicyBlocklistService; ---- a/chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc -+++ b/chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc +--- chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc.orig ++++ chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc @@ -77,45 +77,10 @@ api::enterprise_reporting_private::Conte info.browser_version = std::move(signals.browser_version); info.built_in_dns_client_enabled = signals.built_in_dns_client_enabled; @@ -446,9 +457,9 @@ return info; } ---- a/chrome/browser/extensions/api/identity/identity_apitest.cc -+++ b/chrome/browser/extensions/api/identity/identity_apitest.cc -@@ -57,7 +57,6 @@ +--- chrome/browser/extensions/api/identity/identity_apitest.cc.orig ++++ chrome/browser/extensions/api/identity/identity_apitest.cc +@@ -56,7 +56,6 @@ #include "components/prefs/pref_service.h" #include "components/signin/core/browser/account_reconcilor.h" #include "components/signin/public/base/list_accounts_test_utils.h" @@ -456,9 +467,9 @@ #include "components/signin/public/base/signin_switches.h" #include "components/signin/public/identity_manager/accounts_mutator.h" #include "components/signin/public/identity_manager/identity_manager.h" ---- a/chrome/browser/extensions/api/identity/identity_get_auth_token_function.cc -+++ b/chrome/browser/extensions/api/identity/identity_get_auth_token_function.cc -@@ -29,7 +29,6 @@ +--- chrome/browser/extensions/api/identity/identity_get_auth_token_function.cc.orig ++++ chrome/browser/extensions/api/identity/identity_get_auth_token_function.cc +@@ -30,7 +30,6 @@ #include "chrome/common/channel_info.h" #include "chrome/common/extensions/api/identity.h" #include "components/prefs/pref_service.h" @@ -466,7 +477,7 @@ #include "components/signin/public/base/signin_switches.h" #include "components/signin/public/identity_manager/access_token_info.h" #include "components/signin/public/identity_manager/accounts_in_cookie_jar_info.h" -@@ -63,7 +62,7 @@ const char* const kExtensionsIdentityAPI +@@ -64,7 +63,7 @@ const char* const kExtensionsIdentityAPI "extensions_identity_api"; bool IsBrowserSigninAllowed(Profile* profile) { @@ -475,8 +486,8 @@ } std::string GetOAuth2MintTokenFlowVersion() { ---- a/chrome/browser/extensions/api/preference/preference_api.cc -+++ b/chrome/browser/extensions/api/preference/preference_api.cc +--- chrome/browser/extensions/api/preference/preference_api.cc.orig ++++ chrome/browser/extensions/api/preference/preference_api.cc @@ -35,7 +35,6 @@ #include "components/prefs/pref_service.h" #include "components/privacy_sandbox/privacy_sandbox_prefs.h" @@ -484,8 +495,8 @@ -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "components/spellcheck/browser/pref_names.h" #include "components/translate/core/browser/translate_pref_names.h" - #include "extensions/browser/api/content_settings/content_settings_service.h" -@@ -110,11 +109,6 @@ const PrefMappingEntry kPrefMapping[] = + #include "extensions/browser/extension_pref_value_map.h" +@@ -109,11 +108,6 @@ const PrefMappingEntry kPrefMapping[] = APIPermissionID::kPrivacy}, {"doNotTrackEnabled", prefs::kEnableDoNotTrack, APIPermissionID::kPrivacy, APIPermissionID::kPrivacy}, @@ -497,7 +508,7 @@ {"searchSuggestEnabled", prefs::kSearchSuggestEnabled, APIPermissionID::kPrivacy, APIPermissionID::kPrivacy}, {"spellingServiceEnabled", spellcheck::prefs::kSpellCheckUseSpellingService, -@@ -845,18 +839,6 @@ ExtensionFunction::ResponseAction SetPre +@@ -844,18 +838,6 @@ ExtensionFunction::ResponseAction SetPre base::Value(browser_pref_value->GetBool())); } @@ -516,7 +527,7 @@ preference_api->SetExtensionControlledPref( extension_id(), browser_pref, scope, base::Value::FromUniquePtrValue(std::move(browser_pref_value))); -@@ -909,18 +891,6 @@ ExtensionFunction::ResponseAction ClearP +@@ -908,18 +890,6 @@ ExtensionFunction::ResponseAction ClearP PreferenceAPI::Get(browser_context()) ->RemoveExtensionControlledPref(extension_id(), browser_pref, scope); @@ -535,9 +546,9 @@ return RespondNow(NoArguments()); } ---- a/chrome/browser/extensions/api/preference/preference_apitest.cc -+++ b/chrome/browser/extensions/api/preference/preference_apitest.cc -@@ -31,7 +31,6 @@ +--- chrome/browser/extensions/api/preference/preference_apitest.cc.orig ++++ chrome/browser/extensions/api/preference/preference_apitest.cc +@@ -28,7 +28,6 @@ #include "components/keep_alive_registry/scoped_keep_alive.h" #include "components/password_manager/core/common/password_manager_pref_names.h" #include "components/prefs/pref_service.h" @@ -545,43 +556,43 @@ #include "components/translate/core/browser/translate_pref_names.h" #include "content/public/browser/notification_service.h" #include "content/public/test/browser_test.h" -@@ -86,7 +85,6 @@ class ExtensionPreferenceApiTest - prefs->GetInteger(prefetch::prefs::kNetworkPredictionOptions)); +@@ -73,7 +72,6 @@ class ExtensionPreferenceApiTest : publi + prefs->GetInteger(prefs::kNetworkPredictionOptions)); EXPECT_TRUE( prefs->GetBoolean(password_manager::prefs::kCredentialsEnableService)); - EXPECT_TRUE(prefs->GetBoolean(prefs::kSafeBrowsingEnabled)); EXPECT_TRUE(prefs->GetBoolean(prefs::kSearchSuggestEnabled)); } -@@ -112,7 +110,6 @@ class ExtensionPreferenceApiTest - prefs->GetInteger(prefetch::prefs::kNetworkPredictionOptions)); +@@ -99,7 +97,6 @@ class ExtensionPreferenceApiTest : publi + prefs->GetInteger(prefs::kNetworkPredictionOptions)); EXPECT_FALSE( prefs->GetBoolean(password_manager::prefs::kCredentialsEnableService)); - EXPECT_FALSE(prefs->GetBoolean(prefs::kSafeBrowsingEnabled)); EXPECT_FALSE(prefs->GetBoolean(prefs::kSearchSuggestEnabled)); } -@@ -185,7 +182,6 @@ IN_PROC_BROWSER_TEST_P(ExtensionPreferen - prefetch::prefs::kNetworkPredictionOptions, - static_cast<int>(prefetch::NetworkPredictionOptions::kDisabled)); +@@ -163,7 +160,6 @@ IN_PROC_BROWSER_TEST_F(ExtensionPreferen + prefs->SetInteger(prefs::kNetworkPredictionOptions, + chrome_browser_net::NETWORK_PREDICTION_NEVER); prefs->SetBoolean(password_manager::prefs::kCredentialsEnableService, false); - prefs->SetBoolean(prefs::kSafeBrowsingEnabled, false); prefs->SetBoolean(prefs::kSearchSuggestEnabled, false); prefs->SetString(prefs::kWebRTCIPHandlingPolicy, blink::kWebRTCIPHandlingDefaultPublicInterfaceOnly); ---- a/chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_event_router.cc -+++ b/chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_event_router.cc -@@ -37,7 +37,6 @@ +--- chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_event_router.cc.orig ++++ chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_event_router.cc +@@ -36,7 +36,6 @@ #include "components/policy/core/common/cloud/user_cloud_policy_manager.h" #include "components/prefs/pref_service.h" #include "components/safe_browsing/content/browser/web_ui/safe_browsing_ui.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "components/signin/public/identity_manager/identity_manager.h" - #include "components/url_matcher/url_matcher.h" - #include "components/url_matcher/url_util.h" ---- a/chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_event_router_unittest.cc -+++ b/chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_event_router_unittest.cc -@@ -36,7 +36,6 @@ + #include "content/public/browser/browser_context.h" + #include "extensions/browser/event_router.h" +--- chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_event_router_unittest.cc.orig ++++ chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_event_router_unittest.cc +@@ -35,7 +35,6 @@ #include "components/policy/core/common/cloud/mock_cloud_policy_client.h" #include "components/policy/core/common/cloud/realtime_reporting_job_configuration.h" #include "components/safe_browsing/core/common/features.h" @@ -589,8 +600,8 @@ #include "components/signin/public/identity_manager/identity_test_environment.h" #include "content/public/test/browser_task_environment.h" #include "extensions/browser/test_event_router.h" ---- a/chrome/browser/extensions/api/settings_private/prefs_util.cc -+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc +--- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig ++++ chrome/browser/extensions/api/settings_private/prefs_util.cc @@ -43,7 +43,6 @@ #include "components/prefs/pref_service.h" #include "components/privacy_sandbox/privacy_sandbox_prefs.h" @@ -599,7 +610,7 @@ #include "components/search_engines/default_search_manager.h" #include "components/spellcheck/browser/pref_names.h" #include "components/translate/core/browser/translate_pref_names.h" -@@ -292,16 +291,6 @@ const PrefsUtil::TypedPrefMap& PrefsUtil +@@ -283,16 +282,6 @@ const PrefsUtil::TypedPrefMap& PrefsUtil settings_api::PrefType::PREF_TYPE_BOOLEAN; // Security page @@ -616,9 +627,9 @@ (*s_allowlist)[::prefs::kHttpsOnlyModeEnabled] = settings_api::PrefType::PREF_TYPE_BOOLEAN; ---- a/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc -+++ b/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc -@@ -646,9 +646,6 @@ IN_PROC_BROWSER_TEST_F(ExtensionWebstore +--- chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc.orig ++++ chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc +@@ -647,9 +647,6 @@ IN_PROC_BROWSER_TEST_F(ExtensionWebstore IN_PROC_BROWSER_TEST_F(ExtensionWebstorePrivateGetReferrerChainApiTest, GetReferrerChainForNonSafeBrowsingUser) { PrefService* pref_service = browser()->profile()->GetPrefs(); @@ -628,8 +639,8 @@ GURL page_url = GetTestServerURLWithReferrers("empty_referrer_chain.html"); ASSERT_TRUE(OpenTestURL(page_url)); ---- a/chrome/browser/extensions/extension_allowlist.cc -+++ b/chrome/browser/extensions/extension_allowlist.cc +--- chrome/browser/extensions/extension_allowlist.cc.orig ++++ chrome/browser/extensions/extension_allowlist.cc @@ -9,7 +9,6 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/safe_browsing/safe_browsing_metrics_collector_factory.h" @@ -681,8 +692,8 @@ } } // namespace extensions ---- a/chrome/browser/extensions/installed_loader.cc -+++ b/chrome/browser/extensions/installed_loader.cc +--- chrome/browser/extensions/installed_loader.cc.orig ++++ chrome/browser/extensions/installed_loader.cc @@ -797,12 +797,6 @@ void InstalledLoader::RecordExtensionsMe enabled_not_allowlisted_count); base::UmaHistogramCounts100("Extensions.NotAllowlistedDisabled", @@ -696,9 +707,9 @@ } int InstalledLoader::GetCreationFlags(const ExtensionInfo* info) { ---- a/chrome/browser/net/profile_network_context_service.cc -+++ b/chrome/browser/net/profile_network_context_service.cc -@@ -47,7 +47,6 @@ +--- chrome/browser/net/profile_network_context_service.cc.orig ++++ chrome/browser/net/profile_network_context_service.cc +@@ -43,7 +43,6 @@ #include "components/pref_registry/pref_registry_syncable.h" #include "components/prefs/pref_registry_simple.h" #include "components/prefs/pref_service.h" @@ -706,24 +717,22 @@ #include "content/public/browser/browser_context.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/network_service_instance.h" -@@ -800,15 +799,8 @@ void ProfileNetworkContextService::Confi +@@ -741,13 +740,6 @@ void ProfileNetworkContextService::Confi network_context_params->enable_certificate_reporting = true; network_context_params->enable_expect_ct_reporting = true; -- SCTReportingService* sct_reporting_service = -- SCTReportingServiceFactory::GetForBrowserContext(profile_); -- if (sct_reporting_service) { -- network_context_params->sct_auditing_mode = -- sct_reporting_service->GetReportingMode(); -- } else { - network_context_params->sct_auditing_mode = - network::mojom::SCTAuditingMode::kDisabled; +- // Initialize the network context to do SCT auditing only if the current +- // profile is opted in to Safe Browsing Extended Reporting. +- if (!profile_->IsOffTheRecord() && +- safe_browsing::IsExtendedReportingEnabled(*profile_->GetPrefs())) { +- network_context_params->enable_sct_auditing = true; - } - +- network_context_params->ct_policy = GetCTPolicy(); ---- a/chrome/browser/net/trial_comparison_cert_verifier_browsertest.cc -+++ b/chrome/browser/net/trial_comparison_cert_verifier_browsertest.cc + #if BUILDFLAG(TRIAL_COMPARISON_CERT_VERIFIER_SUPPORTED) +--- chrome/browser/net/trial_comparison_cert_verifier_browsertest.cc.orig ++++ chrome/browser/net/trial_comparison_cert_verifier_browsertest.cc @@ -11,7 +11,6 @@ #include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/ui_test_utils.h" @@ -732,8 +741,8 @@ #include "content/public/test/browser_test.h" #include "net/base/features.h" #include "net/cert/trial_comparison_cert_verifier.h" ---- a/chrome/browser/net/trial_comparison_cert_verifier_controller.cc -+++ b/chrome/browser/net/trial_comparison_cert_verifier_controller.cc +--- chrome/browser/net/trial_comparison_cert_verifier_controller.cc.orig ++++ chrome/browser/net/trial_comparison_cert_verifier_controller.cc @@ -19,7 +19,6 @@ #include "chrome/browser/safe_browsing/certificate_reporting_service.h" #include "chrome/browser/safe_browsing/certificate_reporting_service_factory.h" @@ -766,8 +775,8 @@ } void TrialComparisonCertVerifierController::SendTrialReport( ---- a/chrome/browser/net/trial_comparison_cert_verifier_controller.h -+++ b/chrome/browser/net/trial_comparison_cert_verifier_controller.h +--- chrome/browser/net/trial_comparison_cert_verifier_controller.h.orig ++++ chrome/browser/net/trial_comparison_cert_verifier_controller.h @@ -14,7 +14,6 @@ #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" @@ -779,14 +788,14 @@ @@ -77,7 +76,6 @@ class TrialComparisonCertVerifierControl void RefreshState(); - raw_ptr<Profile> profile_; + Profile* profile_; - PrefChangeRegistrar pref_change_registrar_; mojo::ReceiverSet< cert_verifier::mojom::TrialComparisonCertVerifierReportClient> ---- a/chrome/browser/net/trial_comparison_cert_verifier_controller_unittest.cc -+++ b/chrome/browser/net/trial_comparison_cert_verifier_controller_unittest.cc -@@ -21,7 +21,6 @@ +--- chrome/browser/net/trial_comparison_cert_verifier_controller_unittest.cc.orig ++++ chrome/browser/net/trial_comparison_cert_verifier_controller_unittest.cc +@@ -20,7 +20,6 @@ #include "chrome/test/base/testing_browser_process.h" #include "chrome/test/base/testing_profile.h" #include "chrome/test/base/testing_profile_manager.h" @@ -794,17 +803,17 @@ #include "components/security_interstitials/content/cert_logger.pb.h" #include "components/sync_preferences/testing_pref_service_syncable.h" #include "content/public/browser/browser_task_traits.h" ---- a/chrome/browser/password_manager/generated_password_leak_detection_pref.cc -+++ b/chrome/browser/password_manager/generated_password_leak_detection_pref.cc -@@ -14,7 +14,6 @@ - #include "components/password_manager/core/common/password_manager_features.h" +--- chrome/browser/password_manager/generated_password_leak_detection_pref.cc.orig ++++ chrome/browser/password_manager/generated_password_leak_detection_pref.cc +@@ -13,7 +13,6 @@ + #include "chrome/common/extensions/api/settings_private.h" #include "components/password_manager/core/common/password_manager_pref_names.h" #include "components/prefs/pref_service.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "components/signin/public/identity_manager/identity_manager.h" namespace { -@@ -37,8 +36,7 @@ bool IsUserAllowedToUseLeakDetection(Pro +@@ -43,8 +42,7 @@ bool IsUserSignedInAndSyncing(Profile* p // Returns whether the effective value of the Safe Browsing preferences for // |profile| is standard protection. bool IsSafeBrowsingStandard(Profile* profile) { @@ -814,7 +823,7 @@ } } // namespace -@@ -57,16 +55,6 @@ GeneratedPasswordLeakDetectionPref::Gene +@@ -63,16 +61,6 @@ GeneratedPasswordLeakDetectionPref::Gene base::BindRepeating( &GeneratedPasswordLeakDetectionPref::OnSourcePreferencesChanged, base::Unretained(this))); @@ -831,8 +840,8 @@ if (auto* identity_manager = IdentityManagerFactory::GetForProfile(profile)) identity_manager_observer_.Observe(identity_manager); ---- a/chrome/browser/permissions/abusive_origin_permission_revocation_request.cc -+++ b/chrome/browser/permissions/abusive_origin_permission_revocation_request.cc +--- chrome/browser/permissions/abusive_origin_permission_revocation_request.cc.orig ++++ chrome/browser/permissions/abusive_origin_permission_revocation_request.cc @@ -17,7 +17,6 @@ #include "components/permissions/permissions_client.h" #include "components/prefs/pref_service.h" @@ -841,18 +850,18 @@ namespace { constexpr char kExcludedKey[] = "exempted"; ---- a/chrome/browser/permissions/prediction_based_permission_ui_selector.cc -+++ b/chrome/browser/permissions/prediction_based_permission_ui_selector.cc -@@ -26,7 +26,6 @@ +--- chrome/browser/permissions/prediction_based_permission_ui_selector.cc.orig ++++ chrome/browser/permissions/prediction_based_permission_ui_selector.cc +@@ -23,7 +23,6 @@ #include "components/permissions/prediction_service/prediction_service.h" #include "components/permissions/prediction_service/prediction_service_messages.pb.h" #include "components/prefs/pref_service.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" - #if BUILDFLAG(BUILD_WITH_TFLITE_LIB) - #include "chrome/browser/permissions/prediction_model_handler_factory.h" ---- a/chrome/browser/policy/browser_signin_policy_handler.cc -+++ b/chrome/browser/policy/browser_signin_policy_handler.cc + namespace { + +--- chrome/browser/policy/browser_signin_policy_handler.cc.orig ++++ chrome/browser/policy/browser_signin_policy_handler.cc @@ -15,7 +15,6 @@ #include "components/policy/core/common/policy_map.h" #include "components/policy/policy_constants.h" @@ -863,11 +872,11 @@ BrowserSigninPolicyHandler::BrowserSigninPolicyHandler(Schema chrome_schema) @@ -48,28 +47,18 @@ void BrowserSigninPolicyHandler::ApplyPo #endif - [[fallthrough]]; + FALLTHROUGH; case BrowserSigninMode::kEnabled: -+#if !BUILDFLAG(IS_ANDROID) ++#if !defined(OS_ANDROID) prefs->SetValue( --#if BUILDFLAG(IS_ANDROID) +-#if defined(OS_ANDROID) - // The new kSigninAllowedOnNextStartup pref is only used on Desktop. - // Keep the old kSigninAllowed pref for Android until the policy is - // fully deprecated in M71 and can be removed. @@ -879,9 +888,9 @@ +#endif break; case BrowserSigninMode::kDisabled: -+#if !BUILDFLAG(IS_ANDROID) ++#if !defined(OS_ANDROID) prefs->SetValue( --#if BUILDFLAG(IS_ANDROID) +-#if defined(OS_ANDROID) - // The new kSigninAllowedOnNextStartup pref is only used on Desktop. - // Keep the old kSigninAllowed pref for Android until the policy is - // fully deprecated in M71 and can be removed. @@ -894,12 +903,12 @@ break; } } ---- a/chrome/browser/policy/configuration_policy_handler_list_factory.cc -+++ b/chrome/browser/policy/configuration_policy_handler_list_factory.cc -@@ -94,12 +94,9 @@ +--- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig ++++ chrome/browser/policy/configuration_policy_handler_list_factory.cc +@@ -83,12 +83,9 @@ + #include "components/policy/core/common/schema.h" + #include "components/policy/policy_constants.h" #include "components/proxy_config/proxy_policy_handler.h" - #include "components/safe_browsing/buildflags.h" - #include "components/safe_browsing/content/common/file_type_policies_prefs.h" -#include "components/safe_browsing/core/common/safe_browsing_policy_handler.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "components/search_engines/default_search_policy_handler.h" @@ -909,7 +918,7 @@ #include "components/spellcheck/spellcheck_buildflags.h" #include "components/sync/base/pref_names.h" #include "components/sync/driver/sync_policy_handler.h" -@@ -222,15 +219,6 @@ const PolicyToPreferenceMapEntry kSimple +@@ -209,15 +206,6 @@ const PolicyToPreferenceMapEntry kSimple { key::kQuicAllowed, prefs::kQuicAllowed, base::Value::Type::BOOLEAN }, @@ -925,7 +934,7 @@ { key::kUrlKeyedAnonymizedDataCollectionEnabled, unified_consent::prefs::kUrlKeyedAnonymizedDataCollectionEnabled, base::Value::Type::BOOLEAN }, -@@ -366,15 +354,6 @@ const PolicyToPreferenceMapEntry kSimple +@@ -353,15 +341,6 @@ const PolicyToPreferenceMapEntry kSimple { key::kGloballyScopeHTTPAuthCacheEnabled, prefs::kGloballyScopeHTTPAuthCacheEnabled, base::Value::Type::BOOLEAN }, @@ -941,7 +950,7 @@ { key::kSafeSitesFilterBehavior, policy_prefs::kSafeSitesFilterBehavior, base::Value::Type::INTEGER }, -@@ -483,18 +462,12 @@ const PolicyToPreferenceMapEntry kSimple +@@ -470,18 +449,12 @@ const PolicyToPreferenceMapEntry kSimple { key::kMaxConnectionsPerProxy, prefs::kMaxConnectionsPerProxy, base::Value::Type::INTEGER }, @@ -960,7 +969,7 @@ { key::kCECPQ2Enabled, prefs::kCECPQ2Enabled, base::Value::Type::BOOLEAN }, -@@ -706,9 +679,6 @@ const PolicyToPreferenceMapEntry kSimple +@@ -684,9 +657,6 @@ const PolicyToPreferenceMapEntry kSimple { key::kIntranetRedirectBehavior, omnibox::kIntranetRedirectBehavior, base::Value::Type::INTEGER }, @@ -970,16 +979,16 @@ { key::kAccessibilityImageLabelsEnabled, prefs::kAccessibilityImageLabelsEnabled, base::Value::Type::BOOLEAN }, -@@ -1740,8 +1710,6 @@ std::unique_ptr<ConfigurationPolicyHandl +@@ -1642,8 +1612,6 @@ std::unique_ptr<ConfigurationPolicyHandl handlers->AddHandler(std::make_unique<JavascriptPolicyHandler>()); handlers->AddHandler(std::make_unique<NetworkPredictionPolicyHandler>()); handlers->AddHandler(std::make_unique<RestoreOnStartupPolicyHandler>()); - handlers->AddHandler( - std::make_unique<safe_browsing::SafeBrowsingPolicyHandler>()); handlers->AddHandler(std::make_unique<SimpleDeprecatingPolicyHandler>( - std::make_unique<SimplePolicyHandler>( - key::kAuthServerWhitelist, // nocheck -@@ -1765,9 +1733,6 @@ std::unique_ptr<ConfigurationPolicyHandl + std::make_unique<SimplePolicyHandler>(key::kAuthServerWhitelist, + prefs::kAuthServerAllowlist, +@@ -1667,9 +1635,6 @@ std::unique_ptr<ConfigurationPolicyHandl key::kWindowOcclusionEnabled, policy::policy_prefs::kNativeWindowOcclusionEnabled, base::Value::Type::BOOLEAN))); @@ -989,7 +998,7 @@ handlers->AddHandler(std::make_unique<syncer::SyncPolicyHandler>()); handlers->AddHandler(std::make_unique<BrowsingHistoryPolicyHandler>()); -@@ -1863,12 +1828,6 @@ std::unique_ptr<ConfigurationPolicyHandl +@@ -1762,12 +1727,6 @@ std::unique_ptr<ConfigurationPolicyHandl key::kOnSecurityEventEnterpriseConnector, enterprise_connectors::kOnSecurityEventPref, enterprise_connectors::kOnSecurityEventScopePref, chrome_schema)); @@ -1002,54 +1011,53 @@ handlers->AddHandler(std::make_unique<BrowsingDataLifetimePolicyHandler>( key::kClearBrowsingDataOnExitList, -@@ -1918,17 +1877,6 @@ std::unique_ptr<ConfigurationPolicyHandl +@@ -1806,17 +1765,6 @@ std::unique_ptr<ConfigurationPolicyHandl signin_legacy_policies.push_back(std::make_unique<SimplePolicyHandler>( key::kForceBrowserSignin, prefs::kForceBrowserSignin, base::Value::Type::BOOLEAN)); - signin_legacy_policies.push_back(std::make_unique<SimplePolicyHandler>( - key::kSigninAllowed, --#if BUILDFLAG(IS_ANDROID) +-#if defined(OS_ANDROID) - // The new kSigninAllowedOnNextStartup pref is only used on Desktop. - // Keep the old kSigninAllowed pref for Android until the policy is - // fully deprecated in M71 and can be removed. - prefs::kSigninAllowed, --#else // BUILDFLAG(IS_ANDROID) +-#else // defined(OS_ANDROID) - prefs::kSigninAllowedOnNextStartup, --#endif // BUILDFLAG(IS_ANDROID) +-#endif // defined(OS_ANDROID) - base::Value::Type::BOOLEAN)); handlers->AddHandler(std::make_unique<LegacyPoliciesDeprecatingPolicyHandler>( std::move(signin_legacy_policies), std::make_unique<BrowserSigninPolicyHandler>(chrome_schema))); ---- a/chrome/browser/prefs/browser_prefs.cc -+++ b/chrome/browser/prefs/browser_prefs.cc -@@ -132,7 +132,6 @@ +--- chrome/browser/prefs/browser_prefs.cc.orig ++++ chrome/browser/prefs/browser_prefs.cc +@@ -139,7 +139,6 @@ + #include "components/prefs/pref_service.h" #include "components/privacy_sandbox/privacy_sandbox_prefs.h" #include "components/proxy_config/pref_proxy_config_tracker_impl.h" - #include "components/safe_browsing/content/common/file_type_policies_prefs.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "components/search_engines/template_url_prepopulate_data.h" #include "components/security_interstitials/content/insecure_form_blocking_page.h" #include "components/security_interstitials/content/stateful_ssl_host_state_delegate.h" -@@ -989,7 +988,6 @@ void RegisterLocalState(PrefRegistrySimp +@@ -921,7 +920,6 @@ void RegisterLocalState(PrefRegistrySimp ProfileNetworkContextService::RegisterLocalStatePrefs(registry); profiles::RegisterPrefs(registry); RegisterScreenshotPrefs(registry); - safe_browsing::RegisterLocalStatePrefs(registry); secure_origin_allowlist::RegisterPrefs(registry); - #if !BUILDFLAG(IS_ANDROID) + #if !defined(OS_ANDROID) SerialPolicyAllowedPorts::RegisterPrefs(registry); -@@ -1246,8 +1244,6 @@ void RegisterProfilePrefs(user_prefs::Pr +@@ -1171,7 +1169,6 @@ void RegisterProfilePrefs(user_prefs::Pr PushMessagingAppIdentifier::RegisterProfilePrefs(registry); QuietNotificationPermissionUiState::RegisterProfilePrefs(registry); RegisterBrowserUserPrefs(registry); -- safe_browsing::file_type::RegisterProfilePrefs(registry); - safe_browsing::RegisterProfilePrefs(registry); SearchPrefetchService::RegisterProfilePrefs(registry); blocked_content::SafeBrowsingTriggeredPopupBlocker::RegisterProfilePrefs( registry); ---- a/chrome/browser/prefs/chrome_command_line_pref_store.cc -+++ b/chrome/browser/prefs/chrome_command_line_pref_store.cc -@@ -29,7 +29,6 @@ +--- chrome/browser/prefs/chrome_command_line_pref_store.cc.orig ++++ chrome/browser/prefs/chrome_command_line_pref_store.cc +@@ -31,7 +31,6 @@ #include "components/language/core/browser/pref_names.h" #include "components/proxy_config/proxy_config_dictionary.h" #include "components/proxy_config/proxy_config_pref_names.h" @@ -1057,18 +1065,18 @@ #include "components/safe_browsing/core/common/safebrowsing_switches.h" #include "components/sync/base/pref_names.h" #include "content/public/common/content_switches.h" -@@ -77,8 +76,6 @@ const CommandLinePrefStore::BooleanSwitc +@@ -78,8 +77,6 @@ const CommandLinePrefStore::BooleanSwitc {switches::kAllowCrossOriginAuthPrompt, prefs::kAllowCrossOriginAuthPrompt, true}, {switches::kDisablePrintPreview, prefs::kPrintPreviewDisabled, true}, - {safe_browsing::switches::kSbEnableEnhancedProtection, - prefs::kSafeBrowsingEnhanced, true}, #if BUILDFLAG(IS_CHROMEOS_ASH) - {ash::switches::kEnableTouchpadThreeFingerClick, + {chromeos::switches::kEnableTouchpadThreeFingerClick, prefs::kEnableTouchpadThreeFingerClick, true}, ---- a/chrome/browser/prefs/chrome_pref_service_factory.cc -+++ b/chrome/browser/prefs/chrome_pref_service_factory.cc -@@ -50,10 +50,8 @@ +--- chrome/browser/prefs/chrome_pref_service_factory.cc.orig ++++ chrome/browser/prefs/chrome_pref_service_factory.cc +@@ -48,10 +48,8 @@ #include "components/prefs/pref_service.h" #include "components/prefs/pref_store.h" #include "components/prefs/pref_value_store.h" @@ -1079,7 +1087,7 @@ #include "components/sync/base/model_type.h" #include "components/sync/base/pref_names.h" #include "components/sync_preferences/pref_model_associator.h" -@@ -123,8 +121,6 @@ const prefs::TrackedPreferenceMetadata k +@@ -121,8 +119,6 @@ const prefs::TrackedPreferenceMetadata k {5, extensions::pref_names::kExtensions, EnforcementLevel::NO_ENFORCEMENT, PrefTrackingStrategy::SPLIT, ValueType::IMPERSONAL}, #endif @@ -1087,17 +1095,17 @@ - PrefTrackingStrategy::ATOMIC, ValueType::PERSONAL}, {7, prefs::kSearchProviderOverrides, EnforcementLevel::ENFORCE_ON_LOAD, PrefTrackingStrategy::ATOMIC, ValueType::IMPERSONAL}, - #if !BUILDFLAG(IS_ANDROID) -@@ -148,8 +144,6 @@ const prefs::TrackedPreferenceMetadata k + #if !defined(OS_ANDROID) +@@ -146,8 +142,6 @@ const prefs::TrackedPreferenceMetadata k PrefTrackingStrategy::ATOMIC, ValueType::IMPERSONAL}, // kSyncRemainingRollbackTries is deprecated and will be removed a few // releases after M50. - {18, prefs::kSafeBrowsingIncidentsSent, EnforcementLevel::ENFORCE_ON_LOAD, - PrefTrackingStrategy::ATOMIC, ValueType::IMPERSONAL}, - #if BUILDFLAG(IS_WIN) + #if defined(OS_WIN) {19, prefs::kSwReporterPromptVersion, EnforcementLevel::ENFORCE_ON_LOAD, PrefTrackingStrategy::ATOMIC, ValueType::IMPERSONAL}, -@@ -158,10 +152,6 @@ const prefs::TrackedPreferenceMetadata k +@@ -156,10 +150,6 @@ const prefs::TrackedPreferenceMetadata k {22, prefs::kSwReporterPromptSeed, EnforcementLevel::ENFORCE_ON_LOAD, PrefTrackingStrategy::ATOMIC, ValueType::IMPERSONAL}, #endif @@ -1105,11 +1113,11 @@ - PrefTrackingStrategy::ATOMIC, ValueType::PERSONAL}, - {24, prefs::kGoogleServicesLastAccountId, EnforcementLevel::ENFORCE_ON_LOAD, - PrefTrackingStrategy::ATOMIC, ValueType::PERSONAL}, - #if BUILDFLAG(IS_WIN) + #if defined(OS_WIN) {25, prefs::kSettingsResetPromptPromptWave, EnforcementLevel::ENFORCE_ON_LOAD, PrefTrackingStrategy::ATOMIC, ---- a/chrome/browser/prefs/pref_functional_browsertest.cc -+++ b/chrome/browser/prefs/pref_functional_browsertest.cc +--- chrome/browser/prefs/pref_functional_browsertest.cc.orig ++++ chrome/browser/prefs/pref_functional_browsertest.cc @@ -24,7 +24,6 @@ #include "components/content_settings/core/common/content_settings_types.h" #include "components/content_settings/core/common/pref_names.h" @@ -1119,8 +1127,8 @@ #include "content/public/browser/web_contents.h" #include "content/public/test/browser_test.h" @@ -220,9 +219,6 @@ IN_PROC_BROWSER_TEST_F(PrefsFunctionalTe - prefetch::SetPreloadPagesState(prefs, - prefetch::PreloadPagesState::kNoPreloading); + prefs->SetInteger(prefs::kNetworkPredictionOptions, + chrome_browser_net::NETWORK_PREDICTION_NEVER); - EXPECT_TRUE(prefs->GetBoolean(prefs::kSafeBrowsingEnabled)); - prefs->SetBoolean(prefs::kSafeBrowsingEnabled, false); @@ -1130,25 +1138,25 @@ @@ -236,7 +232,6 @@ IN_PROC_BROWSER_TEST_F(PrefsFunctionalTe - EXPECT_EQ(prefetch::PreloadPagesState::kNoPreloading, - prefetch::GetPreloadPagesState(*prefs)); + EXPECT_EQ(chrome_browser_net::NETWORK_PREDICTION_NEVER, + prefs->GetInteger(prefs::kNetworkPredictionOptions)); - EXPECT_FALSE(prefs->GetBoolean(prefs::kSafeBrowsingEnabled)); EXPECT_FALSE( prefs->GetBoolean(embedder_support::kAlternateErrorPagesEnabled)); EXPECT_FALSE(prefs->GetBoolean(prefs::kSearchSuggestEnabled)); ---- a/chrome/browser/profiles/gaia_info_update_service.cc -+++ b/chrome/browser/profiles/gaia_info_update_service.cc -@@ -20,7 +20,6 @@ +--- chrome/browser/profiles/gaia_info_update_service.cc.orig ++++ chrome/browser/profiles/gaia_info_update_service.cc +@@ -19,7 +19,6 @@ + #include "chrome/common/pref_names.h" #include "components/prefs/pref_service.h" #include "components/signin/public/base/avatar_icon_util.h" - #include "components/signin/public/base/consent_level.h" -#include "components/signin/public/base/signin_pref_names.h" #include "components/signin/public/identity_manager/account_info.h" #include "components/signin/public/identity_manager/accounts_in_cookie_jar_info.h" - #include "content/public/browser/notification_details.h" ---- a/chrome/browser/profiles/gaia_info_update_service_unittest.cc -+++ b/chrome/browser/profiles/gaia_info_update_service_unittest.cc -@@ -28,7 +28,6 @@ + #include "components/signin/public/identity_manager/consent_level.h" +--- chrome/browser/profiles/gaia_info_update_service_unittest.cc.orig ++++ chrome/browser/profiles/gaia_info_update_service_unittest.cc +@@ -27,7 +27,6 @@ #include "chrome/test/base/testing_profile_manager.h" #include "components/prefs/pref_service.h" #include "components/profile_metrics/state.h" @@ -1156,9 +1164,9 @@ #include "components/signin/public/identity_manager/account_info.h" #include "components/sync_preferences/pref_service_syncable.h" #include "content/public/test/browser_task_environment.h" ---- a/chrome/browser/profiles/profile_attributes_entry.cc -+++ b/chrome/browser/profiles/profile_attributes_entry.cc -@@ -26,7 +26,6 @@ +--- chrome/browser/profiles/profile_attributes_entry.cc.orig ++++ chrome/browser/profiles/profile_attributes_entry.cc +@@ -29,7 +29,6 @@ #include "components/prefs/pref_service.h" #include "components/prefs/scoped_user_pref_update.h" #include "components/profile_metrics/state.h" @@ -1166,7 +1174,7 @@ #include "components/signin/public/identity_manager/account_info.h" #include "third_party/abseil-cpp/absl/types/optional.h" #include "ui/base/resource/resource_bundle.h" -@@ -486,7 +485,7 @@ bool ProfileAttributesEntry::IsUsingDefa +@@ -490,7 +489,7 @@ bool ProfileAttributesEntry::IsUsingDefa } bool ProfileAttributesEntry::IsSignedInWithCredentialProvider() const { @@ -1175,7 +1183,7 @@ } size_t ProfileAttributesEntry::GetAvatarIconIndex() const { -@@ -666,9 +665,6 @@ void ProfileAttributesEntry::SetLastDown +@@ -672,9 +671,6 @@ void ProfileAttributesEntry::SetLastDown } void ProfileAttributesEntry::SetSignedInWithCredentialProvider(bool value) { @@ -1185,9 +1193,9 @@ } void ProfileAttributesEntry::LockForceSigninProfile(bool is_lock) { ---- a/chrome/browser/profiles/profile_attributes_storage.cc -+++ b/chrome/browser/profiles/profile_attributes_storage.cc -@@ -38,7 +38,6 @@ +--- chrome/browser/profiles/profile_attributes_storage.cc.orig ++++ chrome/browser/profiles/profile_attributes_storage.cc +@@ -36,7 +36,6 @@ #include "components/prefs/scoped_user_pref_update.h" #include "components/profile_metrics/state.h" #include "components/signin/public/base/persistent_repeating_timer.h" @@ -1195,7 +1203,7 @@ #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "third_party/icu/source/i18n/unicode/coll.h" -@@ -376,8 +375,6 @@ void ProfileAttributesStorage::AddProfil +@@ -374,8 +373,6 @@ void ProfileAttributesStorage::AddProfil if (params.account_id.HasAccountIdKey()) info.SetStringKey(ProfileAttributesEntry::kAccountIdKey, params.account_id.GetAccountIdKey()); @@ -1204,9 +1212,9 @@ attributes->SetKey(key, std::move(info)); ProfileAttributesEntry* entry = InitEntryWithKey(key, params.is_omitted); ---- a/chrome/browser/profiles/profile_impl.cc -+++ b/chrome/browser/profiles/profile_impl.cc -@@ -149,7 +149,6 @@ +--- chrome/browser/profiles/profile_impl.cc.orig ++++ chrome/browser/profiles/profile_impl.cc +@@ -150,7 +150,6 @@ #include "components/prefs/scoped_user_pref_update.h" #include "components/profile_metrics/browser_profile_type.h" #include "components/security_interstitials/content/stateful_ssl_host_state_delegate.h" @@ -1214,17 +1222,17 @@ #include "components/signin/public/identity_manager/identity_manager.h" #include "components/site_isolation/site_isolation_policy.h" #include "components/spellcheck/spellcheck_buildflags.h" ---- a/chrome/browser/profiles/profile_manager.cc -+++ b/chrome/browser/profiles/profile_manager.cc -@@ -91,7 +91,6 @@ - #include "components/signin/public/base/consent_level.h" +--- chrome/browser/profiles/profile_manager.cc.orig ++++ chrome/browser/profiles/profile_manager.cc +@@ -94,7 +94,6 @@ + #include "components/search_engines/default_search_manager.h" #include "components/signin/public/base/signin_buildflags.h" #include "components/signin/public/base/signin_metrics.h" -#include "components/signin/public/base/signin_pref_names.h" + #include "components/signin/public/identity_manager/consent_level.h" #include "components/signin/public/identity_manager/identity_manager.h" #include "components/signin/public/identity_manager/primary_account_mutator.h" - #include "components/sync/base/stop_source.h" -@@ -2192,8 +2191,7 @@ void ProfileManager::AddProfileToStorage +@@ -2105,8 +2104,7 @@ void ProfileManager::AddProfileToStorage entry->SetAuthInfo(account_info.gaia, username, is_consented_primary_account); @@ -1232,9 +1240,9 @@ - prefs::kSignedInWithCredentialProvider)); + entry->SetSignedInWithCredentialProvider(false); - #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) + #if !defined(OS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) // Sign out if force-sign-in policy is enabled and profile is not signed -@@ -2248,14 +2246,13 @@ void ProfileManager::AddProfileToStorage +@@ -2161,14 +2159,13 @@ void ProfileManager::AddProfileToStorage init_params.is_ephemeral = IsEphemeral(profile); init_params.is_signed_in_with_credential_provider = @@ -1250,9 +1258,9 @@ prefs->SetBoolean(bookmarks::prefs::kEditBookmarksEnabled, false); prefs->SetBoolean(bookmarks::prefs::kShowBookmarkBar, false); prefs->ClearPref(DefaultSearchManager::kDefaultSearchProviderDataPrefName); ---- a/chrome/browser/profiles/profile_window.cc -+++ b/chrome/browser/profiles/profile_window.cc -@@ -41,7 +41,6 @@ +--- chrome/browser/profiles/profile_window.cc.orig ++++ chrome/browser/profiles/profile_window.cc +@@ -40,7 +40,6 @@ #include "chrome/common/url_constants.h" #include "components/flags_ui/pref_service_flags_storage.h" #include "components/prefs/pref_service.h" @@ -1260,8 +1268,8 @@ #include "components/signin/public/identity_manager/account_info.h" #include "components/signin/public/identity_manager/identity_manager.h" #include "content/public/browser/browser_thread.h" ---- a/chrome/browser/profiles/profiles_state.cc -+++ b/chrome/browser/profiles/profiles_state.cc +--- chrome/browser/profiles/profiles_state.cc.orig ++++ chrome/browser/profiles/profiles_state.cc @@ -42,7 +42,6 @@ #include <algorithm> #include "chrome/browser/profiles/gaia_info_update_service.h" @@ -1270,24 +1278,24 @@ #endif #if BUILDFLAG(IS_CHROMEOS_LACROS) ---- a/chrome/browser/resources/settings/privacy_page/disable_safebrowsing_dialog.html -+++ b/chrome/browser/resources/settings/privacy_page/disable_safebrowsing_dialog.html +--- chrome/browser/resources/settings/privacy_page/disable_safebrowsing_dialog.html.orig ++++ chrome/browser/resources/settings/privacy_page/disable_safebrowsing_dialog.html @@ -1,12 +1,9 @@ <cr-dialog id="dialog" close-text="$i18n{close}"> - <div slot="title">$i18n{safeBrowsingDisableDialog}</div> - <div slot="body">$i18n{safeBrowsingDisableDialogDesc}</div> <div slot="button-container"> - <cr-button id="cancel" class="cancel-button" on-click="onDialogCancel_"> + <cr-button class="cancel-button" on-click="onDialogCancel_"> $i18n{cancel} </cr-button> - <cr-button id="confirm" class="action-button" on-click="onDialogConfirm_"> + <cr-button class="action-button" on-click="onDialogConfirm_"> - $i18n{safeBrowsingDisableDialogConfirm} </cr-button> </div> </cr-dialog> ---- a/chrome/browser/resources/settings/privacy_page/privacy_page.html -+++ b/chrome/browser/resources/settings/privacy_page/privacy_page.html -@@ -558,7 +558,7 @@ +--- chrome/browser/resources/settings/privacy_page/privacy_page.html.orig ++++ chrome/browser/resources/settings/privacy_page/privacy_page.html +@@ -535,7 +535,7 @@ </category-setting-exceptions> </settings-subpage> </template> @@ -1296,9 +1304,9 @@ no-search> <template is="dom-if" route-path="/content/ads" no-search> <settings-subpage page-title="$i18n{siteSettingsAds}" ---- a/chrome/browser/resources/settings/privacy_page/privacy_page.ts -+++ b/chrome/browser/resources/settings/privacy_page/privacy_page.ts -@@ -101,7 +101,7 @@ export class SettingsPrivacyPageElement +--- chrome/browser/resources/settings/privacy_page/privacy_page.ts.orig ++++ chrome/browser/resources/settings/privacy_page/privacy_page.ts +@@ -90,7 +90,7 @@ export class SettingsPrivacyPageElement enableSafeBrowsingSubresourceFilter_: { type: Boolean, value() { @@ -1307,8 +1315,8 @@ } }, ---- a/chrome/browser/resources/settings/privacy_page/security_page.html -+++ b/chrome/browser/resources/settings/privacy_page/security_page.html +--- chrome/browser/resources/settings/privacy_page/security_page.html.orig ++++ chrome/browser/resources/settings/privacy_page/security_page.html @@ -53,105 +53,6 @@ <img id="banner" alt="" src="chrome://settings/images/safe_browsing_banner.svg"> @@ -1415,7 +1423,7 @@ <div class="cr-row first"> <h2>$i18n{advancedPageTitle}</h2> </div> -@@ -213,8 +114,3 @@ +@@ -202,8 +103,3 @@ on-click="onAdvancedProtectionProgramLinkClick_" external> </cr-link-row> @@ -1424,9 +1432,9 @@ - on-close="onDisableSafebrowsingDialogClose_"> - </settings-disable-safebrowsing-dialog> - </template> ---- a/chrome/browser/resources/settings/privacy_page/security_page.ts -+++ b/chrome/browser/resources/settings/privacy_page/security_page.ts -@@ -196,15 +196,6 @@ export class SettingsSecurityPageElement +--- chrome/browser/resources/settings/privacy_page/security_page.ts.orig ++++ chrome/browser/resources/settings/privacy_page/security_page.ts +@@ -182,15 +182,6 @@ export class SettingsSecurityPageElement ready() { super.ready(); @@ -1442,7 +1450,7 @@ } /** -@@ -253,8 +244,7 @@ export class SettingsSecurityPageElement +@@ -239,8 +230,7 @@ export class SettingsSecurityPageElement } private getDisabledExtendedSafeBrowsing_(): boolean { @@ -1452,9 +1460,9 @@ } private getPasswordsLeakToggleSubLabel_(): string { ---- a/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts -+++ b/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts -@@ -48,7 +48,7 @@ function getCategoryItemMap(): Map<Conte +--- chrome/browser/resources/settings/site_settings_page/site_settings_page.ts.orig ++++ chrome/browser/resources/settings/site_settings_page/site_settings_page.ts +@@ -47,7 +47,7 @@ function getCategoryItemMap(): Map<Conte enabledLabel: 'siteSettingsAdsAllowed', disabledLabel: 'siteSettingsAdsBlocked', shouldShow: () => @@ -1463,8 +1471,8 @@ }, { route: routes.SITE_SETTINGS_AR, ---- a/chrome/browser/safe_browsing/ad_redirect_trigger_browsertest.cc -+++ b/chrome/browser/safe_browsing/ad_redirect_trigger_browsertest.cc +--- chrome/browser/safe_browsing/ad_redirect_trigger_browsertest.cc.orig ++++ chrome/browser/safe_browsing/ad_redirect_trigger_browsertest.cc @@ -19,7 +19,6 @@ #include "components/prefs/testing_pref_service.h" #include "components/safe_browsing/content/browser/triggers/ad_redirect_trigger.h" @@ -1473,16 +1481,16 @@ #include "content/public/browser/render_frame_host.h" #include "content/public/browser/web_contents.h" #include "content/public/test/browser_test.h" ---- a/chrome/browser/safe_browsing/advanced_protection_status_manager.cc -+++ b/chrome/browser/safe_browsing/advanced_protection_status_manager.cc +--- chrome/browser/safe_browsing/advanced_protection_status_manager.cc.orig ++++ chrome/browser/safe_browsing/advanced_protection_status_manager.cc @@ -13,7 +13,6 @@ #include "chrome/browser/signin/identity_manager_factory.h" #include "components/prefs/pref_service.h" #include "components/safe_browsing/core/common/features.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" - #include "components/signin/public/base/consent_level.h" #include "components/signin/public/identity_manager/account_info.h" #include "components/signin/public/identity_manager/accounts_mutator.h" + #include "components/signin/public/identity_manager/consent_level.h" @@ -63,9 +62,7 @@ void AdvancedProtectionStatusManager::Ma is_under_advanced_protection_ = core_info.is_under_advanced_protection; @@ -1516,8 +1524,8 @@ } bool AdvancedProtectionStatusManager::IsUnconsentedPrimaryAccount( ---- a/chrome/browser/safe_browsing/advanced_protection_status_manager_unittest.cc -+++ b/chrome/browser/safe_browsing/advanced_protection_status_manager_unittest.cc +--- chrome/browser/safe_browsing/advanced_protection_status_manager_unittest.cc.orig ++++ chrome/browser/safe_browsing/advanced_protection_status_manager_unittest.cc @@ -10,7 +10,6 @@ #include "base/test/task_environment.h" #include "build/chromeos_buildflags.h" @@ -1526,18 +1534,18 @@ #include "components/signin/public/identity_manager/account_info.h" #include "components/signin/public/identity_manager/accounts_mutator.h" #include "components/signin/public/identity_manager/identity_test_environment.h" ---- a/chrome/browser/safe_browsing/android/services_delegate_android.h -+++ b/chrome/browser/safe_browsing/android/services_delegate_android.h -@@ -6,7 +6,6 @@ - #define CHROME_BROWSER_SAFE_BROWSING_ANDROID_SERVICES_DELEGATE_ANDROID_H_ +--- chrome/browser/safe_browsing/android/services_delegate_android.h.orig ++++ chrome/browser/safe_browsing/android/services_delegate_android.h +@@ -7,7 +7,6 @@ + #include "base/macros.h" #include "chrome/browser/safe_browsing/services_delegate.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" namespace safe_browsing { ---- a/chrome/browser/safe_browsing/certificate_reporting_service.cc -+++ b/chrome/browser/safe_browsing/certificate_reporting_service.cc +--- chrome/browser/safe_browsing/certificate_reporting_service.cc.orig ++++ chrome/browser/safe_browsing/certificate_reporting_service.cc @@ -14,7 +14,6 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/safe_browsing/safe_browsing_service.h" @@ -1546,9 +1554,9 @@ #include "components/security_interstitials/content/certificate_error_report.h" #include "content/public/browser/browser_thread.h" #include "services/network/public/cpp/shared_url_loader_factory.h" ---- a/chrome/browser/safe_browsing/certificate_reporting_service_browsertest.cc -+++ b/chrome/browser/safe_browsing/certificate_reporting_service_browsertest.cc -@@ -26,7 +26,6 @@ +--- chrome/browser/safe_browsing/certificate_reporting_service_browsertest.cc.orig ++++ chrome/browser/safe_browsing/certificate_reporting_service_browsertest.cc +@@ -27,7 +27,6 @@ #include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/ui_test_utils.h" #include "components/prefs/pref_service.h" @@ -1556,8 +1564,8 @@ #include "components/security_interstitials/content/cert_report_helper.h" #include "components/security_interstitials/content/certificate_error_report.h" #include "components/variations/variations_params_manager.h" ---- a/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_impl_win.cc -+++ b/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_impl_win.cc +--- chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_impl_win.cc.orig ++++ chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_impl_win.cc @@ -43,7 +43,6 @@ #include "components/component_updater/component_updater_service.h" #include "components/component_updater/pref_names.h" @@ -1566,9 +1574,9 @@ #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "net/http/http_status_code.h" ---- a/chrome/browser/safe_browsing/chrome_cleaner/reporter_runner_browsertest_win.cc -+++ b/chrome/browser/safe_browsing/chrome_cleaner/reporter_runner_browsertest_win.cc -@@ -43,7 +43,6 @@ +--- chrome/browser/safe_browsing/chrome_cleaner/reporter_runner_browsertest_win.cc.orig ++++ chrome/browser/safe_browsing/chrome_cleaner/reporter_runner_browsertest_win.cc +@@ -44,7 +44,6 @@ #include "components/policy/core/common/mock_configuration_policy_provider.h" #include "components/policy/policy_constants.h" #include "components/prefs/pref_service.h" @@ -1576,8 +1584,8 @@ #include "content/public/test/browser_test.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" ---- a/chrome/browser/safe_browsing/chrome_cleaner/srt_client_info_win.cc -+++ b/chrome/browser/safe_browsing/chrome_cleaner/srt_client_info_win.cc +--- chrome/browser/safe_browsing/chrome_cleaner/srt_client_info_win.cc.orig ++++ chrome/browser/safe_browsing/chrome_cleaner/srt_client_info_win.cc @@ -12,7 +12,6 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile_manager.h" @@ -1586,9 +1594,9 @@ #include "components/version_info/version_info.h" namespace safe_browsing { ---- a/chrome/browser/safe_browsing/chrome_password_protection_service.cc -+++ b/chrome/browser/safe_browsing/chrome_password_protection_service.cc -@@ -64,7 +64,6 @@ +--- chrome/browser/safe_browsing/chrome_password_protection_service.cc.orig ++++ chrome/browser/safe_browsing/chrome_password_protection_service.cc +@@ -63,7 +63,6 @@ #include "components/safe_browsing/core/browser/verdict_cache_manager.h" #include "components/safe_browsing/core/common/features.h" #include "components/safe_browsing/core/common/proto/csd.pb.h" @@ -1596,7 +1604,7 @@ #include "components/safe_browsing/core/common/safebrowsing_constants.h" #include "components/safe_browsing/core/common/utils.h" #include "components/security_interstitials/content/unsafe_resource_util.h" -@@ -1221,14 +1220,6 @@ bool ChromePasswordProtectionService::Ha +@@ -1220,14 +1219,6 @@ bool ChromePasswordProtectionService::Ha } void ChromePasswordProtectionService::OnWarningTriggerChanged() { @@ -1611,7 +1619,7 @@ // Clears captured enterprise password hashes or GSuite sync password hashes. password_manager::PasswordReuseManager* reuse_manager = GetPasswordReuseManager(); -@@ -1386,7 +1377,7 @@ PrefService* ChromePasswordProtectionSer +@@ -1385,7 +1376,7 @@ PrefService* ChromePasswordProtectionSer } bool ChromePasswordProtectionService::IsSafeBrowsingEnabled() { @@ -1620,7 +1628,7 @@ } bool ChromePasswordProtectionService::IsExtendedReporting() { -@@ -1406,44 +1397,7 @@ bool ChromePasswordProtectionService::Is +@@ -1405,44 +1396,7 @@ bool ChromePasswordProtectionService::Is bool ChromePasswordProtectionService::IsPingingEnabled( LoginReputationClientRequest::TriggerType trigger_type, ReusedPasswordAccountType password_type) { @@ -1648,7 +1656,7 @@ -// Only saved password and GAIA password reuse warnings are shown to users on -// Android, so other types of password reuse events should be gated by Safe -// Browsing extended reporting. --#if BUILDFLAG(IS_ANDROID) +-#if defined(OS_ANDROID) - if (password_type.account_type() == - ReusedPasswordAccountType::SAVED_PASSWORD || - IsSyncingGMAILPasswordWithSignedInProtectionEnabled(password_type)) { @@ -1666,8 +1674,8 @@ } RequestOutcome ChromePasswordProtectionService::GetPingNotSentReason( -@@ -1669,22 +1623,6 @@ MaybeCreateCommitDeferringCondition( - : nullptr; +@@ -1661,22 +1615,6 @@ MaybeCreateNavigationThrottle(content::N + : nullptr; } -PasswordProtectionTrigger @@ -1689,9 +1697,9 @@ bool ChromePasswordProtectionService::IsURLAllowlistedForPasswordEntry( const GURL& url) const { if (!profile_) ---- a/chrome/browser/safe_browsing/chrome_password_protection_service.h -+++ b/chrome/browser/safe_browsing/chrome_password_protection_service.h -@@ -214,13 +214,6 @@ class ChromePasswordProtectionService : +--- chrome/browser/safe_browsing/chrome_password_protection_service.h.orig ++++ chrome/browser/safe_browsing/chrome_password_protection_service.h +@@ -211,13 +211,6 @@ class ChromePasswordProtectionService : bool UserClickedThroughSBInterstitial( PasswordProtectionRequest* request) override; @@ -1705,9 +1713,9 @@ // If |url| matches Safe Browsing allowlist domains, password protection // change password URL, or password protection login URLs in the enterprise // policy. ---- a/chrome/browser/safe_browsing/chrome_password_protection_service_browsertest.cc -+++ b/chrome/browser/safe_browsing/chrome_password_protection_service_browsertest.cc -@@ -39,7 +39,6 @@ +--- chrome/browser/safe_browsing/chrome_password_protection_service_browsertest.cc.orig ++++ chrome/browser/safe_browsing/chrome_password_protection_service_browsertest.cc +@@ -38,7 +38,6 @@ #include "components/safe_browsing/content/browser/password_protection/password_protection_test_util.h" #include "components/safe_browsing/core/browser/password_protection/metrics_util.h" #include "components/safe_browsing/core/common/features.h" @@ -1715,9 +1723,9 @@ #include "components/security_state/core/security_state.h" #include "components/signin/public/identity_manager/account_info.h" #include "components/signin/public/identity_manager/identity_test_environment.h" ---- a/chrome/browser/safe_browsing/chrome_password_protection_service_sync_browsertest.cc -+++ b/chrome/browser/safe_browsing/chrome_password_protection_service_sync_browsertest.cc -@@ -29,9 +29,7 @@ +--- chrome/browser/safe_browsing/chrome_password_protection_service_sync_browsertest.cc.orig ++++ chrome/browser/safe_browsing/chrome_password_protection_service_sync_browsertest.cc +@@ -28,9 +28,7 @@ #include "components/prefs/pref_service.h" #include "components/prefs/scoped_user_pref_update.h" #include "components/safe_browsing/content/browser/password_protection/password_protection_request_content.h" @@ -1727,8 +1735,8 @@ #include "components/signin/public/identity_manager/identity_manager.h" #include "components/signin/public/identity_manager/identity_test_utils.h" #include "components/sync/driver/sync_service.h" ---- a/chrome/browser/safe_browsing/cloud_content_scanning/binary_upload_service.cc -+++ b/chrome/browser/safe_browsing/cloud_content_scanning/binary_upload_service.cc +--- chrome/browser/safe_browsing/cloud_content_scanning/binary_upload_service.cc.orig ++++ chrome/browser/safe_browsing/cloud_content_scanning/binary_upload_service.cc @@ -34,7 +34,6 @@ #include "components/prefs/pref_service.h" #include "components/safe_browsing/content/browser/web_ui/safe_browsing_ui.h" @@ -1737,9 +1745,9 @@ #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" ---- a/chrome/browser/safe_browsing/download_protection/check_client_download_request.cc -+++ b/chrome/browser/safe_browsing/download_protection/check_client_download_request.cc -@@ -37,7 +37,6 @@ +--- chrome/browser/safe_browsing/download_protection/check_client_download_request.cc.orig ++++ chrome/browser/safe_browsing/download_protection/check_client_download_request.cc +@@ -38,7 +38,6 @@ #include "components/safe_browsing/content/common/file_type_policies.h" #include "components/safe_browsing/core/common/features.h" #include "components/safe_browsing/core/common/proto/csd.pb.h" @@ -1747,8 +1755,8 @@ #include "components/safe_browsing/core/common/utils.h" #include "components/url_matcher/url_matcher.h" #include "content/public/browser/browser_context.h" ---- a/chrome/browser/safe_browsing/download_protection/check_client_download_request_base.cc -+++ b/chrome/browser/safe_browsing/download_protection/check_client_download_request_base.cc +--- chrome/browser/safe_browsing/download_protection/check_client_download_request_base.cc.orig ++++ chrome/browser/safe_browsing/download_protection/check_client_download_request_base.cc @@ -24,7 +24,6 @@ #include "components/safe_browsing/content/browser/web_ui/safe_browsing_ui.h" #include "components/safe_browsing/content/common/file_type_policies.h" @@ -1757,9 +1765,9 @@ #include "components/safe_browsing/core/common/utils.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/browser_task_traits.h" ---- a/chrome/browser/safe_browsing/download_protection/download_protection_service_unittest.cc -+++ b/chrome/browser/safe_browsing/download_protection/download_protection_service_unittest.cc -@@ -95,7 +95,6 @@ +--- chrome/browser/safe_browsing/download_protection/download_protection_service_unittest.cc.orig ++++ chrome/browser/safe_browsing/download_protection/download_protection_service_unittest.cc +@@ -93,7 +93,6 @@ #include "components/safe_browsing/core/browser/db/v4_protocol_manager_util.h" #include "components/safe_browsing/core/common/features.h" #include "components/safe_browsing/core/common/proto/csd.pb.h" @@ -1767,8 +1775,8 @@ #include "components/safe_browsing/core/common/safebrowsing_switches.h" #include "components/signin/public/identity_manager/identity_test_environment.h" #include "content/public/browser/browser_task_traits.h" ---- a/chrome/browser/safe_browsing/generated_safe_browsing_pref.cc -+++ b/chrome/browser/safe_browsing/generated_safe_browsing_pref.cc +--- chrome/browser/safe_browsing/generated_safe_browsing_pref.cc.orig ++++ chrome/browser/safe_browsing/generated_safe_browsing_pref.cc @@ -7,7 +7,6 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/common/extensions/api/settings_private.h" @@ -1799,7 +1807,7 @@ } extensions::settings_private::SetPrefResult GeneratedSafeBrowsingPref::SetPref( -@@ -48,37 +32,14 @@ extensions::settings_private::SetPrefRes +@@ -48,31 +32,14 @@ extensions::settings_private::SetPrefRes return extensions::settings_private::SetPrefResult::PREF_TYPE_MISMATCH; // If SBER is forcefully disabled, Enhanced cannot be selected by the user. @@ -1830,16 +1838,10 @@ - profile_->GetPrefs()->SetBoolean(prefs::kSafeBrowsingEnhanced, - selection == SafeBrowsingSetting::ENHANCED); - -- // Set ESB not set in sync with Account ESB through TailoredSecurity. -- if (selection == SafeBrowsingSetting::ENHANCED) { -- profile_->GetPrefs()->SetBoolean( -- prefs::kEnhancedProtectionEnabledViaTailoredSecurity, false); -- } -- return extensions::settings_private::SetPrefResult::SUCCESS; } -@@ -89,10 +50,8 @@ GeneratedSafeBrowsingPref::GetPrefObject +@@ -83,10 +50,8 @@ GeneratedSafeBrowsingPref::GetPrefObject pref_object->key = kGeneratedSafeBrowsingPref; pref_object->type = extensions::api::settings_private::PREF_TYPE_NUMBER; @@ -1852,7 +1854,7 @@ if (safe_browsing_enhanced_enabled && safe_browsing_enabled) { pref_object->value = std::make_unique<base::Value>( -@@ -122,29 +81,18 @@ void GeneratedSafeBrowsingPref::ApplySaf +@@ -116,29 +81,18 @@ void GeneratedSafeBrowsingPref::ApplySaf // three different preferences. It is possible that these may be in // temporarily conflicting managed states. The enabled preference is always // taken as the canonical source of management. @@ -1888,7 +1890,7 @@ if (!enabled_enforced && !enabled_recommended && !reporting_enforced) { // No relevant policies are applied. -@@ -154,8 +102,6 @@ void GeneratedSafeBrowsingPref::ApplySaf +@@ -148,8 +102,6 @@ void GeneratedSafeBrowsingPref::ApplySaf if (enabled_enforced) { // Preference is fully controlled. pref_object->enforcement = settings_api::Enforcement::ENFORCEMENT_ENFORCED; @@ -1897,7 +1899,7 @@ return; } -@@ -180,8 +126,6 @@ void GeneratedSafeBrowsingPref::ApplySaf +@@ -174,8 +126,6 @@ void GeneratedSafeBrowsingPref::ApplySaf // Reporting has been forcefully disabled by policy. Enhanced protection is // thus also implicitly disabled by the same policy. pref_object->enforcement = settings_api::Enforcement::ENFORCEMENT_ENFORCED; @@ -1906,9 +1908,9 @@ pref_object->user_selectable_values = std::make_unique<std::vector<std::unique_ptr<base::Value>>>(); ---- a/chrome/browser/safe_browsing/incident_reporting/extension_data_collection_unittest.cc -+++ b/chrome/browser/safe_browsing/incident_reporting/extension_data_collection_unittest.cc -@@ -23,7 +23,6 @@ +--- chrome/browser/safe_browsing/incident_reporting/extension_data_collection_unittest.cc.orig ++++ chrome/browser/safe_browsing/incident_reporting/extension_data_collection_unittest.cc +@@ -22,7 +22,6 @@ #include "chrome/test/base/testing_profile.h" #include "chrome/test/base/testing_profile_manager.h" #include "components/safe_browsing/core/common/proto/csd.pb.h" @@ -1916,8 +1918,8 @@ #include "components/sync_preferences/testing_pref_service_syncable.h" #include "content/public/test/browser_task_environment.h" #include "content/public/test/test_utils.h" ---- a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc -+++ b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc +--- chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc.orig ++++ chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc @@ -42,7 +42,6 @@ #include "components/prefs/pref_service.h" #include "components/safe_browsing/core/common/features.h" @@ -1926,8 +1928,8 @@ #include "content/public/browser/browser_thread.h" #include "content/public/browser/download_item_utils.h" #include "services/network/public/cpp/shared_url_loader_factory.h" ---- a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service_unittest.cc -+++ b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service_unittest.cc +--- chrome/browser/safe_browsing/incident_reporting/incident_reporting_service_unittest.cc.orig ++++ chrome/browser/safe_browsing/incident_reporting/incident_reporting_service_unittest.cc @@ -36,7 +36,6 @@ #include "chrome/test/base/testing_profile.h" #include "chrome/test/base/testing_profile_manager.h" @@ -1936,8 +1938,8 @@ #include "components/sync_preferences/testing_pref_service_syncable.h" #include "content/public/test/browser_task_environment.h" #include "extensions/browser/quota_service.h" ---- a/chrome/browser/safe_browsing/incident_reporting/last_download_finder_unittest.cc -+++ b/chrome/browser/safe_browsing/incident_reporting/last_download_finder_unittest.cc +--- chrome/browser/safe_browsing/incident_reporting/last_download_finder_unittest.cc.orig ++++ chrome/browser/safe_browsing/incident_reporting/last_download_finder_unittest.cc @@ -43,7 +43,6 @@ #include "components/history/core/browser/history_database_params.h" #include "components/history/core/browser/history_service.h" @@ -1946,8 +1948,8 @@ #include "components/sync_preferences/testing_pref_service_syncable.h" #include "content/public/test/browser_task_environment.h" #include "content/public/test/test_utils.h" ---- a/chrome/browser/safe_browsing/incident_reporting/state_store.cc -+++ b/chrome/browser/safe_browsing/incident_reporting/state_store.cc +--- chrome/browser/safe_browsing/incident_reporting/state_store.cc.orig ++++ chrome/browser/safe_browsing/incident_reporting/state_store.cc @@ -14,7 +14,6 @@ #include "chrome/browser/safe_browsing/incident_reporting/incident.h" #include "chrome/browser/safe_browsing/incident_reporting/platform_state_store.h" @@ -1956,8 +1958,8 @@ namespace safe_browsing { ---- a/chrome/browser/safe_browsing/incident_reporting/state_store_unittest.cc -+++ b/chrome/browser/safe_browsing/incident_reporting/state_store_unittest.cc +--- chrome/browser/safe_browsing/incident_reporting/state_store_unittest.cc.orig ++++ chrome/browser/safe_browsing/incident_reporting/state_store_unittest.cc @@ -21,7 +21,6 @@ #include "chrome/test/base/testing_profile.h" #include "chrome/test/base/testing_profile_manager.h" @@ -1966,8 +1968,8 @@ #include "components/sync_preferences/pref_service_syncable.h" #include "components/sync_preferences/pref_service_syncable_factory.h" #include "content/public/test/browser_task_environment.h" ---- a/chrome/browser/safe_browsing/metrics/safe_browsing_metrics_provider.cc -+++ b/chrome/browser/safe_browsing/metrics/safe_browsing_metrics_provider.cc +--- chrome/browser/safe_browsing/metrics/safe_browsing_metrics_provider.cc.orig ++++ chrome/browser/safe_browsing/metrics/safe_browsing_metrics_provider.cc @@ -7,7 +7,6 @@ #include "base/metrics/histogram_functions.h" #include "chrome/browser/profiles/profile.h" @@ -1976,9 +1978,9 @@ namespace safe_browsing { ---- a/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc -+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc -@@ -79,7 +79,6 @@ +--- chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc.orig ++++ chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc +@@ -74,7 +74,6 @@ #include "components/safe_browsing/core/browser/safe_browsing_metrics_collector.h" #include "components/safe_browsing/core/browser/verdict_cache_manager.h" #include "components/safe_browsing/core/common/features.h" @@ -1986,9 +1988,9 @@ #include "components/safe_browsing/core/common/web_ui_constants.h" #include "components/security_interstitials/content/security_interstitial_controller_client.h" #include "components/security_interstitials/content/security_interstitial_tab_helper.h" ---- a/chrome/browser/safe_browsing/safe_browsing_service.cc -+++ b/chrome/browser/safe_browsing/safe_browsing_service.cc -@@ -121,7 +121,6 @@ base::FilePath SafeBrowsingService::GetB +--- chrome/browser/safe_browsing/safe_browsing_service.cc.orig ++++ chrome/browser/safe_browsing/safe_browsing_service.cc +@@ -103,7 +103,6 @@ base::FilePath SafeBrowsingService::GetB SafeBrowsingService::SafeBrowsingService() : services_delegate_(ServicesDelegate::Create(this)), @@ -1996,7 +1998,7 @@ shutdown_(false), enabled_(false), enabled_by_prefs_(false) {} -@@ -249,8 +248,6 @@ TriggerManager* SafeBrowsingService::tri +@@ -257,8 +256,6 @@ TriggerManager* SafeBrowsingService::tri PasswordProtectionService* SafeBrowsingService::GetPasswordProtectionService( Profile* profile) const { @@ -2005,7 +2007,7 @@ return nullptr; } -@@ -342,9 +339,6 @@ void SafeBrowsingService::OnProfileAdded +@@ -387,9 +384,6 @@ void SafeBrowsingService::OnProfileAdded std::unique_ptr<PrefChangeRegistrar> registrar = std::make_unique<PrefChangeRegistrar>(); registrar->Init(pref_service); @@ -2015,7 +2017,7 @@ // ClientSideDetectionService will need to be refresh the models // renderers have if extended-reporting changes. registrar->Add(prefs::kSafeBrowsingScoutReportingEnabled, -@@ -373,14 +367,6 @@ void SafeBrowsingService::OnProfileAdded +@@ -418,14 +412,6 @@ void SafeBrowsingService::OnProfileAdded NoCachedPopulationReason::kChangeMbbPref)); user_population_prefs_[pref_service] = std::move(registrar); @@ -2030,7 +2032,7 @@ // Extended Reporting metrics are handled together elsewhere. RecordExtendedReportingMetrics(*pref_service); -@@ -423,18 +409,6 @@ void SafeBrowsingService::RefreshState() +@@ -465,18 +451,6 @@ void SafeBrowsingService::RefreshState() // Check if any profile requires the service to be active. enabled_by_prefs_ = false; @@ -2049,9 +2051,9 @@ if (enabled_by_prefs_) Start(); ---- a/chrome/browser/safe_browsing/safe_browsing_service.h -+++ b/chrome/browser/safe_browsing/safe_browsing_service.h -@@ -27,7 +27,6 @@ +--- chrome/browser/safe_browsing/safe_browsing_service.h.orig ++++ chrome/browser/safe_browsing/safe_browsing_service.h +@@ -28,7 +28,6 @@ #include "components/safe_browsing/buildflags.h" #include "components/safe_browsing/content/browser/safe_browsing_service_interface.h" #include "components/safe_browsing/core/browser/db/util.h" @@ -2059,7 +2061,7 @@ #include "content/public/browser/browser_context.h" #include "content/public/browser/browser_thread.h" #include "services/network/public/mojom/network_context.mojom-forward.h" -@@ -94,15 +93,6 @@ class SafeBrowsingService : public SafeB +@@ -97,15 +96,6 @@ class SafeBrowsingService : public SafeB // Called on the main thread to let us know that the io_thread is going away. void ShutDown(); @@ -2075,9 +2077,9 @@ // Get current enabled status. Must be called on IO thread. bool enabled() const { DCHECK_CURRENTLY_ON(content::BrowserThread::IO); -@@ -267,10 +257,6 @@ class SafeBrowsingService : public SafeB - - std::unique_ptr<ProxyConfigMonitor> proxy_config_monitor_; +@@ -287,10 +277,6 @@ class SafeBrowsingService : public SafeB + // Provides phishing and malware statistics. Accessed on UI thread. + std::unique_ptr<PingManager> ping_manager_; - // Whether SafeBrowsing Extended Reporting is enabled by the current set of - // profiles. Updated on the UI thread. @@ -2086,9 +2088,9 @@ // Whether the service has been shutdown. bool shutdown_; ---- a/chrome/browser/safe_browsing/telemetry/android/android_telemetry_service.cc -+++ b/chrome/browser/safe_browsing/telemetry/android/android_telemetry_service.cc -@@ -28,7 +28,6 @@ +--- chrome/browser/safe_browsing/telemetry/android/android_telemetry_service.cc.orig ++++ chrome/browser/safe_browsing/telemetry/android/android_telemetry_service.cc +@@ -27,7 +27,6 @@ #include "components/safe_browsing/core/browser/db/database_manager.h" #include "components/safe_browsing/core/browser/ping_manager.h" #include "components/safe_browsing/core/common/features.h" @@ -2096,7 +2098,7 @@ #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/download_item_utils.h" -@@ -140,11 +139,9 @@ bool AndroidTelemetryService::CanSendPin +@@ -142,11 +141,9 @@ bool AndroidTelemetryService::CanSendPin return false; } @@ -2111,9 +2113,9 @@ if (profile_->IsOffTheRecord()) { RecordApkDownloadTelemetryOutcome( ---- a/chrome/browser/safe_browsing/telemetry/android/android_telemetry_service_unittest.cc -+++ b/chrome/browser/safe_browsing/telemetry/android/android_telemetry_service_unittest.cc -@@ -20,7 +20,6 @@ +--- chrome/browser/safe_browsing/telemetry/android/android_telemetry_service_unittest.cc.orig ++++ chrome/browser/safe_browsing/telemetry/android/android_telemetry_service_unittest.cc +@@ -18,7 +18,6 @@ #include "components/download/public/common/mock_download_item.h" #include "components/prefs/pref_service.h" #include "components/safe_browsing/core/common/features.h" @@ -2121,8 +2123,8 @@ #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/download_item_utils.h" ---- a/chrome/browser/safe_browsing/url_checker_delegate_impl.cc -+++ b/chrome/browser/safe_browsing/url_checker_delegate_impl.cc +--- chrome/browser/safe_browsing/url_checker_delegate_impl.cc.orig ++++ chrome/browser/safe_browsing/url_checker_delegate_impl.cc @@ -21,7 +21,6 @@ #include "components/safe_browsing/core/browser/db/database_manager.h" #include "components/safe_browsing/core/browser/db/v4_protocol_manager_util.h" @@ -2131,9 +2133,9 @@ #include "components/security_interstitials/content/unsafe_resource_util.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" ---- a/chrome/browser/signin/account_consistency_mode_manager.cc -+++ b/chrome/browser/signin/account_consistency_mode_manager.cc -@@ -20,7 +20,6 @@ +--- chrome/browser/signin/account_consistency_mode_manager.cc.orig ++++ chrome/browser/signin/account_consistency_mode_manager.cc +@@ -19,7 +19,6 @@ #include "components/pref_registry/pref_registry_syncable.h" #include "components/prefs/pref_service.h" #include "components/signin/public/base/signin_buildflags.h" @@ -2141,7 +2143,7 @@ #include "google_apis/google_api_keys.h" #if BUILDFLAG(IS_CHROMEOS_ASH) -@@ -97,7 +96,6 @@ AccountConsistencyModeManager::AccountCo +@@ -98,7 +97,6 @@ AccountConsistencyModeManager::AccountCo // pref. bool signin_allowed = IsDiceSignInAllowed() && prefs->GetBoolean(prefs::kSigninAllowedOnNextStartup); @@ -2149,8 +2151,8 @@ UMA_HISTOGRAM_BOOLEAN("Signin.SigninAllowed", signin_allowed); #endif -@@ -192,16 +190,7 @@ AccountConsistencyModeManager::ComputeAc - return AccountConsistencyMethod::kMirror; +@@ -196,16 +194,7 @@ AccountConsistencyModeManager::ComputeAc + // AccountManager is not available, when DICE has been disabled on Lacros. #endif -#if BUILDFLAG(ENABLE_DICE_SUPPORT) @@ -2166,9 +2168,9 @@ - NOTREACHED(); return AccountConsistencyMethod::kDisabled; } ---- a/chrome/browser/signin/account_consistency_mode_manager_unittest.cc -+++ b/chrome/browser/signin/account_consistency_mode_manager_unittest.cc -@@ -19,7 +19,6 @@ +--- chrome/browser/signin/account_consistency_mode_manager_unittest.cc.orig ++++ chrome/browser/signin/account_consistency_mode_manager_unittest.cc +@@ -20,7 +20,6 @@ #include "components/prefs/testing_pref_store.h" #include "components/signin/public/base/account_consistency_method.h" #include "components/signin/public/base/signin_buildflags.h" @@ -2176,8 +2178,8 @@ #include "components/sync_preferences/testing_pref_service_syncable.h" #include "content/public/test/browser_task_environment.h" #include "testing/gtest/include/gtest/gtest.h" ---- a/chrome/browser/signin/chrome_device_id_helper.cc -+++ b/chrome/browser/signin/chrome_device_id_helper.cc +--- chrome/browser/signin/chrome_device_id_helper.cc.orig ++++ chrome/browser/signin/chrome_device_id_helper.cc @@ -16,7 +16,6 @@ #include "base/logging.h" #include "chrome/browser/ash/profiles/profile_helper.h" @@ -2212,8 +2214,8 @@ } #endif ---- a/chrome/browser/signin/chrome_signin_client.cc -+++ b/chrome/browser/signin/chrome_signin_client.cc +--- chrome/browser/signin/chrome_signin_client.cc.orig ++++ chrome/browser/signin/chrome_signin_client.cc @@ -38,7 +38,6 @@ #include "components/prefs/pref_service.h" #include "components/signin/core/browser/cookie_settings_util.h" @@ -2222,8 +2224,8 @@ #include "components/signin/public/identity_manager/access_token_info.h" #include "components/signin/public/identity_manager/identity_manager.h" #include "components/signin/public/identity_manager/scope_set.h" ---- a/chrome/browser/signin/chromeos_mirror_account_consistency_browsertest.cc -+++ b/chrome/browser/signin/chromeos_mirror_account_consistency_browsertest.cc +--- chrome/browser/signin/chromeos_mirror_account_consistency_browsertest.cc.orig ++++ chrome/browser/signin/chromeos_mirror_account_consistency_browsertest.cc @@ -21,7 +21,6 @@ #include "components/network_session_configurator/common/network_switches.h" #include "components/prefs/pref_service.h" @@ -2232,8 +2234,8 @@ #include "components/signin/public/identity_manager/identity_test_utils.h" #include "components/user_manager/user.h" #include "components/user_manager/user_manager.h" ---- a/chrome/browser/signin/dice_browsertest.cc -+++ b/chrome/browser/signin/dice_browsertest.cc +--- chrome/browser/signin/dice_browsertest.cc.orig ++++ chrome/browser/signin/dice_browsertest.cc @@ -59,7 +59,6 @@ #include "components/signin/public/base/account_consistency_method.h" #include "components/signin/public/base/signin_client.h" @@ -2242,8 +2244,8 @@ #include "components/signin/public/identity_manager/identity_manager.h" #include "components/signin/public/identity_manager/identity_test_utils.h" #include "components/signin/public/identity_manager/primary_account_mutator.h" ---- a/chrome/browser/signin/header_modification_delegate_impl.cc -+++ b/chrome/browser/signin/header_modification_delegate_impl.cc +--- chrome/browser/signin/header_modification_delegate_impl.cc.orig ++++ chrome/browser/signin/header_modification_delegate_impl.cc @@ -15,7 +15,6 @@ #include "chrome/browser/sync/sync_service_factory.h" #include "chrome/common/pref_names.h" @@ -2261,8 +2263,8 @@ #endif cookie_settings_.get()); } ---- a/chrome/browser/signin/mirror_browsertest.cc -+++ b/chrome/browser/signin/mirror_browsertest.cc +--- chrome/browser/signin/mirror_browsertest.cc.orig ++++ chrome/browser/signin/mirror_browsertest.cc @@ -31,7 +31,6 @@ #include "components/prefs/pref_service.h" #include "components/signin/core/browser/dice_header_helper.h" @@ -2271,17 +2273,17 @@ #include "content/public/common/content_client.h" #include "content/public/test/browser_test.h" #include "google_apis/gaia/gaia_urls.h" ---- a/chrome/browser/signin/signin_manager.cc -+++ b/chrome/browser/signin/signin_manager.cc -@@ -7,7 +7,6 @@ - #include "build/build_config.h" - #include "build/chromeos_buildflags.h" +--- chrome/browser/signin/signin_manager.cc.orig ++++ chrome/browser/signin/signin_manager.cc +@@ -5,7 +5,6 @@ + #include "chrome/browser/signin/signin_manager.h" + #include "components/prefs/pref_service.h" -#include "components/signin/public/base/signin_pref_names.h" #include "components/signin/public/identity_manager/accounts_in_cookie_jar_info.h" #include "components/signin/public/identity_manager/identity_manager.h" #include "components/signin/public/identity_manager/primary_account_mutator.h" -@@ -15,11 +14,6 @@ +@@ -13,11 +12,6 @@ SigninManager::SigninManager(PrefService* prefs, signin::IdentityManager* identity_manager) : prefs_(prefs), identity_manager_(identity_manager) { @@ -2291,9 +2293,9 @@ - base::Unretained(this))); - UpdateUnconsentedPrimaryAccount(); - identity_manager_observation_.Observe(identity_manager_); + identity_manager_->AddObserver(this); } -@@ -77,16 +71,6 @@ CoreAccountInfo SigninManager::ComputeUn +@@ -63,16 +57,6 @@ SigninManager::ComputeUnconsentedPrimary signin::ConsentLevel::kSync); } @@ -2305,13 +2307,13 @@ - // It was considered simpler to keep the logic to update the unconsented - // primary account in a single place. - if (!signin_allowed_.GetValue()) -- return CoreAccountInfo(); +- return absl::nullopt; - signin::AccountsInCookieJarInfo cookie_info = identity_manager_->GetAccountsInCookieJar(); ---- a/chrome/browser/signin/signin_promo_util.cc -+++ b/chrome/browser/signin/signin_promo_util.cc +--- chrome/browser/signin/signin_promo_util.cc.orig ++++ chrome/browser/signin/signin_promo_util.cc @@ -8,7 +8,6 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/signin/identity_manager_factory.h" @@ -2329,19 +2331,19 @@ return false; // Display the signin promo if the user is not signed in. ---- a/chrome/browser/signin/signin_ui_util.cc -+++ b/chrome/browser/signin/signin_ui_util.cc -@@ -39,7 +39,6 @@ +--- chrome/browser/signin/signin_ui_util.cc.orig ++++ chrome/browser/signin/signin_ui_util.cc +@@ -34,7 +34,6 @@ + #include "components/feature_engagement/public/tracker.h" #include "components/prefs/pref_service.h" - #include "components/signin/public/base/consent_level.h" #include "components/signin/public/base/signin_metrics.h" -#include "components/signin/public/base/signin_pref_names.h" #include "components/signin/public/identity_manager/account_info.h" #include "components/signin/public/identity_manager/accounts_in_cookie_jar_info.h" - #include "components/signin/public/identity_manager/identity_manager.h" ---- a/chrome/browser/signin/signin_util.cc -+++ b/chrome/browser/signin/signin_util.cc -@@ -31,7 +31,6 @@ + #include "components/signin/public/identity_manager/consent_level.h" +--- chrome/browser/signin/signin_util.cc.orig ++++ chrome/browser/signin/signin_util.cc +@@ -30,7 +30,6 @@ #include "components/google/core/common/google_util.h" #include "components/prefs/pref_service.h" #include "components/signin/public/base/signin_metrics.h" @@ -2349,7 +2351,7 @@ #include "components/signin/public/identity_manager/identity_manager.h" #include "components/signin/public/identity_manager/identity_utils.h" #include "components/signin/public/identity_manager/primary_account_mutator.h" -@@ -299,7 +298,7 @@ void EnsurePrimaryAccountAllowedForProfi +@@ -232,7 +231,7 @@ void EnsurePrimaryAccountAllowedForProfi CoreAccountInfo primary_account = identity_manager->GetPrimaryAccountInfo(signin::ConsentLevel::kSync); @@ -2358,8 +2360,8 @@ signin::IsUsernameAllowedByPatternFromPrefs( g_browser_process->local_state(), primary_account.email)) { return; ---- a/chrome/browser/signin/signin_util_win.cc -+++ b/chrome/browser/signin/signin_util_win.cc +--- chrome/browser/signin/signin_util_win.cc.orig ++++ chrome/browser/signin/signin_util_win.cc @@ -34,7 +34,6 @@ #include "components/prefs/pref_service.h" #include "components/signin/core/browser/about_signin_internals.h" @@ -2368,8 +2370,8 @@ #include "components/signin/public/identity_manager/accounts_mutator.h" #include "components/signin/public/identity_manager/identity_manager.h" -@@ -134,9 +133,6 @@ void ImportCredentialsFromProvider(Profi - account_id, nullptr, profile)); +@@ -136,9 +135,6 @@ void ImportCredentialsFromProvider(Profi + account_id, nullptr)); } } - @@ -2378,7 +2380,7 @@ } // Extracts the |cred_provider_gaia_id| and |cred_provider_email| for the user -@@ -311,20 +307,7 @@ bool ReauthWithCredentialProviderIfPossi +@@ -313,20 +309,7 @@ bool ReauthWithCredentialProviderIfPossi // - The profile is marked as having been signed in with a system credential. // - The profile is already signed in. // - The profile is in an auth error state. @@ -2399,9 +2401,9 @@ } } // namespace signin_util ---- a/chrome/browser/signin/signin_util_win_browsertest.cc -+++ b/chrome/browser/signin/signin_util_win_browsertest.cc -@@ -30,7 +30,6 @@ +--- chrome/browser/signin/signin_util_win_browsertest.cc.orig ++++ chrome/browser/signin/signin_util_win_browsertest.cc +@@ -31,7 +31,6 @@ #include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/testing_browser_process.h" #include "components/prefs/pref_service.h" @@ -2409,9 +2411,9 @@ #include "components/signin/public/identity_manager/identity_manager.h" #include "components/signin/public/identity_manager/identity_test_utils.h" #include "components/signin/public/identity_manager/primary_account_mutator.h" ---- a/chrome/browser/ssl/certificate_reporting_test_utils.cc -+++ b/chrome/browser/ssl/certificate_reporting_test_utils.cc -@@ -14,7 +14,6 @@ +--- chrome/browser/ssl/certificate_reporting_test_utils.cc.orig ++++ chrome/browser/ssl/certificate_reporting_test_utils.cc +@@ -15,7 +15,6 @@ #include "build/build_config.h" #include "chrome/browser/profiles/profile.h" #include "components/prefs/pref_service.h" @@ -2419,38 +2421,29 @@ #include "components/security_interstitials/content/cert_report_helper.h" #include "components/security_interstitials/content/certificate_error_report.h" #include "components/variations/variations_associated_data.h" ---- a/chrome/browser/ssl/sct_reporting_service.cc -+++ b/chrome/browser/ssl/sct_reporting_service.cc -@@ -12,7 +12,6 @@ +--- chrome/browser/ssl/sct_reporting_service.cc.orig ++++ chrome/browser/ssl/sct_reporting_service.cc +@@ -9,7 +9,6 @@ + #include "chrome/browser/net/system_network_context_manager.h" + #include "chrome/browser/safe_browsing/safe_browsing_service.h" #include "chrome/common/chrome_features.h" - #include "chrome/common/pref_names.h" - #include "components/prefs/pref_service.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "content/public/browser/network_service_instance.h" #include "content/public/browser/storage_partition.h" - #include "google_apis/google_api_keys.h" -@@ -193,18 +192,6 @@ void SetSCTAuditingEnabledForStoragePart - } // namespace - - network::mojom::SCTAuditingMode SCTReportingService::GetReportingMode() { -- if (profile_->IsOffTheRecord() || -- !base::FeatureList::IsEnabled(features::kSCTAuditing)) { -- return network::mojom::SCTAuditingMode::kDisabled; -- } -- if (safe_browsing::IsSafeBrowsingEnabled(pref_service_)) { -- if (safe_browsing::IsExtendedReportingEnabled(pref_service_)) { -- return network::mojom::SCTAuditingMode::kEnhancedSafeBrowsingReporting; -- } -- if (base::FeatureList::IsEnabled(features::kSCTAuditingHashdance)) { -- return network::mojom::SCTAuditingMode::kHashdance; -- } -- } - return network::mojom::SCTAuditingMode::kDisabled; + #include "net/traffic_annotation/network_traffic_annotation.h" +@@ -119,8 +118,5 @@ void SCTReportingService::SetReportingEn } ---- a/chrome/browser/ssl/ssl_browsertest.cc -+++ b/chrome/browser/ssl/ssl_browsertest.cc -@@ -93,7 +93,6 @@ + void SCTReportingService::OnPreferenceChanged() { +- const bool enabled = safe_browsing_service_ && +- safe_browsing_service_->enabled_by_prefs() && +- safe_browsing::IsExtendedReportingEnabled(pref_service_); +- SetReportingEnabled(enabled); ++ SetReportingEnabled(false); + } +--- chrome/browser/ssl/ssl_browsertest.cc.orig ++++ chrome/browser/ssl/ssl_browsertest.cc +@@ -94,7 +94,6 @@ #include "components/policy/policy_constants.h" #include "components/prefs/testing_pref_service.h" #include "components/safe_browsing/core/common/features.h" @@ -2458,8 +2451,8 @@ #include "components/security_interstitials/content/bad_clock_blocking_page.h" #include "components/security_interstitials/content/captive_portal_blocking_page.h" #include "components/security_interstitials/content/cert_report_helper.h" ---- a/chrome/browser/ssl/ssl_error_controller_client.cc -+++ b/chrome/browser/ssl/ssl_error_controller_client.cc +--- chrome/browser/ssl/ssl_error_controller_client.cc.orig ++++ chrome/browser/ssl/ssl_error_controller_client.cc @@ -23,7 +23,6 @@ #include "chrome/browser/ssl/stateful_ssl_host_state_delegate_factory.h" #include "chrome/common/pref_names.h" @@ -2468,8 +2461,8 @@ #include "components/security_interstitials/content/content_metrics_helper.h" #include "components/security_interstitials/content/settings_page_helper.h" #include "components/security_interstitials/content/stateful_ssl_host_state_delegate.h" ---- a/chrome/browser/supervised_user/supervised_user_pref_store.cc -+++ b/chrome/browser/supervised_user/supervised_user_pref_store.cc +--- chrome/browser/supervised_user/supervised_user_pref_store.cc.orig ++++ chrome/browser/supervised_user/supervised_user_pref_store.cc @@ -23,7 +23,6 @@ #include "chrome/common/pref_names.h" #include "components/feed/core/shared_prefs/pref_names.h" @@ -2497,8 +2490,8 @@ prefs_->SetBoolean(feed::prefs::kEnableSnippets, false); // Copy supervised user settings to prefs. ---- a/chrome/browser/ui/autofill/payments/save_card_bubble_controller_impl.cc -+++ b/chrome/browser/ui/autofill/payments/save_card_bubble_controller_impl.cc +--- chrome/browser/ui/autofill/payments/save_card_bubble_controller_impl.cc.orig ++++ chrome/browser/ui/autofill/payments/save_card_bubble_controller_impl.cc @@ -37,7 +37,6 @@ #include "components/autofill/core/common/autofill_features.h" #include "components/autofill/core/common/autofill_payments_features.h" @@ -2507,9 +2500,9 @@ #include "components/signin/public/identity_manager/identity_manager.h" #include "components/strings/grit/components_strings.h" #include "components/sync/driver/sync_service.h" ---- a/chrome/browser/ui/browser_command_controller.cc -+++ b/chrome/browser/ui/browser_command_controller.cc -@@ -56,7 +56,6 @@ +--- chrome/browser/ui/browser_command_controller.cc.orig ++++ chrome/browser/ui/browser_command_controller.cc +@@ -57,7 +57,6 @@ #include "components/prefs/pref_service.h" #include "components/sessions/core/tab_restore_service.h" #include "components/signin/public/base/signin_buildflags.h" @@ -2517,7 +2510,7 @@ #include "content/public/browser/native_web_keyboard_event.h" #include "content/public/browser/navigation_controller.h" #include "content/public/browser/navigation_entry.h" -@@ -204,10 +203,6 @@ BrowserCommandController::BrowserCommand +@@ -184,10 +183,6 @@ BrowserCommandController::BrowserCommand &BrowserCommandController::UpdateCommandsForFullscreenMode, base::Unretained(this))); #endif @@ -2528,7 +2521,7 @@ InitCommandState(); -@@ -1556,7 +1551,7 @@ void BrowserCommandController::UpdateSho +@@ -1526,7 +1521,7 @@ void BrowserCommandController::UpdateSho return; command_updater_.UpdateCommandEnabled( @@ -2536,10 +2529,10 @@ + IDC_SHOW_SIGNIN, false); } - void BrowserCommandController::UpdateReloadStopState(bool is_loading, ---- a/chrome/browser/ui/browser_command_controller.h -+++ b/chrome/browser/ui/browser_command_controller.h -@@ -212,7 +212,6 @@ class BrowserCommandController : public + // static +--- chrome/browser/ui/browser_command_controller.h.orig ++++ chrome/browser/ui/browser_command_controller.h +@@ -211,7 +211,6 @@ class BrowserCommandController : public PrefChangeRegistrar profile_pref_registrar_; PrefChangeRegistrar local_pref_registrar_; @@ -2547,9 +2540,9 @@ // In locked fullscreen mode disallow enabling/disabling commands. bool is_locked_fullscreen_ = false; ---- a/chrome/browser/ui/browser_command_controller_unittest.cc -+++ b/chrome/browser/ui/browser_command_controller_unittest.cc -@@ -28,7 +28,6 @@ +--- chrome/browser/ui/browser_command_controller_unittest.cc.orig ++++ chrome/browser/ui/browser_command_controller_unittest.cc +@@ -27,7 +27,6 @@ #include "chrome/test/base/test_browser_window.h" #include "chrome/test/base/testing_browser_process.h" #include "chrome/test/base/testing_profile_manager.h" @@ -2557,17 +2550,17 @@ #include "content/public/browser/native_web_keyboard_event.h" #include "ui/events/keycodes/dom/dom_code.h" #include "ui/events/keycodes/keyboard_codes.h" ---- a/chrome/browser/ui/chrome_pages.cc -+++ b/chrome/browser/ui/chrome_pages.cc -@@ -64,7 +64,6 @@ - #if !BUILDFLAG(IS_ANDROID) - #include "base/metrics/histogram_functions.h" +--- chrome/browser/ui/chrome_pages.cc.orig ++++ chrome/browser/ui/chrome_pages.cc +@@ -61,7 +61,6 @@ + + #if !defined(OS_ANDROID) #include "chrome/browser/signin/identity_manager_factory.h" -#include "components/signin/public/base/signin_pref_names.h" #include "components/signin/public/identity_manager/identity_manager.h" #endif -@@ -513,13 +512,7 @@ void ShowBrowserSignin(Browser* browser, +@@ -484,13 +483,7 @@ void ShowBrowserSignin(Browser* browser, void ShowBrowserSigninOrSettings(Browser* browser, signin_metrics::AccessPoint access_point) { @@ -2582,8 +2575,8 @@ } #endif ---- a/chrome/browser/ui/hats/trust_safety_sentiment_service.cc -+++ b/chrome/browser/ui/hats/trust_safety_sentiment_service.cc +--- chrome/browser/ui/hats/trust_safety_sentiment_service.cc.orig ++++ chrome/browser/ui/hats/trust_safety_sentiment_service.cc @@ -19,8 +19,6 @@ #include "components/content_settings/core/common/pref_names.h" #include "components/password_manager/core/common/password_manager_pref_names.h" @@ -2593,7 +2586,7 @@ #include "components/unified_consent/pref_names.h" namespace { -@@ -124,9 +122,6 @@ bool HasNonDefaultPrivacySetting(Profile +@@ -81,9 +79,6 @@ bool HasNonDefaultPrivacySetting(Profile auto* prefs = profile->GetPrefs(); std::vector<std::string> prefs_to_check = { @@ -2603,7 +2596,7 @@ prefs::kEnableDoNotTrack, password_manager::prefs::kPasswordLeakDetectionEnabled, prefs::kCookieControlsMode, -@@ -144,13 +139,9 @@ bool HasNonDefaultPrivacySetting(Profile +@@ -101,13 +96,9 @@ bool HasNonDefaultPrivacySetting(Profile // Users consenting to sync automatically enable UKM collection auto* ukm_pref = prefs->FindPreference( unified_consent::prefs::kUrlKeyedAnonymizedDataCollectionEnabled); @@ -2618,9 +2611,9 @@ // Check the default value for each user facing content setting. Note that // this will not include content setting exceptions set via permission ---- a/chrome/browser/ui/views/page_info/page_info_bubble_view_sync_browsertest.cc -+++ b/chrome/browser/ui/views/page_info/page_info_bubble_view_sync_browsertest.cc -@@ -19,7 +19,6 @@ +--- chrome/browser/ui/views/page_info/page_info_bubble_view_sync_browsertest.cc.orig ++++ chrome/browser/ui/views/page_info/page_info_bubble_view_sync_browsertest.cc +@@ -20,7 +20,6 @@ #include "components/password_manager/core/browser/password_manager_metrics_util.h" #include "components/safe_browsing/content/browser/password_protection/password_protection_test_util.h" #include "components/safe_browsing/core/browser/password_protection/metrics_util.h" @@ -2628,17 +2621,17 @@ #include "components/signin/public/identity_manager/account_info.h" #include "components/signin/public/identity_manager/identity_manager.h" #include "components/signin/public/identity_manager/identity_test_utils.h" ---- a/chrome/browser/ui/views/profiles/profile_menu_view.cc -+++ b/chrome/browser/ui/views/profiles/profile_menu_view.cc +--- chrome/browser/ui/views/profiles/profile_menu_view.cc.orig ++++ chrome/browser/ui/views/profiles/profile_menu_view.cc @@ -53,7 +53,6 @@ + #include "chrome/grit/generated_resources.h" #include "chrome/grit/theme_resources.h" #include "components/signin/core/browser/signin_error_controller.h" - #include "components/signin/public/base/consent_level.h" -#include "components/signin/public/base/signin_pref_names.h" + #include "components/signin/public/identity_manager/consent_level.h" #include "components/signin/public/identity_manager/primary_account_mutator.h" #include "components/strings/grit/components_strings.h" - #include "components/vector_icons/vector_icons.h" -@@ -507,7 +506,6 @@ void ProfileMenuView::BuildAutofillButto +@@ -501,7 +500,6 @@ void ProfileMenuView::BuildAutofillButto void ProfileMenuView::BuildSyncInfo() { Profile* profile = browser()->profile(); @@ -2646,18 +2639,18 @@ return; signin::IdentityManager* identity_manager = ---- a/chrome/browser/ui/views/profiles/profile_menu_view_browsertest.cc -+++ b/chrome/browser/ui/views/profiles/profile_menu_view_browsertest.cc -@@ -60,7 +60,6 @@ - #include "components/google/core/common/google_util.h" +--- chrome/browser/ui/views/profiles/profile_menu_view_browsertest.cc.orig ++++ chrome/browser/ui/views/profiles/profile_menu_view_browsertest.cc +@@ -55,7 +55,6 @@ + #include "components/feature_engagement/public/tracker.h" + #include "components/feature_engagement/test/test_tracker.h" #include "components/prefs/pref_service.h" - #include "components/signin/public/base/consent_level.h" -#include "components/signin/public/base/signin_pref_names.h" + #include "components/signin/public/identity_manager/consent_level.h" #include "components/signin/public/identity_manager/identity_test_utils.h" #include "components/sync/driver/sync_service.h" - #include "components/sync/driver/sync_user_settings.h" ---- 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 +--- chrome/browser/ui/views/safe_browsing/password_reuse_modal_warning_dialog.cc.orig ++++ chrome/browser/ui/views/safe_browsing/password_reuse_modal_warning_dialog.cc @@ -122,7 +122,6 @@ PasswordReuseModalWarningDialog::Passwor OnWarningDone done_callback) : content::WebContentsObserver(web_contents), @@ -2699,19 +2692,19 @@ LogModalWarningDialogLifetime(modal_construction_start_time_); } ---- a/chrome/browser/ui/views/safe_browsing/password_reuse_modal_warning_dialog.h -+++ b/chrome/browser/ui/views/safe_browsing/password_reuse_modal_warning_dialog.h -@@ -61,7 +61,6 @@ class PasswordReuseModalWarningDialog +--- chrome/browser/ui/views/safe_browsing/password_reuse_modal_warning_dialog.h.orig ++++ chrome/browser/ui/views/safe_browsing/password_reuse_modal_warning_dialog.h +@@ -60,7 +60,6 @@ class PasswordReuseModalWarningDialog private: OnWarningDone done_callback_; -- raw_ptr<ChromePasswordProtectionService> service_; +- ChromePasswordProtectionService* service_; const GURL url_; const ReusedPasswordAccountType password_type_; ---- a/chrome/browser/ui/views/sync/inline_login_ui_browsertest.cc -+++ b/chrome/browser/ui/views/sync/inline_login_ui_browsertest.cc -@@ -46,7 +46,6 @@ +--- chrome/browser/ui/views/sync/inline_login_ui_browsertest.cc.orig ++++ chrome/browser/ui/views/sync/inline_login_ui_browsertest.cc +@@ -44,7 +44,6 @@ #include "components/keyed_service/content/browser_context_dependency_manager.h" #include "components/prefs/pref_service.h" #include "components/prefs/scoped_user_pref_update.h" @@ -2719,9 +2712,9 @@ #include "components/signin/public/identity_manager/identity_test_utils.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_process_host.h" ---- a/chrome/browser/ui/webui/browser_command/browser_command_handler.cc -+++ b/chrome/browser/ui/webui/browser_command/browser_command_handler.cc -@@ -17,7 +17,6 @@ +--- chrome/browser/ui/webui/browser_command/browser_command_handler.cc.orig ++++ chrome/browser/ui/webui/browser_command/browser_command_handler.cc +@@ -16,7 +16,6 @@ #include "chrome/common/webui_url_constants.h" #include "components/safe_browsing/content/browser/web_ui/safe_browsing_ui.h" #include "components/safe_browsing/core/common/safe_browsing_policy_handler.h" @@ -2730,8 +2723,8 @@ #include "ui/base/window_open_disposition.h" @@ -61,13 +60,6 @@ void BrowserCommandHandler::CanExecuteCo - case Command::kOpenSafetyCheck: - can_execute = !chrome::enterprise_util::IsBrowserManaged(profile_); + can_execute = + !chrome::enterprise_util::HasBrowserPoliciesApplied(profile_); break; - case Command::kOpenSafeBrowsingEnhancedProtectionSettings: { - bool managed = safe_browsing::SafeBrowsingPolicyHandler:: @@ -2743,8 +2736,8 @@ case Command::kOpenFeedbackForm: can_execute = true; break; ---- a/chrome/browser/ui/webui/downloads/downloads_dom_handler.cc -+++ b/chrome/browser/ui/webui/downloads/downloads_dom_handler.cc +--- chrome/browser/ui/webui/downloads/downloads_dom_handler.cc.orig ++++ chrome/browser/ui/webui/downloads/downloads_dom_handler.cc @@ -37,7 +37,6 @@ #include "chrome/common/url_constants.h" #include "components/download/public/common/download_item.h" @@ -2753,27 +2746,8 @@ #include "content/public/browser/browser_thread.h" #include "content/public/browser/download_manager.h" #include "content/public/browser/render_process_host.h" ---- a/chrome/browser/ui/webui/history/history_ui.cc -+++ b/chrome/browser/ui/webui/history/history_ui.cc -@@ -40,7 +40,6 @@ - #include "components/history_clusters/core/history_clusters_prefs.h" - #include "components/history_clusters/core/history_clusters_service.h" - #include "components/prefs/pref_service.h" --#include "components/signin/public/base/signin_pref_names.h" - #include "components/signin/public/identity_manager/identity_manager.h" - #include "components/strings/grit/components_strings.h" - #include "content/public/browser/web_ui.h" -@@ -123,8 +122,6 @@ content::WebUIDataSource* CreateHistoryU - source->AddBoolean("allowDeletingHistory", allow_deleting_history); - - source->AddBoolean("isGuestSession", profile->IsGuestSession()); -- source->AddBoolean("isSignInAllowed", -- prefs->GetBoolean(prefs::kSigninAllowed)); - - source->AddBoolean(kIsUserSignedInKey, IsUserSignedIn(profile)); - ---- a/chrome/browser/ui/webui/management/management_ui_handler.cc -+++ b/chrome/browser/ui/webui/management/management_ui_handler.cc +--- chrome/browser/ui/webui/management/management_ui_handler.cc.orig ++++ chrome/browser/ui/webui/management/management_ui_handler.cc @@ -29,7 +29,6 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/managed_ui.h" @@ -2782,8 +2756,8 @@ #include "components/strings/grit/components_strings.h" #include "content/public/browser/storage_partition.h" #include "content/public/browser/web_contents.h" ---- a/chrome/browser/ui/webui/profile_info_watcher.cc -+++ b/chrome/browser/ui/webui/profile_info_watcher.cc +--- chrome/browser/ui/webui/profile_info_watcher.cc.orig ++++ chrome/browser/ui/webui/profile_info_watcher.cc @@ -12,7 +12,6 @@ #include "chrome/browser/signin/identity_manager_factory.h" #include "chrome/common/pref_names.h" @@ -2804,8 +2778,8 @@ } ProfileInfoWatcher::~ProfileInfoWatcher() { ---- a/chrome/browser/ui/webui/profile_info_watcher.h -+++ b/chrome/browser/ui/webui/profile_info_watcher.h +--- chrome/browser/ui/webui/profile_info_watcher.h.orig ++++ chrome/browser/ui/webui/profile_info_watcher.h @@ -49,7 +49,6 @@ class ProfileInfoWatcher : public Profil // Called when the authenticated username changes. base::RepeatingClosure callback_; @@ -2814,9 +2788,9 @@ }; #endif // CHROME_BROWSER_UI_WEBUI_PROFILE_INFO_WATCHER_H_ ---- a/chrome/browser/ui/webui/reset_password/reset_password_ui.cc -+++ b/chrome/browser/ui/webui/reset_password/reset_password_ui.cc -@@ -18,7 +18,6 @@ +--- chrome/browser/ui/webui/reset_password/reset_password_ui.cc.orig ++++ chrome/browser/ui/webui/reset_password/reset_password_ui.cc +@@ -17,7 +17,6 @@ #include "components/safe_browsing/content/browser/password_protection/password_protection_service.h" #include "components/safe_browsing/core/browser/password_protection/metrics_util.h" #include "components/safe_browsing/core/common/proto/csd.pb.h" @@ -2824,17 +2798,17 @@ #include "components/strings/grit/components_strings.h" #include "components/url_formatter/url_formatter.h" #include "components/user_prefs/user_prefs.h" ---- a/chrome/browser/ui/webui/settings/people_handler.cc -+++ b/chrome/browser/ui/webui/settings/people_handler.cc -@@ -42,7 +42,6 @@ +--- chrome/browser/ui/webui/settings/people_handler.cc.orig ++++ chrome/browser/ui/webui/settings/people_handler.cc +@@ -41,7 +41,6 @@ + #include "components/prefs/pref_service.h" #include "components/signin/core/browser/signin_error_controller.h" - #include "components/signin/public/base/consent_level.h" #include "components/signin/public/base/signin_metrics.h" -#include "components/signin/public/base/signin_pref_names.h" #include "components/signin/public/identity_manager/accounts_mutator.h" + #include "components/signin/public/identity_manager/consent_level.h" #include "components/signin/public/identity_manager/identity_manager.h" - #include "components/signin/public/identity_manager/primary_account_mutator.h" -@@ -299,10 +298,6 @@ void PeopleHandler::RegisterMessages() { +@@ -290,10 +289,6 @@ void PeopleHandler::RegisterMessages() { void PeopleHandler::OnJavascriptAllowed() { PrefService* prefs = profile_->GetPrefs(); profile_pref_registrar_.Init(prefs); @@ -2845,8 +2819,8 @@ signin::IdentityManager* identity_manager( IdentityManagerFactory::GetInstance()->GetForProfile(profile_)); ---- a/chrome/browser/ui/webui/settings/safety_check_handler.cc -+++ b/chrome/browser/ui/webui/settings/safety_check_handler.cc +--- chrome/browser/ui/webui/settings/safety_check_handler.cc.orig ++++ chrome/browser/ui/webui/settings/safety_check_handler.cc @@ -28,7 +28,6 @@ #include "chrome/grit/chromium_strings.h" #include "chrome/grit/generated_resources.h" @@ -2855,20 +2829,22 @@ #include "components/strings/grit/components_strings.h" #include "components/version_info/version_info.h" #include "content/public/browser/browser_context.h" ---- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc -+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc -@@ -69,7 +69,6 @@ +--- chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc.orig ++++ chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc +@@ -67,7 +67,6 @@ + #include "components/password_manager/core/browser/manage_passwords_referrer.h" #include "components/password_manager/core/common/password_manager_features.h" #include "components/prefs/pref_service.h" - #include "components/privacy_sandbox/privacy_sandbox_features.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "components/signin/public/base/signin_buildflags.h" #include "components/strings/grit/components_chromium_strings.h" #include "components/strings/grit/components_strings.h" -@@ -1445,44 +1444,6 @@ void AddPrivacyStrings(content::WebUIDat +@@ -1391,46 +1390,6 @@ void AddPrivacyStrings(content::WebUIDat {"clearBrowsingData", IDS_SETTINGS_CLEAR_BROWSING_DATA}, {"clearBrowsingDataDescription", IDS_SETTINGS_CLEAR_DATA_DESCRIPTION}, {"titleAndCount", IDS_SETTINGS_TITLE_AND_COUNT}, +- {"safeBrowsingEnableExtendedReporting", +- IDS_SETTINGS_SAFEBROWSING_ENABLE_REPORTING}, - {"safeBrowsingEnableExtendedReportingDesc", - IDS_SETTINGS_SAFEBROWSING_ENABLE_REPORTING_DESC}, - {"safeBrowsingEnhanced", IDS_SETTINGS_SAFEBROWSING_ENHANCED}, @@ -2910,7 +2886,7 @@ {"safeBrowsingSectionLabel", IDS_SETTINGS_SAFEBROWSING_SECTION_LABEL}, {"syncAndGoogleServicesPrivacyDescription", IDS_SETTINGS_SYNC_AND_GOOGLE_SERVICES_PRIVACY_DESC_UNIFIED_CONSENT}, -@@ -2779,11 +2740,6 @@ void AddSiteSettingsStrings(content::Web +@@ -2626,11 +2585,6 @@ void AddSiteSettingsStrings(content::Web html_source->AddLocalizedStrings(kSensorsLocalizedStrings); html_source->AddBoolean( @@ -2922,9 +2898,9 @@ "enableBlockAutoplayContentSetting", base::FeatureList::IsEnabled(media::kAutoplayDisableSettings)); ---- a/chrome/browser/ui/webui/settings/settings_ui.cc -+++ b/chrome/browser/ui/webui/settings/settings_ui.cc -@@ -70,7 +70,6 @@ +--- chrome/browser/ui/webui/settings/settings_ui.cc.orig ++++ chrome/browser/ui/webui/settings/settings_ui.cc +@@ -72,7 +72,6 @@ #include "components/pref_registry/pref_registry_syncable.h" #include "components/prefs/pref_service.h" #include "components/safe_browsing/core/common/features.h" @@ -2932,9 +2908,9 @@ #include "content/public/browser/url_data_source.h" #include "content/public/browser/web_contents.h" #include "content/public/browser/web_ui.h" -@@ -268,9 +267,7 @@ SettingsUI::SettingsUI(content::WebUI* w - html_source->AddString("enableBrandingUpdateAttribute", - "enable-branding-update"); +@@ -274,9 +273,7 @@ SettingsUI::SettingsUI(content::WebUI* w + ? "enable-branding-update" + : ""); - html_source->AddBoolean("signinAllowed", !profile->IsGuestSession() && - profile->GetPrefs()->GetBoolean( @@ -2943,8 +2919,38 @@ html_source->AddBoolean("showImportPasswords", base::FeatureList::IsEnabled( ---- a/chrome/browser/ui/webui/signin/inline_login_handler.cc -+++ b/chrome/browser/ui/webui/signin/inline_login_handler.cc +--- chrome/browser/ui/webui/signin/dice_turn_sync_on_helper.cc.orig ++++ chrome/browser/ui/webui/signin/dice_turn_sync_on_helper.cc +@@ -46,7 +46,6 @@ + #include "components/policy/core/common/management/management_service.h" + #include "components/prefs/pref_service.h" + #include "components/signin/public/base/signin_metrics.h" +-#include "components/signin/public/base/signin_pref_names.h" + #include "components/signin/public/identity_manager/accounts_mutator.h" + #include "components/signin/public/identity_manager/identity_manager.h" + #include "components/signin/public/identity_manager/primary_account_mutator.h" +@@ -248,8 +247,7 @@ DiceTurnSyncOnHelper::DiceTurnSyncOnHelp + // last authenticated account of the current profile, then Chrome will show a + // confirmation dialog before starting sync. + // TODO(skym): Warn for high risk upgrade scenario (https://crbug.com/572754). +- std::string last_email = +- profile_->GetPrefs()->GetString(prefs::kGoogleServicesLastUsername); ++ std::string last_email; + delegate_->ShowMergeSyncDataConfirmation( + last_email, account_info_.email, + base::BindOnce(&DiceTurnSyncOnHelper::OnMergeAccountConfirmation, +--- chrome/browser/ui/webui/signin/dice_turn_sync_on_helper_unittest.cc.orig ++++ chrome/browser/ui/webui/signin/dice_turn_sync_on_helper_unittest.cc +@@ -38,7 +38,6 @@ + #include "components/prefs/pref_service.h" + #include "components/signin/public/base/account_consistency_method.h" + #include "components/signin/public/base/signin_metrics.h" +-#include "components/signin/public/base/signin_pref_names.h" + #include "components/signin/public/identity_manager/identity_manager.h" + #include "components/signin/public/identity_manager/identity_test_environment.h" + #include "components/signin/public/identity_manager/primary_account_mutator.h" +--- chrome/browser/ui/webui/signin/inline_login_handler.cc.orig ++++ chrome/browser/ui/webui/signin/inline_login_handler.cc @@ -27,7 +27,6 @@ #include "chrome/common/pref_names.h" #include "components/metrics/metrics_pref_names.h" @@ -2953,7 +2959,7 @@ #include "content/public/browser/storage_partition.h" #include "content/public/browser/web_contents.h" #include "content/public/browser/web_ui.h" -@@ -138,8 +137,6 @@ void InlineLoginHandler::ContinueHandleI +@@ -127,8 +126,6 @@ void InlineLoginHandler::ContinueHandleI std::string default_email; if (reason == signin_metrics::Reason::kSigninPrimaryAccount || reason == signin_metrics::Reason::kForcedSigninPrimaryAccount) { @@ -2962,9 +2968,9 @@ } else { if (!net::GetValueForKeyInQuery(current_url, "email", &default_email)) default_email.clear(); ---- a/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc -+++ b/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc -@@ -67,7 +67,6 @@ +--- chrome/browser/ui/webui/signin/inline_login_handler_impl.cc.orig ++++ chrome/browser/ui/webui/signin/inline_login_handler_impl.cc +@@ -70,7 +70,6 @@ #include "components/prefs/pref_service.h" #include "components/signin/core/browser/about_signin_internals.h" #include "components/signin/public/base/signin_metrics.h" @@ -2972,8 +2978,8 @@ #include "components/signin/public/identity_manager/account_info.h" #include "components/signin/public/identity_manager/accounts_cookie_mutator.h" #include "components/signin/public/identity_manager/accounts_mutator.h" ---- a/chrome/browser/ui/webui/signin/signin_error_ui.cc -+++ b/chrome/browser/ui/webui/signin/signin_error_ui.cc +--- chrome/browser/ui/webui/signin/signin_error_ui.cc.orig ++++ chrome/browser/ui/webui/signin/signin_error_ui.cc @@ -23,7 +23,6 @@ #include "chrome/grit/generated_resources.h" #include "chrome/grit/signin_resources.h" @@ -2993,8 +2999,8 @@ if (allowed_domain.empty()) { source->AddLocalizedString( "profileBlockedAddPersonSuggestion", ---- a/chrome/browser/ui/webui/signin/signin_utils_desktop.cc -+++ b/chrome/browser/ui/webui/signin/signin_utils_desktop.cc +--- chrome/browser/ui/webui/signin/signin_utils_desktop.cc.orig ++++ chrome/browser/ui/webui/signin/signin_utils_desktop.cc @@ -18,7 +18,6 @@ #include "chrome/grit/chromium_strings.h" #include "chrome/grit/generated_resources.h" @@ -3022,38 +3028,8 @@ return SigninUIError::ProfileWasUsedByAnotherAccount(email, last_email); } } ---- a/chrome/browser/ui/webui/signin/turn_sync_on_helper.cc -+++ b/chrome/browser/ui/webui/signin/turn_sync_on_helper.cc -@@ -45,7 +45,6 @@ - #include "components/policy/core/common/management/management_service.h" - #include "components/prefs/pref_service.h" - #include "components/signin/public/base/signin_metrics.h" --#include "components/signin/public/base/signin_pref_names.h" - #include "components/signin/public/identity_manager/accounts_mutator.h" - #include "components/signin/public/identity_manager/identity_manager.h" - #include "components/signin/public/identity_manager/primary_account_mutator.h" -@@ -220,8 +219,7 @@ TurnSyncOnHelper::TurnSyncOnHelper( - // last authenticated account of the current profile, then Chrome will show a - // confirmation dialog before starting sync. - // TODO(skym): Warn for high risk upgrade scenario (https://crbug.com/572754). -- std::string last_email = -- profile_->GetPrefs()->GetString(prefs::kGoogleServicesLastUsername); -+ std::string last_email; - delegate_->ShowMergeSyncDataConfirmation( - last_email, account_info_.email, - base::BindOnce(&TurnSyncOnHelper::OnMergeAccountConfirmation, ---- a/chrome/browser/ui/webui/signin/turn_sync_on_helper_unittest.cc -+++ b/chrome/browser/ui/webui/signin/turn_sync_on_helper_unittest.cc -@@ -41,7 +41,6 @@ - #include "components/prefs/pref_service.h" - #include "components/signin/public/base/account_consistency_method.h" - #include "components/signin/public/base/signin_metrics.h" --#include "components/signin/public/base/signin_pref_names.h" - #include "components/signin/public/identity_manager/identity_manager.h" - #include "components/signin/public/identity_manager/identity_test_environment.h" - #include "components/signin/public/identity_manager/primary_account_mutator.h" ---- a/chrome/browser/ui/webui/welcome/welcome_ui.cc -+++ b/chrome/browser/ui/webui/welcome/welcome_ui.cc +--- chrome/browser/ui/webui/welcome/welcome_ui.cc.orig ++++ chrome/browser/ui/webui/welcome/welcome_ui.cc @@ -24,7 +24,6 @@ #include "chrome/grit/welcome_resources.h" #include "chrome/grit/welcome_resources_map.h" @@ -3071,8 +3047,8 @@ html_source->SetRequestFilter( base::BindRepeating(&ShouldHandleRequestCallback, weak_ptr_factory_.GetWeakPtr()), ---- a/chrome/browser/unified_consent/unified_consent_service_factory.cc -+++ b/chrome/browser/unified_consent/unified_consent_service_factory.cc +--- chrome/browser/unified_consent/unified_consent_service_factory.cc.orig ++++ chrome/browser/unified_consent/unified_consent_service_factory.cc @@ -13,7 +13,6 @@ #include "components/embedder_support/pref_names.h" #include "components/keyed_service/content/browser_context_dependency_manager.h" @@ -3087,10 +3063,10 @@ prefs::kSearchSuggestEnabled, embedder_support::kAlternateErrorPagesEnabled, - prefs::kSafeBrowsingEnabled, prefs::kSafeBrowsingScoutReportingEnabled, spellcheck::prefs::kSpellCheckUseSpellingService, - #if BUILDFLAG(IS_ANDROID) + #if defined(OS_ANDROID) prefs::kContextualSearchEnabled ---- a/chrome/common/extensions/api/privacy.json -+++ b/chrome/common/extensions/api/privacy.json +--- chrome/common/extensions/api/privacy.json.orig ++++ chrome/common/extensions/api/privacy.json @@ -63,16 +63,6 @@ "value": ["passwordSavingEnabled", {"type":"boolean"}], "description": "If enabled, the password manager will ask if you want to save passwords. This preference's value is a boolean, defaulting to <code>true</code>." @@ -3108,9 +3084,9 @@ "searchSuggestEnabled": { "$ref": "types.ChromeSetting", "value": ["searchSuggestEnabled", {"type":"boolean"}], ---- a/components/password_manager/core/browser/leak_detection_delegate.cc -+++ b/components/password_manager/core/browser/leak_detection_delegate.cc -@@ -23,7 +23,6 @@ +--- components/password_manager/core/browser/leak_detection_delegate.cc.orig ++++ components/password_manager/core/browser/leak_detection_delegate.cc +@@ -22,7 +22,6 @@ #include "components/password_manager/core/common/password_manager_features.h" #include "components/password_manager/core/common/password_manager_pref_names.h" #include "components/prefs/pref_service.h" @@ -3118,7 +3094,7 @@ #include "services/network/public/cpp/shared_url_loader_factory.h" namespace password_manager { -@@ -176,28 +175,7 @@ void LeakDetectionDelegate::OnError(Leak +@@ -169,28 +168,7 @@ void LeakDetectionDelegate::OnError(Leak bool CanStartLeakCheck(const PrefService& prefs, const PasswordManagerClient* client) { @@ -3148,8 +3124,8 @@ } } // namespace password_manager ---- a/components/password_manager/core/browser/password_bubble_experiment.cc -+++ b/components/password_manager/core/browser/password_bubble_experiment.cc +--- components/password_manager/core/browser/password_bubble_experiment.cc.orig ++++ components/password_manager/core/browser/password_bubble_experiment.cc @@ -18,7 +18,6 @@ #include "components/prefs/pref_registry_simple.h" #include "components/prefs/pref_service.h" @@ -3158,8 +3134,8 @@ #include "components/sync/driver/sync_service.h" #include "components/sync/driver/sync_user_settings.h" ---- a/components/password_manager/core/browser/password_reuse_detector.cc -+++ b/components/password_manager/core/browser/password_reuse_detector.cc +--- components/password_manager/core/browser/password_reuse_detector.cc.orig ++++ components/password_manager/core/browser/password_reuse_detector.cc @@ -15,7 +15,6 @@ #include "components/password_manager/core/browser/password_reuse_detector_consumer.h" #include "components/password_manager/core/browser/password_store_consumer.h" @@ -3168,7 +3144,7 @@ #include "google_apis/gaia/gaia_auth_util.h" #include "google_apis/gaia/gaia_urls.h" #include "url/origin.h" -@@ -216,9 +215,7 @@ PasswordReuseDetector::CheckNonGaiaEnter +@@ -205,9 +204,7 @@ PasswordReuseDetector::CheckNonGaiaEnter // Skips password reuse check if |domain| matches enterprise login URL or // enterprise change password URL. GURL page_url(domain); @@ -3179,8 +3155,8 @@ return absl::nullopt; } ---- a/components/password_manager/core/browser/password_reuse_manager_impl.cc -+++ b/components/password_manager/core/browser/password_reuse_manager_impl.cc +--- components/password_manager/core/browser/password_reuse_manager_impl.cc.orig ++++ components/password_manager/core/browser/password_reuse_manager_impl.cc @@ -9,7 +9,6 @@ #include "components/password_manager/core/browser/password_store_signin_notifier.h" #include "components/password_manager/core/common/password_manager_features.h" @@ -3189,7 +3165,7 @@ namespace password_manager { -@@ -320,20 +319,6 @@ void PasswordReuseManagerImpl::ScheduleP +@@ -318,20 +317,6 @@ void PasswordReuseManagerImpl::ScheduleP void PasswordReuseManagerImpl::ScheduleEnterprisePasswordURLUpdate() { DCHECK(main_task_runner_->RunsTasksInCurrentSequence()); @@ -3210,9 +3186,9 @@ } void PasswordReuseManagerImpl::OnGetPasswordStoreResults( ---- a/components/password_manager/core/browser/password_store.cc -+++ b/components/password_manager/core/browser/password_store.cc -@@ -40,7 +40,6 @@ +--- components/password_manager/core/browser/password_store.cc.orig ++++ components/password_manager/core/browser/password_store.cc +@@ -39,7 +39,6 @@ #include "components/password_manager/core/common/password_manager_features.h" #include "components/password_manager/core/common/password_manager_pref_names.h" #include "components/prefs/pref_service.h" @@ -3220,8 +3196,8 @@ #include "components/sync/model/proxy_model_type_controller_delegate.h" namespace password_manager { ---- a/components/password_manager/core/browser/password_sync_util.cc -+++ b/components/password_manager/core/browser/password_sync_util.cc +--- components/password_manager/core/browser/password_sync_util.cc.orig ++++ components/password_manager/core/browser/password_sync_util.cc @@ -8,7 +8,6 @@ #include "build/build_config.h" #include "components/password_manager/core/browser/password_form.h" @@ -3242,9 +3218,9 @@ return false; } ---- a/components/password_manager/core/browser/sync_credentials_filter_unittest.cc -+++ b/components/password_manager/core/browser/sync_credentials_filter_unittest.cc -@@ -30,7 +30,6 @@ +--- components/password_manager/core/browser/sync_credentials_filter_unittest.cc.orig ++++ components/password_manager/core/browser/sync_credentials_filter_unittest.cc +@@ -29,7 +29,6 @@ #include "components/password_manager/core/common/password_manager_features.h" #include "components/prefs/pref_registry_simple.h" #include "components/prefs/testing_pref_service.h" @@ -3252,18 +3228,8 @@ #include "testing/gtest/include/gtest/gtest.h" namespace password_manager { ---- a/components/reputation/core/safety_tips_config.cc -+++ b/components/reputation/core/safety_tips_config.cc -@@ -5,6 +5,7 @@ - #include "components/reputation/core/safety_tips_config.h" - - #include "base/no_destructor.h" -+#include "base/notreached.h" - #include "base/ranges/algorithm.h" - #include "components/safe_browsing/core/browser/db/v4_protocol_manager_util.h" - #include "third_party/re2/src/re2/re2.h" ---- a/components/safe_browsing/content/browser/base_blocking_page.cc -+++ b/components/safe_browsing/content/browser/base_blocking_page.cc +--- components/safe_browsing/content/browser/base_blocking_page.cc.orig ++++ components/safe_browsing/content/browser/base_blocking_page.cc @@ -13,7 +13,6 @@ #include "base/time/time.h" #include "components/safe_browsing/content/browser/safe_browsing_controller_client.h" @@ -3272,8 +3238,8 @@ #include "components/security_interstitials/content/security_interstitial_controller_client.h" #include "components/security_interstitials/content/settings_page_helper.h" #include "components/security_interstitials/content/unsafe_resource_util.h" ---- a/components/safe_browsing/content/browser/client_side_detection_service.cc -+++ b/components/safe_browsing/content/browser/client_side_detection_service.cc +--- components/safe_browsing/content/browser/client_side_detection_service.cc.orig ++++ components/safe_browsing/content/browser/client_side_detection_service.cc @@ -28,7 +28,6 @@ #include "components/safe_browsing/core/common/features.h" #include "components/safe_browsing/core/common/proto/client_model.pb.h" @@ -3282,8 +3248,8 @@ #include "components/safe_browsing/core/common/safebrowsing_constants.h" #include "components/safe_browsing/core/common/utils.h" #include "content/public/browser/browser_task_traits.h" ---- a/components/safe_browsing/content/browser/safe_browsing_navigation_observer_manager.cc -+++ b/components/safe_browsing/content/browser/safe_browsing_navigation_observer_manager.cc +--- components/safe_browsing/content/browser/safe_browsing_navigation_observer_manager.cc.orig ++++ components/safe_browsing/content/browser/safe_browsing_navigation_observer_manager.cc @@ -20,7 +20,6 @@ #include "components/safe_browsing/content/browser/safe_browsing_navigation_observer_manager_util.h" #include "components/safe_browsing/content/browser/web_ui/safe_browsing_ui.h" @@ -3301,8 +3267,8 @@ } // static ---- a/components/safe_browsing/content/browser/triggers/suspicious_site_trigger_unittest.cc -+++ b/components/safe_browsing/content/browser/triggers/suspicious_site_trigger_unittest.cc +--- components/safe_browsing/content/browser/triggers/suspicious_site_trigger_unittest.cc.orig ++++ components/safe_browsing/content/browser/triggers/suspicious_site_trigger_unittest.cc @@ -11,7 +11,6 @@ #include "build/build_config.h" #include "components/prefs/testing_pref_service.h" @@ -3311,8 +3277,8 @@ #include "content/public/test/browser_task_environment.h" #include "content/public/test/navigation_simulator.h" #include "content/public/test/test_renderer_host.h" ---- a/components/safe_browsing/content/browser/triggers/trigger_manager.cc -+++ b/components/safe_browsing/content/browser/triggers/trigger_manager.cc +--- components/safe_browsing/content/browser/triggers/trigger_manager.cc.orig ++++ components/safe_browsing/content/browser/triggers/trigger_manager.cc @@ -12,7 +12,6 @@ #include "components/safe_browsing/content/browser/base_ui_manager.h" #include "components/safe_browsing/content/browser/threat_details.h" @@ -3344,14 +3310,14 @@ /*help_center_article_link=*/std::string()); } ---- a/components/safe_browsing/content/browser/triggers/trigger_throttler.cc -+++ b/components/safe_browsing/content/browser/triggers/trigger_throttler.cc +--- components/safe_browsing/content/browser/triggers/trigger_throttler.cc.orig ++++ components/safe_browsing/content/browser/triggers/trigger_throttler.cc @@ -197,28 +197,6 @@ void TriggerThrottler::LoadTriggerEvents trigger_events_.clear(); if (!local_state_prefs_) return; - -- const base::Value* event_dict = local_state_prefs_->GetDictionary( +- const base::DictionaryValue* event_dict = local_state_prefs_->GetDictionary( - prefs::kSafeBrowsingTriggerEventTimestamps); - for (auto trigger_pair : event_dict->DictItems()) { - // Check that the first item in the pair is convertible to a trigger type @@ -3366,7 +3332,7 @@ - continue; - - const TriggerType trigger_type = static_cast<TriggerType>(trigger_type_int); -- for (const auto& timestamp : trigger_pair.second.GetListDeprecated()) { +- for (const auto& timestamp : trigger_pair.second.GetList()) { - if (timestamp.is_double()) - trigger_events_[trigger_type].push_back( - base::Time::FromDoubleT(timestamp.GetDouble())); @@ -3385,8 +3351,8 @@ } size_t TriggerThrottler::GetDailyQuotaForTrigger( ---- a/components/safe_browsing/content/browser/triggers/trigger_throttler_unittest.cc -+++ b/components/safe_browsing/content/browser/triggers/trigger_throttler_unittest.cc +--- components/safe_browsing/content/browser/triggers/trigger_throttler_unittest.cc.orig ++++ components/safe_browsing/content/browser/triggers/trigger_throttler_unittest.cc @@ -9,7 +9,6 @@ #include "base/test/simple_test_clock.h" #include "components/prefs/testing_pref_service.h" @@ -3395,9 +3361,9 @@ #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" ---- a/components/safe_browsing/content/browser/ui_manager.cc -+++ b/components/safe_browsing/content/browser/ui_manager.cc -@@ -16,7 +16,6 @@ +--- components/safe_browsing/content/browser/ui_manager.cc.orig ++++ components/safe_browsing/content/browser/ui_manager.cc +@@ -18,7 +18,6 @@ #include "components/safe_browsing/core/browser/db/v4_protocol_manager_util.h" #include "components/safe_browsing/core/browser/ping_manager.h" #include "components/safe_browsing/core/common/features.h" @@ -3405,9 +3371,9 @@ #include "components/security_interstitials/content/security_interstitial_tab_helper.h" #include "components/security_interstitials/content/unsafe_resource_util.h" #include "components/security_interstitials/core/unsafe_resource.h" ---- a/components/safe_browsing/content/browser/ui_manager_unittest.cc -+++ b/components/safe_browsing/content/browser/ui_manager_unittest.cc -@@ -15,7 +15,6 @@ +--- components/safe_browsing/content/browser/ui_manager_unittest.cc.orig ++++ components/safe_browsing/content/browser/ui_manager_unittest.cc +@@ -14,7 +14,6 @@ #include "components/safe_browsing/content/browser/safe_browsing_controller_client.h" #include "components/safe_browsing/content/browser/ui_manager.h" #include "components/safe_browsing/core/browser/db/util.h" @@ -3415,8 +3381,8 @@ #include "components/security_interstitials/content/security_interstitial_controller_client.h" #include "components/security_interstitials/content/settings_page_helper.h" #include "components/security_interstitials/content/unsafe_resource_util.h" ---- a/components/safe_browsing/content/browser/web_ui/safe_browsing_ui.cc -+++ b/components/safe_browsing/content/browser/web_ui/safe_browsing_ui.cc +--- components/safe_browsing/content/browser/web_ui/safe_browsing_ui.cc.orig ++++ components/safe_browsing/content/browser/web_ui/safe_browsing_ui.cc @@ -32,7 +32,6 @@ #include "components/safe_browsing/core/browser/referrer_chain_provider.h" #include "components/safe_browsing/core/common/features.h" @@ -3425,28 +3391,28 @@ #include "services/network/public/mojom/cookie_manager.mojom.h" #if BUILDFLAG(FULL_SAFE_BROWSING) #include "components/enterprise/common/proto/connectors.pb.h" -@@ -2043,18 +2042,13 @@ void SafeBrowsingUIHandler::GetPrefs(con +@@ -2035,18 +2034,13 @@ void SafeBrowsingUIHandler::GetPrefs(con AllowJavascript(); - DCHECK(!args.empty()); - std::string callback_id = args[0].GetString(); + DCHECK(!args->GetList().empty()); + std::string callback_id = args->GetList()[0].GetString(); - ResolveJavascriptCallback(base::Value(callback_id), - safe_browsing::GetSafeBrowsingPreferencesList( - user_prefs::UserPrefs::Get(browser_context_))); + ResolveJavascriptCallback(base::Value(callback_id), base::ListValue()); } - void SafeBrowsingUIHandler::GetPolicies(const base::Value::ConstListView args) { + void SafeBrowsingUIHandler::GetPolicies(const base::ListValue* args) { AllowJavascript(); - DCHECK(!args.empty()); - std::string callback_id = args[0].GetString(); + DCHECK(!args->GetList().empty()); + std::string callback_id = args->GetList()[0].GetString(); - ResolveJavascriptCallback(base::Value(callback_id), - safe_browsing::GetSafeBrowsingPoliciesList( - user_prefs::UserPrefs::Get(browser_context_))); } - void SafeBrowsingUIHandler::GetCookie(const base::Value::ConstListView args) { ---- a/components/safe_browsing/core/browser/db/hit_report.h -+++ b/components/safe_browsing/core/browser/db/hit_report.h + void SafeBrowsingUIHandler::GetCookie(const base::ListValue* args) { +--- components/safe_browsing/core/browser/db/hit_report.h.orig ++++ components/safe_browsing/core/browser/db/hit_report.h @@ -8,7 +8,6 @@ #define COMPONENTS_SAFE_BROWSING_CORE_BROWSER_DB_HIT_REPORT_H_ @@ -3463,8 +3429,8 @@ bool is_enhanced_protection = false; bool is_metrics_reporting_active; ---- a/components/safe_browsing/core/browser/db/util.h -+++ b/components/safe_browsing/core/browser/db/util.h +--- components/safe_browsing/core/browser/db/util.h.orig ++++ components/safe_browsing/core/browser/db/util.h @@ -18,7 +18,6 @@ #include "base/strings/string_piece.h" #include "base/trace_event/traced_value.h" @@ -3473,9 +3439,9 @@ namespace safe_browsing { ---- a/components/safe_browsing/core/browser/db/v4_local_database_manager.cc -+++ b/components/safe_browsing/core/browser/db/v4_local_database_manager.cc -@@ -334,10 +334,9 @@ const V4LocalDatabaseManager* +--- components/safe_browsing/core/browser/db/v4_local_database_manager.cc.orig ++++ components/safe_browsing/core/browser/db/v4_local_database_manager.cc +@@ -337,10 +337,9 @@ const V4LocalDatabaseManager* scoped_refptr<V4LocalDatabaseManager> V4LocalDatabaseManager::Create( const base::FilePath& base_path, scoped_refptr<base::SequencedTaskRunner> ui_task_runner, @@ -3488,7 +3454,7 @@ std::move(io_task_runner), nullptr)); } -@@ -360,14 +359,12 @@ void V4LocalDatabaseManager::CollectData +@@ -363,14 +362,12 @@ void V4LocalDatabaseManager::CollectData V4LocalDatabaseManager::V4LocalDatabaseManager( const base::FilePath& base_path, @@ -3503,7 +3469,7 @@ list_infos_(GetListInfos()), task_runner_(task_runner_for_tests ? task_runner_for_tests -@@ -1119,8 +1116,7 @@ void V4LocalDatabaseManager::SetupUpdate +@@ -1137,8 +1134,7 @@ void V4LocalDatabaseManager::SetupUpdate weak_factory_.GetWeakPtr()); v4_update_protocol_manager_ = V4UpdateProtocolManager::Create( @@ -3513,9 +3479,9 @@ } void V4LocalDatabaseManager::UpdateRequestCompleted( ---- a/components/safe_browsing/core/browser/db/v4_local_database_manager.h -+++ b/components/safe_browsing/core/browser/db/v4_local_database_manager.h -@@ -38,8 +38,7 @@ class V4LocalDatabaseManager : public Sa +--- components/safe_browsing/core/browser/db/v4_local_database_manager.h.orig ++++ components/safe_browsing/core/browser/db/v4_local_database_manager.h +@@ -37,8 +37,7 @@ class V4LocalDatabaseManager : public Sa static scoped_refptr<V4LocalDatabaseManager> Create( const base::FilePath& base_path, scoped_refptr<base::SequencedTaskRunner> ui_task_runner, @@ -3544,8 +3510,8 @@ // The client_state of each list currently being synced. This is updated each // time a database update completes, and used to send list client_state // information in the full hash request. ---- a/components/safe_browsing/core/browser/db/v4_protocol_manager_util.cc -+++ b/components/safe_browsing/core/browser/db/v4_protocol_manager_util.cc +--- components/safe_browsing/core/browser/db/v4_protocol_manager_util.cc.orig ++++ components/safe_browsing/core/browser/db/v4_protocol_manager_util.cc @@ -88,7 +88,6 @@ void SetSbV4UrlPrefixForTesting(const ch std::string GetReportUrl(const V4ProtocolConfig& config, @@ -3563,8 +3529,8 @@ if (is_enhanced_protection) url.append(base::StringPrintf("&enh=%d", is_enhanced_protection)); return url; ---- a/components/safe_browsing/core/browser/db/v4_protocol_manager_util.h -+++ b/components/safe_browsing/core/browser/db/v4_protocol_manager_util.h +--- components/safe_browsing/core/browser/db/v4_protocol_manager_util.h.orig ++++ components/safe_browsing/core/browser/db/v4_protocol_manager_util.h @@ -18,10 +18,11 @@ #include <vector> @@ -3586,8 +3552,8 @@ const bool is_enhanced_protection = false); // Different types of threats that SafeBrowsing protects against. This is the ---- a/components/safe_browsing/core/browser/db/v4_update_protocol_manager.cc -+++ b/components/safe_browsing/core/browser/db/v4_update_protocol_manager.cc +--- components/safe_browsing/core/browser/db/v4_update_protocol_manager.cc.orig ++++ components/safe_browsing/core/browser/db/v4_update_protocol_manager.cc @@ -78,19 +78,8 @@ static const int kV4TimerStartIntervalSe // Maximum time, in seconds, to wait for a response to an update request. static const int kV4TimerUpdateWaitSecMax = 15 * 60; // 15 minutes @@ -3674,9 +3640,9 @@ V4ProtocolManagerUtil::SetClientInfoFromConfig(request.mutable_client(), config_); ---- a/components/safe_browsing/core/browser/db/v4_update_protocol_manager.h -+++ b/components/safe_browsing/core/browser/db/v4_update_protocol_manager.h -@@ -23,7 +23,6 @@ +--- components/safe_browsing/core/browser/db/v4_update_protocol_manager.h.orig ++++ components/safe_browsing/core/browser/db/v4_update_protocol_manager.h +@@ -24,7 +24,6 @@ #include "components/safe_browsing/core/browser/db/util.h" #include "components/safe_browsing/core/browser/db/v4_protocol_manager_util.h" #include "components/safe_browsing/core/common/proto/webui.pb.h" @@ -3684,7 +3650,7 @@ #include "third_party/abseil-cpp/absl/types/optional.h" class GURL; -@@ -44,9 +43,6 @@ class V4UpdateProtocolManagerFactory; +@@ -45,9 +44,6 @@ class V4UpdateProtocolManagerFactory; using V4UpdateCallback = base::RepeatingCallback<void(std::unique_ptr<ParsedServerResponse>)>; @@ -3694,7 +3660,7 @@ class V4UpdateProtocolManager { public: V4UpdateProtocolManager(const V4UpdateProtocolManager&) = delete; -@@ -64,8 +60,7 @@ class V4UpdateProtocolManager { +@@ -65,8 +61,7 @@ class V4UpdateProtocolManager { static std::unique_ptr<V4UpdateProtocolManager> Create( scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory, const V4ProtocolConfig& config, @@ -3704,7 +3670,7 @@ void OnURLLoaderComplete(std::unique_ptr<std::string> response_body); -@@ -87,8 +82,7 @@ class V4UpdateProtocolManager { +@@ -88,8 +83,7 @@ class V4UpdateProtocolManager { V4UpdateProtocolManager( scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory, const V4ProtocolConfig& config, @@ -3714,7 +3680,7 @@ private: FRIEND_TEST_ALL_PREFIXES(V4UpdateProtocolManagerTest, -@@ -206,8 +200,6 @@ class V4UpdateProtocolManager { +@@ -207,8 +201,6 @@ class V4UpdateProtocolManager { // complete. base::OneShotTimer timeout_timer_; @@ -3723,7 +3689,7 @@ SEQUENCE_CHECKER(sequence_checker_); }; -@@ -225,8 +217,7 @@ class V4UpdateProtocolManagerFactory { +@@ -226,8 +218,7 @@ class V4UpdateProtocolManagerFactory { virtual std::unique_ptr<V4UpdateProtocolManager> CreateProtocolManager( scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory, const V4ProtocolConfig& config, @@ -3733,8 +3699,8 @@ }; } // namespace safe_browsing ---- a/components/safe_browsing/core/browser/password_protection/password_protection_service_base.h -+++ b/components/safe_browsing/core/browser/password_protection/password_protection_service_base.h +--- components/safe_browsing/core/browser/password_protection/password_protection_service_base.h.orig ++++ components/safe_browsing/core/browser/password_protection/password_protection_service_base.h @@ -28,7 +28,6 @@ #include "components/safe_browsing/core/browser/safe_browsing_metrics_collector.h" #include "components/safe_browsing/core/browser/safe_browsing_token_fetcher.h" @@ -3754,9 +3720,9 @@ // If |url| matches Safe Browsing allowlist domains, password protection // change password URL, or password protection login URLs in the enterprise // policy. ---- a/components/safe_browsing/core/browser/ping_manager.cc -+++ b/components/safe_browsing/core/browser/ping_manager.cc -@@ -173,7 +173,7 @@ GURL PingManager::SafeBrowsingHitUrl( +--- components/safe_browsing/core/browser/ping_manager.cc.orig ++++ components/safe_browsing/core/browser/ping_manager.cc +@@ -141,7 +141,7 @@ GURL PingManager::SafeBrowsingHitUrl( hit_report.threat_type == SB_THREAT_TYPE_URL_CLIENT_SIDE_PHISHING || hit_report.threat_type == SB_THREAT_TYPE_URL_CLIENT_SIDE_MALWARE); std::string url = @@ -3765,8 +3731,8 @@ hit_report.is_enhanced_protection); std::string threat_list = "none"; switch (hit_report.threat_type) { ---- a/components/safe_browsing/core/browser/realtime/policy_engine.cc -+++ b/components/safe_browsing/core/browser/realtime/policy_engine.cc +--- components/safe_browsing/core/browser/realtime/policy_engine.cc.orig ++++ components/safe_browsing/core/browser/realtime/policy_engine.cc @@ -8,7 +8,6 @@ #include "base/metrics/histogram_macros.h" #include "build/build_config.h" @@ -3775,7 +3741,7 @@ #include "components/safe_browsing/core/common/utils.h" #include "components/unified_consent/pref_names.h" #include "components/user_prefs/user_prefs.h" -@@ -36,7 +35,7 @@ bool RealTimePolicyEngine::IsUserMbbOpte +@@ -35,7 +34,7 @@ bool RealTimePolicyEngine::IsUserMbbOpte // static bool RealTimePolicyEngine::IsUserEpOptedIn(PrefService* pref_service) { @@ -3784,7 +3750,7 @@ } // static -@@ -82,9 +81,7 @@ bool RealTimePolicyEngine::CanPerformEnt +@@ -81,9 +80,7 @@ bool RealTimePolicyEngine::CanPerformEnt return false; } @@ -3795,9 +3761,9 @@ } // static ---- a/components/safe_browsing/core/browser/realtime/url_lookup_service.cc -+++ b/components/safe_browsing/core/browser/realtime/url_lookup_service.cc -@@ -20,7 +20,6 @@ +--- components/safe_browsing/core/browser/realtime/url_lookup_service.cc.orig ++++ components/safe_browsing/core/browser/realtime/url_lookup_service.cc +@@ -19,7 +19,6 @@ #include "components/safe_browsing/core/browser/referrer_chain_provider.h" #include "components/safe_browsing/core/browser/safe_browsing_token_fetcher.h" #include "components/safe_browsing/core/common/features.h" @@ -3805,7 +3771,7 @@ #include "components/unified_consent/pref_names.h" #include "net/base/ip_address.h" #include "net/base/load_flags.h" -@@ -63,10 +62,6 @@ RealTimeUrlLookupService::RealTimeUrlLoo +@@ -61,10 +60,6 @@ RealTimeUrlLookupService::RealTimeUrlLoo variations_(variations_service) { pref_change_registrar_.Init(pref_service_); pref_change_registrar_.Add( @@ -3816,7 +3782,7 @@ unified_consent::prefs::kUrlKeyedAnonymizedDataCollectionEnabled, base::BindRepeating(&RealTimeUrlLookupService::OnPrefChanged, base::Unretained(this))); -@@ -140,7 +135,7 @@ bool RealTimeUrlLookupService::CanSendPa +@@ -144,7 +139,7 @@ bool RealTimeUrlLookupService::CanSendPa } bool RealTimeUrlLookupService::CanCheckSubresourceURL() const { @@ -3825,35 +3791,22 @@ } bool RealTimeUrlLookupService::CanCheckSafeBrowsingDb() const { -@@ -150,11 +145,7 @@ bool RealTimeUrlLookupService::CanCheckS - } - - bool RealTimeUrlLookupService::CanSendRTSampleRequest() const { -- return IsExtendedReportingEnabled(*pref_service_) && -- base::FeatureList::IsEnabled( -- safe_browsing::kSendSampledPingsForProtegoAllowlistDomains) && -- (bypass_protego_probability_for_tests_ || -- base::RandDouble() <= kProbabilityForSendingSampledRequests); -+ return false; - } - - void RealTimeUrlLookupService::Shutdown() { ---- a/components/safe_browsing/core/browser/realtime/url_lookup_service_base.cc -+++ b/components/safe_browsing/core/browser/realtime/url_lookup_service_base.cc -@@ -17,7 +17,6 @@ +--- components/safe_browsing/core/browser/realtime/url_lookup_service_base.cc.orig ++++ components/safe_browsing/core/browser/realtime/url_lookup_service_base.cc +@@ -16,7 +16,6 @@ + #include "components/prefs/pref_service.h" #include "components/safe_browsing/core/browser/referrer_chain_provider.h" #include "components/safe_browsing/core/browser/verdict_cache_manager.h" - #include "components/safe_browsing/core/common/features.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "components/safe_browsing/core/common/safebrowsing_constants.h" #include "components/safe_browsing/core/common/utils.h" #include "net/base/ip_address.h" ---- a/components/safe_browsing/core/browser/safe_browsing_metrics_collector.cc -+++ b/components/safe_browsing/core/browser/safe_browsing_metrics_collector.cc -@@ -12,13 +12,11 @@ +--- components/safe_browsing/core/browser/safe_browsing_metrics_collector.cc.orig ++++ components/safe_browsing/core/browser/safe_browsing_metrics_collector.cc +@@ -11,13 +11,11 @@ + #include "base/time/time.h" #include "components/prefs/pref_service.h" #include "components/prefs/scoped_user_pref_update.h" - #include "components/safe_browsing/core/browser/db/hit_report.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" namespace { @@ -3864,7 +3817,7 @@ const int kMetricsLoggingIntervalDay = 1; -@@ -59,11 +57,6 @@ SafeBrowsingMetricsCollector::SafeBrowsi +@@ -54,11 +52,6 @@ SafeBrowsingMetricsCollector::SafeBrowsi PrefService* pref_service) : pref_service_(pref_service) { pref_change_registrar_.Init(pref_service_); @@ -3876,7 +3829,7 @@ } void SafeBrowsingMetricsCollector::Shutdown() { -@@ -71,16 +64,6 @@ void SafeBrowsingMetricsCollector::Shutd +@@ -66,16 +59,6 @@ void SafeBrowsingMetricsCollector::Shutd } void SafeBrowsingMetricsCollector::StartLogging() { @@ -3893,7 +3846,7 @@ } void SafeBrowsingMetricsCollector::LogMetricsAndScheduleNextLogging() { -@@ -88,9 +71,6 @@ void SafeBrowsingMetricsCollector::LogMe +@@ -83,9 +66,6 @@ void SafeBrowsingMetricsCollector::LogMe LogDailyEventMetrics(); RemoveOldEventsFromPref(); @@ -3903,7 +3856,7 @@ ScheduleNextLoggingAfterInterval(base::Days(kMetricsLoggingIntervalDay)); } -@@ -103,87 +83,16 @@ void SafeBrowsingMetricsCollector::Sched +@@ -98,181 +78,40 @@ void SafeBrowsingMetricsCollector::Sched } void SafeBrowsingMetricsCollector::LogDailyOptInMetrics() { @@ -3961,7 +3914,7 @@ void SafeBrowsingMetricsCollector::RemoveOldEventsFromPref() { - DictionaryPrefUpdate update(pref_service_, - prefs::kSafeBrowsingEventTimestamps); -- base::Value* mutable_state_dict = update.Get(); +- base::DictionaryValue* mutable_state_dict = update.Get(); - bool is_pref_valid = mutable_state_dict->is_dict(); - base::UmaHistogramBoolean("SafeBrowsing.MetricsCollector.IsPrefValid", - is_pref_valid); @@ -3990,30 +3943,47 @@ - AddSafeBrowsingEventAndUserStateToPref(GetUserState(), event_type); } - void SafeBrowsingMetricsCollector::AddBypassEventToPref( -@@ -220,15 +129,7 @@ absl::optional<base::Time> - SafeBrowsingMetricsCollector::GetLatestEventTimestamp( - EventTypeFilter event_type_filter) { - // Events are not logged when Safe Browsing is disabled. + absl::optional<base::Time> + SafeBrowsingMetricsCollector::GetLatestEventTimestamp(EventType event_type) { +- // Events are not logged when Safe Browsing is disabled. - SafeBrowsingState sb_state = GetSafeBrowsingState(*pref_service_); - if (sb_state == SafeBrowsingState::NO_SAFE_BROWSING) { return absl::nullopt; - } - - const absl::optional<Event> event = -- GetLatestEventFromEventTypeFilter(GetUserState(), event_type_filter); +- GetLatestEventFromEventType(GetUserState(), event_type); - return event ? absl::optional<base::Time>(event.value().timestamp) - : absl::nullopt; } absl::optional<base::Time> -@@ -240,55 +141,14 @@ SafeBrowsingMetricsCollector::GetLatestS + SafeBrowsingMetricsCollector::GetLatestSecuritySensitiveEventTimestamp() { +- std::vector<absl::optional<base::Time>> security_sensitive_event_times{ +- GetLatestEventTimestamp(SECURITY_SENSITIVE_SAFE_BROWSING_INTERSTITIAL), +- GetLatestEventTimestamp(SECURITY_SENSITIVE_SSL_INTERSTITIAL), +- GetLatestEventTimestamp(SECURITY_SENSITIVE_PASSWORD_PROTECTION), +- GetLatestEventTimestamp(SECURITY_SENSITIVE_DOWNLOAD)}; + absl::optional<base::Time> latest_event_time = absl::nullopt; +- for (absl::optional<base::Time> security_sensitive_event_time : +- security_sensitive_event_times) { +- if (!security_sensitive_event_time) { +- continue; +- } +- if (!latest_event_time || +- (latest_event_time.value() < security_sensitive_event_time.value())) { +- latest_event_time = security_sensitive_event_time; +- } +- } + return latest_event_time; + } + void SafeBrowsingMetricsCollector::AddSafeBrowsingEventAndUserStateToPref( UserState user_state, EventType event_type) { - DictionaryPrefUpdate update(pref_service_, - prefs::kSafeBrowsingEventTimestamps); -- base::Value* mutable_state_dict = update.Get(); +- base::DictionaryValue* mutable_state_dict = update.Get(); - - base::Value* event_dict = - mutable_state_dict->FindDictKey(UserStateToPrefKey(user_state)); @@ -4031,8 +4001,8 @@ - } - - // Remove the oldest timestamp if the length of the timestamps hits the limit. -- while (timestamps->GetListDeprecated().size() >= kTimestampsMaxLength) { -- timestamps->EraseListIter(timestamps->GetListDeprecated().begin()); +- while (timestamps->GetList().size() >= kTimestampsMaxLength) { +- timestamps->EraseListIter(timestamps->GetList().begin()); - } - - timestamps->Append(TimeToPrefValue(base::Time::Now())); @@ -4047,7 +4017,12 @@ - if (!pref_service_->GetBoolean(prefs::kSafeBrowsingEnhanced)) { - AddSafeBrowsingEventAndUserStateToPref(UserState::kEnhancedProtection, - EventType::USER_STATE_DISABLED); -- LogEnhancedProtectionDisabledMetrics(); +- int disabled_times_last_week = GetEventCountSince( +- UserState::kEnhancedProtection, EventType::USER_STATE_DISABLED, +- base::Time::Now() - base::Days(7)); +- if (disabled_times_last_week <= kEsbDisabledMetricsQuota) { +- LogEnhancedProtectionDisabledMetrics(); +- } - } else { - AddSafeBrowsingEventAndUserStateToPref(UserState::kEnhancedProtection, - EventType::USER_STATE_ENABLED); @@ -4056,7 +4031,7 @@ const base::Value* SafeBrowsingMetricsCollector::GetSafeBrowsingEventDictionary( UserState user_state) { -- const base::Value* state_dict = +- const base::DictionaryValue* state_dict = - pref_service_->GetDictionary(prefs::kSafeBrowsingEventTimestamps); - - return state_dict->FindDictKey(UserStateToPrefKey(user_state)); @@ -4064,7 +4039,7 @@ } absl::optional<SafeBrowsingMetricsCollector::Event> -@@ -449,20 +309,7 @@ int SafeBrowsingMetricsCollector::GetEve +@@ -370,20 +209,7 @@ int SafeBrowsingMetricsCollector::GetEve } UserState SafeBrowsingMetricsCollector::GetUserState() { @@ -4086,8 +4061,8 @@ } bool SafeBrowsingMetricsCollector::IsBypassEventType(const EventType& type) { ---- a/components/safe_browsing/core/common/BUILD.gn -+++ b/components/safe_browsing/core/common/BUILD.gn +--- components/safe_browsing/core/common/BUILD.gn.orig ++++ components/safe_browsing/core/common/BUILD.gn @@ -6,20 +6,8 @@ import("//build/config/features.gni") import("//components/safe_browsing/buildflags.gni") import("//mojo/public/tools/bindings/mojom.gni") @@ -4111,8 +4086,8 @@ } source_set("safe_browsing_policy_handler") { ---- a/components/safe_browsing/core/common/safe_browsing_policy_handler.cc -+++ b/components/safe_browsing/core/common/safe_browsing_policy_handler.cc +--- components/safe_browsing/core/common/safe_browsing_policy_handler.cc.orig ++++ components/safe_browsing/core/common/safe_browsing_policy_handler.cc @@ -11,7 +11,6 @@ #include "components/policy/policy_constants.h" #include "components/prefs/pref_service.h" @@ -4171,8 +4146,8 @@ DCHECK_EQ(is_safe_browsing_enabled_managed, is_safe_browsing_enhanced_managed); return is_safe_browsing_enabled_managed && is_safe_browsing_enhanced_managed; ---- a/components/safe_browsing/core/common/safe_browsing_prefs_unittest.cc -+++ b/components/safe_browsing/core/common/safe_browsing_prefs_unittest.cc +--- components/safe_browsing/core/common/safe_browsing_prefs_unittest.cc.orig ++++ components/safe_browsing/core/common/safe_browsing_prefs_unittest.cc @@ -12,7 +12,6 @@ #include "components/prefs/pref_registry_simple.h" #include "components/prefs/testing_pref_service.h" @@ -4181,8 +4156,8 @@ #include "testing/gtest/include/gtest/gtest.h" #include "url/gurl.h" ---- a/components/safety_check/safety_check.cc -+++ b/components/safety_check/safety_check.cc +--- components/safety_check/safety_check.cc.orig ++++ components/safety_check/safety_check.cc @@ -4,26 +4,9 @@ #include "components/safety_check/safety_check.h" @@ -4210,8 +4185,8 @@ return SafeBrowsingStatus::kDisabled; } ---- a/components/security_interstitials/content/bad_clock_blocking_page.cc -+++ b/components/security_interstitials/content/bad_clock_blocking_page.cc +--- components/security_interstitials/content/bad_clock_blocking_page.cc.orig ++++ components/security_interstitials/content/bad_clock_blocking_page.cc @@ -7,7 +7,6 @@ #include <utility> @@ -4220,8 +4195,8 @@ #include "components/security_interstitials/content/cert_report_helper.h" #include "components/security_interstitials/content/security_interstitial_controller_client.h" #include "components/security_interstitials/content/security_interstitial_page.h" ---- a/components/security_interstitials/content/captive_portal_blocking_page.cc -+++ b/components/security_interstitials/content/captive_portal_blocking_page.cc +--- components/security_interstitials/content/captive_portal_blocking_page.cc.orig ++++ components/security_interstitials/content/captive_portal_blocking_page.cc @@ -15,7 +15,6 @@ #include "build/build_config.h" #include "components/captive_portal/core/captive_portal_detector.h" @@ -4230,8 +4205,8 @@ #include "components/security_interstitials/content/cert_report_helper.h" #include "components/security_interstitials/content/security_interstitial_controller_client.h" #include "components/security_interstitials/content/ssl_cert_reporter.h" ---- a/components/security_interstitials/content/cert_report_helper.cc -+++ b/components/security_interstitials/content/cert_report_helper.cc +--- components/security_interstitials/content/cert_report_helper.cc.orig ++++ components/security_interstitials/content/cert_report_helper.cc @@ -14,7 +14,6 @@ #include "build/branding_buildflags.h" #include "build/build_config.h" @@ -4328,8 +4303,8 @@ } bool CertReportHelper::ShouldReportCertificateError() { ---- a/components/security_interstitials/content/mitm_software_blocking_page.cc -+++ b/components/security_interstitials/content/mitm_software_blocking_page.cc +--- components/security_interstitials/content/mitm_software_blocking_page.cc.orig ++++ components/security_interstitials/content/mitm_software_blocking_page.cc @@ -6,7 +6,6 @@ #include <utility> @@ -4338,8 +4313,8 @@ #include "components/security_interstitials/content/cert_report_helper.h" #include "components/security_interstitials/content/security_interstitial_controller_client.h" #include "components/security_interstitials/content/security_interstitial_page.h" ---- a/components/security_interstitials/content/security_interstitial_controller_client.cc -+++ b/components/security_interstitials/content/security_interstitial_controller_client.cc +--- components/security_interstitials/content/security_interstitial_controller_client.cc.orig ++++ components/security_interstitials/content/security_interstitial_controller_client.cc @@ -7,7 +7,6 @@ #include <utility> @@ -4347,8 +4322,8 @@ -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "components/security_interstitials/content/settings_page_helper.h" #include "components/security_interstitials/core/metrics_helper.h" - #include "content/public/browser/navigation_entry.h" -@@ -99,11 +98,6 @@ SecurityInterstitialControllerClient::Ge + #include "content/public/browser/web_contents.h" +@@ -98,11 +97,6 @@ SecurityInterstitialControllerClient::Ge return prefs_; } @@ -4360,19 +4335,19 @@ bool SecurityInterstitialControllerClient::CanLaunchDateAndTimeSettings() { NOTREACHED(); return false; ---- a/components/security_interstitials/content/security_interstitial_controller_client.h -+++ b/components/security_interstitials/content/security_interstitial_controller_client.h +--- components/security_interstitials/content/security_interstitial_controller_client.h.orig ++++ components/security_interstitials/content/security_interstitial_controller_client.h @@ -54,8 +54,6 @@ class SecurityInterstitialControllerClie bool CanGoBackBeforeNavigation() override; protected: - // security_interstitials::ControllerClient overrides. - const std::string GetExtendedReportingPrefName() const override; - raw_ptr<content::WebContents> web_contents_; + content::WebContents* web_contents_; private: ---- a/components/security_interstitials/content/security_interstitial_page.cc -+++ b/components/security_interstitials/content/security_interstitial_page.cc +--- components/security_interstitials/content/security_interstitial_page.cc.orig ++++ components/security_interstitials/content/security_interstitial_page.cc @@ -11,7 +11,6 @@ #include "base/values.h" #include "components/grit/components_resources.h" @@ -4413,8 +4388,8 @@ } std::u16string SecurityInterstitialPage::GetFormattedHostName() const { ---- a/components/security_interstitials/content/ssl_blocking_page.cc -+++ b/components/security_interstitials/content/ssl_blocking_page.cc +--- components/security_interstitials/content/ssl_blocking_page.cc.orig ++++ components/security_interstitials/content/ssl_blocking_page.cc @@ -12,7 +12,6 @@ #include "base/metrics/histogram_macros.h" #include "base/strings/string_number_conversions.h" @@ -4423,8 +4398,8 @@ #include "components/security_interstitials/content/cert_report_helper.h" #include "components/security_interstitials/content/security_interstitial_controller_client.h" #include "components/security_interstitials/content/security_interstitial_page.h" ---- a/components/security_interstitials/core/controller_client.cc -+++ b/components/security_interstitials/core/controller_client.cc +--- components/security_interstitials/core/controller_client.cc.orig ++++ components/security_interstitials/core/controller_client.cc @@ -36,7 +36,6 @@ MetricsHelper* ControllerClient::metrics void ControllerClient::SetReportingPreference(bool report) { @@ -4433,9 +4408,9 @@ metrics_helper_->RecordUserInteraction( report ? MetricsHelper::SET_EXTENDED_REPORTING_ENABLED : MetricsHelper::SET_EXTENDED_REPORTING_DISABLED); ---- a/components/security_interstitials/core/controller_client.h -+++ b/components/security_interstitials/core/controller_client.h -@@ -121,9 +121,6 @@ class ControllerClient { +--- components/security_interstitials/core/controller_client.h.orig ++++ components/security_interstitials/core/controller_client.h +@@ -122,9 +122,6 @@ class ControllerClient { void SetBaseHelpCenterUrlForTesting(const GURL& test_url); @@ -4445,8 +4420,8 @@ private: std::unique_ptr<MetricsHelper> metrics_helper_; // Link to the help center. ---- a/components/signin/core/browser/account_investigator.cc -+++ b/components/signin/core/browser/account_investigator.cc +--- components/signin/core/browser/account_investigator.cc.orig ++++ components/signin/core/browser/account_investigator.cc @@ -13,7 +13,6 @@ #include "components/prefs/pref_registry_simple.h" #include "components/prefs/pref_service.h" @@ -4521,8 +4496,8 @@ base::TimeDelta stable_age; if (!last_changed.is_null()) stable_age = std::max(now - last_changed, base::TimeDelta()); ---- a/components/signin/core/browser/account_investigator_unittest.cc -+++ b/components/signin/core/browser/account_investigator_unittest.cc +--- components/signin/core/browser/account_investigator_unittest.cc.orig ++++ components/signin/core/browser/account_investigator_unittest.cc @@ -12,7 +12,6 @@ #include "build/build_config.h" #include "components/prefs/pref_registry_simple.h" @@ -4531,8 +4506,8 @@ #include "components/signin/public/identity_manager/accounts_in_cookie_jar_info.h" #include "components/signin/public/identity_manager/identity_test_environment.h" #include "components/sync_preferences/testing_pref_service_syncable.h" ---- a/components/signin/core/browser/account_reconcilor_unittest.cc -+++ b/components/signin/core/browser/account_reconcilor_unittest.cc +--- components/signin/core/browser/account_reconcilor_unittest.cc.orig ++++ components/signin/core/browser/account_reconcilor_unittest.cc @@ -29,7 +29,6 @@ #include "components/signin/public/base/list_accounts_test_utils.h" #include "components/signin/public/base/signin_buildflags.h" @@ -4541,8 +4516,8 @@ #include "components/signin/public/base/test_signin_client.h" #include "components/signin/public/identity_manager/accounts_in_cookie_jar_info.h" #include "components/signin/public/identity_manager/identity_test_environment.h" ---- a/components/signin/core/browser/dice_account_reconcilor_delegate.cc -+++ b/components/signin/core/browser/dice_account_reconcilor_delegate.cc +--- components/signin/core/browser/dice_account_reconcilor_delegate.cc.orig ++++ components/signin/core/browser/dice_account_reconcilor_delegate.cc @@ -12,7 +12,6 @@ #include "base/ranges/algorithm.h" #include "components/prefs/pref_service.h" @@ -4551,8 +4526,8 @@ namespace signin { ---- a/components/signin/core/browser/dice_account_reconcilor_delegate_unittest.cc -+++ b/components/signin/core/browser/dice_account_reconcilor_delegate_unittest.cc +--- components/signin/core/browser/dice_account_reconcilor_delegate_unittest.cc.orig ++++ components/signin/core/browser/dice_account_reconcilor_delegate_unittest.cc @@ -8,7 +8,6 @@ #include "components/prefs/pref_registry_simple.h" @@ -4561,8 +4536,8 @@ #include "components/signin/public/base/test_signin_client.h" #include "components/sync_preferences/testing_pref_service_syncable.h" #include "google_apis/gaia/gaia_auth_util.h" ---- a/components/signin/core/browser/signin_investigator.cc -+++ b/components/signin/core/browser/signin_investigator.cc +--- components/signin/core/browser/signin_investigator.cc.orig ++++ components/signin/core/browser/signin_investigator.cc @@ -7,7 +7,6 @@ #include "base/check.h" #include "base/metrics/histogram_macros.h" @@ -4599,8 +4574,8 @@ scenario = InvestigatedScenario::kFirstSignIn; } else if (AreAccountsEqualWithFallback()) { scenario = InvestigatedScenario::kSameAccount; ---- a/components/signin/core/browser/signin_investigator_unittest.cc -+++ b/components/signin/core/browser/signin_investigator_unittest.cc +--- components/signin/core/browser/signin_investigator_unittest.cc.orig ++++ components/signin/core/browser/signin_investigator_unittest.cc @@ -9,7 +9,6 @@ #include "components/prefs/pref_registry_simple.h" #include "components/signin/core/browser/signin_investigator.h" @@ -4609,8 +4584,8 @@ #include "components/signin/public/identity_manager/identity_test_environment.h" #include "components/sync_preferences/testing_pref_service_syncable.h" #include "testing/gtest/include/gtest/gtest.h" ---- a/components/signin/internal/identity_manager/account_tracker_service.cc -+++ b/components/signin/internal/identity_manager/account_tracker_service.cc +--- components/signin/internal/identity_manager/account_tracker_service.cc.orig ++++ components/signin/internal/identity_manager/account_tracker_service.cc @@ -29,7 +29,6 @@ #include "components/prefs/scoped_user_pref_update.h" #include "components/signin/internal/identity_manager/account_capabilities_constants.h" @@ -4619,7 +4594,7 @@ #include "components/signin/public/base/signin_switches.h" #include "components/signin/public/identity_manager/account_capabilities.h" #include "components/signin/public/identity_manager/tribool.h" -@@ -160,9 +159,6 @@ AccountTrackerService::~AccountTrackerSe +@@ -152,9 +151,6 @@ AccountTrackerService::~AccountTrackerSe // static void AccountTrackerService::RegisterPrefs(PrefRegistrySimple* registry) { @@ -4629,7 +4604,7 @@ } void AccountTrackerService::Initialize(PrefService* pref_service, -@@ -463,14 +459,12 @@ AccountTrackerService::ComputeNewMigrati +@@ -455,14 +451,12 @@ AccountTrackerService::ComputeNewMigrati void AccountTrackerService::SetMigrationState(AccountIdMigrationState state) { DCHECK(state != MIGRATION_DONE || AreAllAccountsMigrated()); @@ -4645,7 +4620,7 @@ } base::FilePath AccountTrackerService::GetImagePathFor( -@@ -527,27 +521,6 @@ void AccountTrackerService::OnAccountIma +@@ -519,24 +513,7 @@ void AccountTrackerService::OnAccountIma const CoreAccountId& account_id, const std::string& image_url_with_size, bool success) { @@ -4654,15 +4629,12 @@ - - base::DictionaryValue* dict = nullptr; - ListPrefUpdate update(pref_service_, prefs::kAccountInfo); -- for (size_t i = 0; i < update->GetListDeprecated().size(); -- ++i, dict = nullptr) { -- base::Value& dict_value = update->GetListDeprecated()[i]; -- if (dict_value.is_dict()) { -- dict = static_cast<base::DictionaryValue*>(&dict_value); -- const std::string* account_key = dict->FindStringKey(kAccountKeyPath); -- if (account_key && *account_key == account_id.ToString()) { +- for (size_t i = 0; i < update->GetList().size(); ++i, dict = nullptr) { +- if (update->GetDictionary(i, &dict)) { +- std::string value; +- if (dict->GetString(kAccountKeyPath, &value) && +- value == account_id.ToString()) - break; -- } - } - } - @@ -4670,158 +4642,67 @@ - return; - } - dict->SetString(kLastDownloadedImageURLWithSizePath, image_url_with_size); ++ return; } void AccountTrackerService::RemoveAccountImageFromDisk( -@@ -559,162 +532,16 @@ void AccountTrackerService::RemoveAccoun +@@ -548,11 +525,10 @@ void AccountTrackerService::RemoveAccoun } void AccountTrackerService::LoadFromPrefs() { -- const base::Value* list = pref_service_->GetList(prefs::kAccountInfo); -- std::set<CoreAccountId> to_remove; -- for (size_t i = 0; i < list->GetListDeprecated().size(); ++i) { -- const base::Value& dict_value = list->GetListDeprecated()[i]; -- if (dict_value.is_dict()) { -- const base::DictionaryValue& dict = -- base::Value::AsDictionaryValue(dict_value); -- if (const std::string* account_key = -- dict.FindStringKey(kAccountKeyPath)) { -- // Ignore incorrectly persisted non-canonical account ids. -- if (account_key->find('@') != std::string::npos && -- *account_key != gaia::CanonicalizeEmail(*account_key)) { -- to_remove.insert(CoreAccountId::FromString(*account_key)); -- continue; -- } -- -- CoreAccountId account_id = CoreAccountId::FromString(*account_key); -- StartTrackingAccount(account_id); -- AccountInfo& account_info = accounts_[account_id]; -- -- GetString(dict, kAccountGaiaPath, account_info.gaia); -- GetString(dict, kAccountEmailPath, account_info.email); -- GetString(dict, kAccountHostedDomainPath, account_info.hosted_domain); -- GetString(dict, kAccountFullNamePath, account_info.full_name); -- GetString(dict, kAccountGivenNamePath, account_info.given_name); -- GetString(dict, kAccountLocalePath, account_info.locale); -- GetString(dict, kAccountPictureURLPath, account_info.picture_url); -- GetString(dict, kLastDownloadedImageURLWithSizePath, -- account_info.last_downloaded_image_url_with_size); -- -- if (absl::optional<bool> is_child_status = -- dict.FindBoolKey(kDeprecatedChildStatusPath)) { -- account_info.is_child_account = is_child_status.value() -- ? signin::Tribool::kTrue -- : signin::Tribool::kFalse; +- const base::ListValue* list = pref_service_->GetList(prefs::kAccountInfo); + std::set<CoreAccountId> to_remove; +- for (size_t i = 0; i < list->GetList().size(); ++i) { ++ for (size_t i = 0; false; ++i) { + const base::DictionaryValue* dict = nullptr; +- if (list->GetDictionary(i, &dict)) { ++ if (false) { + std::string value; + if (dict->GetString(kAccountKeyPath, &value)) { + // Ignore incorrectly persisted non-canonical account ids. +@@ -588,14 +564,6 @@ void AccountTrackerService::LoadFromPref + account_info.is_child_account = is_child_status.value() + ? signin::Tribool::kTrue + : signin::Tribool::kFalse; - // Migrate to kAccountChildAttributePath. - ListPrefUpdate update(pref_service_, prefs::kAccountInfo); -- base::Value* update_dict = &update->GetListDeprecated()[i]; -- DCHECK(update_dict->is_dict()); +- base::DictionaryValue* update_dict = nullptr; +- update->GetDictionary(i, &update_dict); +- DCHECK(update_dict); - SetAccountCapabilityPath(update_dict, kAccountChildAttributePath, - account_info.is_child_account); - update_dict->RemoveKey(kDeprecatedChildStatusPath); -- } else { -- account_info.is_child_account = -- FindAccountCapabilityPath(dict, kAccountChildAttributePath); -- } -- -- absl::optional<bool> is_under_advanced_protection = -- dict.FindBoolKey(kAdvancedProtectionAccountStatusPath); -- if (is_under_advanced_protection.has_value()) { -- account_info.is_under_advanced_protection = -- is_under_advanced_protection.value(); -- } -- -- switch (FindAccountCapabilityPath( -- dict, kCanOfferExtendedChromeSyncPromosCapabilityPrefsPath)) { -- case signin::Tribool::kUnknown: -- break; -- case signin::Tribool::kTrue: -- account_info.capabilities.set_can_offer_extended_chrome_sync_promos( -- true); -- break; -- case signin::Tribool::kFalse: -- account_info.capabilities.set_can_offer_extended_chrome_sync_promos( -- false); -- break; -- } -- -- if (!account_info.gaia.empty()) -- NotifyAccountUpdated(account_info); -- } -- } -- } -- -- // Remove any obsolete prefs. -- for (auto account_id : to_remove) { -- AccountInfo account_info; -- account_info.account_id = account_id; -- RemoveFromPrefs(account_info); -- RemoveAccountImageFromDisk(account_id); -- } -- -- if (GetMigrationState() != MIGRATION_DONE) { -- const AccountIdMigrationState new_state = ComputeNewMigrationState(); -- SetMigrationState(new_state); -- -- if (new_state == MIGRATION_IN_PROGRESS) { -- MigrateToGaiaId(); -- } -- } -- -- DCHECK(GetMigrationState() != MIGRATION_DONE || AreAllAccountsMigrated()); -- UMA_HISTOGRAM_ENUMERATION("Signin.AccountTracker.GaiaIdMigrationState", -- GetMigrationState(), NUM_MIGRATION_STATES); -- -- UMA_HISTOGRAM_COUNTS_100("Signin.AccountTracker.CountOfLoadedAccounts", -- accounts_.size()); + } else { + account_info.is_child_account = + FindAccountCapabilityPath(*dict, kAccountChildAttributePath); +@@ -654,13 +622,11 @@ void AccountTrackerService::LoadFromPref } void AccountTrackerService::SaveToPrefs(const AccountInfo& account_info) { - if (!pref_service_) - return; -- -- base::DictionaryValue* dict = nullptr; ++ return; + + base::DictionaryValue* dict = nullptr; - ListPrefUpdate update(pref_service_, prefs::kAccountInfo); -- for (size_t i = 0; i < update->GetListDeprecated().size(); -- ++i, dict = nullptr) { -- base::Value& dict_value = update->GetListDeprecated()[i]; -- if (dict_value.is_dict()) { -- dict = static_cast<base::DictionaryValue*>(&dict_value); -- const std::string* account_key = dict->FindStringKey(kAccountKeyPath); -- if (account_key && *account_key == account_info.account_id.ToString()) { -- break; -- } -- } -- } -- -- if (!dict) { -- update->Append(base::Value(base::Value::Type::DICTIONARY)); -- base::Value& dict_value = update->GetListDeprecated().back(); -- DCHECK(dict_value.is_dict()); -- dict = static_cast<base::DictionaryValue*>(&dict_value); -- dict->SetString(kAccountKeyPath, account_info.account_id.ToString()); -- } -- -- dict->SetString(kAccountEmailPath, account_info.email); -- dict->SetString(kAccountGaiaPath, account_info.gaia); -- dict->SetString(kAccountHostedDomainPath, account_info.hosted_domain); -- dict->SetString(kAccountFullNamePath, account_info.full_name); -- dict->SetString(kAccountGivenNamePath, account_info.given_name); -- dict->SetString(kAccountLocalePath, account_info.locale); -- dict->SetString(kAccountPictureURLPath, account_info.picture_url); -- SetAccountCapabilityPath(dict, kAccountChildAttributePath, -- account_info.is_child_account); -- dict->SetBoolean(kAdvancedProtectionAccountStatusPath, -- account_info.is_under_advanced_protection); -- // |kLastDownloadedImageURLWithSizePath| should only be set after the GAIA -- // picture is successufly saved to disk. Otherwise, there is no guarantee that -- // |kLastDownloadedImageURLWithSizePath| matches the picture on disk. -- SetAccountCapabilityPath( -- dict, kCanOfferExtendedChromeSyncPromosCapabilityPrefsPath, -- account_info.capabilities.can_offer_extended_chrome_sync_promos()); - } +- for (size_t i = 0; i < update->GetList().size(); ++i, dict = nullptr) { +- if (update->GetDictionary(i, &dict)) { ++ if (false) { ++ while (false) { + std::string value; + if (dict->GetString(kAccountKeyPath, &value) && + value == account_info.account_id.ToString()) +@@ -670,9 +636,6 @@ void AccountTrackerService::SaveToPrefs( + + if (!dict) { + dict = new base::DictionaryValue(); +- update->Append(base::WrapUnique(dict)); +- // |dict| is invalidated at this point, so it needs to be reset. +- update->GetDictionary(update->GetList().size() - 1, &dict); + dict->SetString(kAccountKeyPath, account_info.account_id.ToString()); + } - void AccountTrackerService::RemoveFromPrefs(const AccountInfo& account_info) { +@@ -699,14 +662,7 @@ void AccountTrackerService::RemoveFromPr if (!pref_service_) return; @@ -4836,9 +4717,9 @@ } CoreAccountId AccountTrackerService::PickAccountIdForAccount( ---- a/components/signin/internal/identity_manager/account_tracker_service.h -+++ b/components/signin/internal/identity_manager/account_tracker_service.h -@@ -235,6 +235,8 @@ class AccountTrackerService { +--- components/signin/internal/identity_manager/account_tracker_service.h.orig ++++ components/signin/internal/identity_manager/account_tracker_service.h +@@ -236,6 +236,8 @@ class AccountTrackerService { AccountInfoCallback on_account_updated_callback_; AccountInfoCallback on_account_removed_callback_; @@ -4847,8 +4728,8 @@ // Task runner used for file operations on avatar images. scoped_refptr<base::SequencedTaskRunner> image_storage_task_runner_; ---- a/components/signin/internal/identity_manager/account_tracker_service_unittest.cc -+++ b/components/signin/internal/identity_manager/account_tracker_service_unittest.cc +--- components/signin/internal/identity_manager/account_tracker_service_unittest.cc.orig ++++ components/signin/internal/identity_manager/account_tracker_service_unittest.cc @@ -26,7 +26,6 @@ #include "components/signin/internal/identity_manager/account_tracker_service.h" #include "components/signin/internal/identity_manager/fake_profile_oauth2_token_service.h" @@ -4857,8 +4738,8 @@ #include "components/signin/public/base/signin_switches.h" #include "components/signin/public/base/test_signin_client.h" #include "components/signin/public/identity_manager/account_capabilities.h" ---- a/components/signin/internal/identity_manager/gaia_cookie_manager_service.cc -+++ b/components/signin/internal/identity_manager/gaia_cookie_manager_service.cc +--- components/signin/internal/identity_manager/gaia_cookie_manager_service.cc.orig ++++ components/signin/internal/identity_manager/gaia_cookie_manager_service.cc @@ -29,7 +29,6 @@ #include "components/signin/internal/identity_manager/ubertoken_fetcher_impl.h" #include "components/signin/public/base/signin_buildflags.h" @@ -4867,7 +4748,7 @@ #include "components/signin/public/identity_manager/set_accounts_in_cookie_result.h" #include "google_apis/gaia/gaia_constants.h" #include "google_apis/gaia/gaia_urls.h" -@@ -451,9 +450,7 @@ GaiaCookieManagerService::GaiaCookieMana +@@ -456,9 +455,7 @@ GaiaCookieManagerService::GaiaCookieMana listAccountsUnexpectedServerResponseRetried_(false), external_cc_result_fetched_(false), list_accounts_stale_(true) { @@ -4878,7 +4759,7 @@ if (!gaia_cookie_last_list_accounts_data.empty()) { if (!gaia::ParseListAccountsData(gaia_cookie_last_list_accounts_data, -@@ -477,8 +474,6 @@ GaiaCookieManagerService::~GaiaCookieMan +@@ -482,8 +479,6 @@ GaiaCookieManagerService::~GaiaCookieMan // static void GaiaCookieManagerService::RegisterPrefs(PrefRegistrySimple* registry) { @@ -4887,7 +4768,7 @@ } void GaiaCookieManagerService::InitCookieListener() { -@@ -896,16 +891,12 @@ void GaiaCookieManagerService::OnListAcc +@@ -906,16 +901,12 @@ void GaiaCookieManagerService::OnListAcc &signed_out_accounts_)) { listed_accounts_.clear(); signed_out_accounts_.clear(); @@ -4904,9 +4785,9 @@ RecordListAccountsFailure(GoogleServiceAuthError::NONE); InitializeListedAccountsIds(); ---- a/components/signin/internal/identity_manager/gaia_cookie_manager_service_unittest.cc -+++ b/components/signin/internal/identity_manager/gaia_cookie_manager_service_unittest.cc -@@ -24,7 +24,6 @@ +--- components/signin/internal/identity_manager/gaia_cookie_manager_service_unittest.cc.orig ++++ components/signin/internal/identity_manager/gaia_cookie_manager_service_unittest.cc +@@ -25,7 +25,6 @@ #include "components/prefs/testing_pref_service.h" #include "components/signin/internal/identity_manager/account_tracker_service.h" #include "components/signin/internal/identity_manager/fake_profile_oauth2_token_service.h" @@ -4914,8 +4795,8 @@ #include "components/signin/public/base/test_signin_client.h" #include "google_apis/gaia/gaia_constants.h" #include "google_apis/gaia/gaia_urls.h" ---- a/components/signin/internal/identity_manager/mutable_profile_oauth2_token_service_delegate.cc -+++ b/components/signin/internal/identity_manager/mutable_profile_oauth2_token_service_delegate.cc +--- components/signin/internal/identity_manager/mutable_profile_oauth2_token_service_delegate.cc.orig ++++ components/signin/internal/identity_manager/mutable_profile_oauth2_token_service_delegate.cc @@ -17,7 +17,6 @@ #include "components/prefs/pref_service.h" #include "components/signin/public/base/signin_client.h" @@ -4970,8 +4851,8 @@ - client_->GetPrefs()->SetBoolean(prefs::kTokenServiceDiceCompatible, true); } } ---- a/components/signin/internal/identity_manager/mutable_profile_oauth2_token_service_delegate_unittest.cc -+++ b/components/signin/internal/identity_manager/mutable_profile_oauth2_token_service_delegate_unittest.cc +--- components/signin/internal/identity_manager/mutable_profile_oauth2_token_service_delegate_unittest.cc.orig ++++ components/signin/internal/identity_manager/mutable_profile_oauth2_token_service_delegate_unittest.cc @@ -25,7 +25,6 @@ #include "components/signin/internal/identity_manager/profile_oauth2_token_service.h" #include "components/signin/public/base/account_consistency_method.h" @@ -4980,8 +4861,8 @@ #include "components/signin/public/base/test_signin_client.h" #include "components/signin/public/identity_manager/account_info.h" #include "components/signin/public/webdata/token_web_data.h" ---- a/components/signin/internal/identity_manager/primary_account_manager.cc -+++ b/components/signin/internal/identity_manager/primary_account_manager.cc +--- components/signin/internal/identity_manager/primary_account_manager.cc.orig ++++ components/signin/internal/identity_manager/primary_account_manager.cc @@ -22,7 +22,6 @@ #include "components/signin/public/base/account_consistency_method.h" #include "components/signin/public/base/signin_client.h" @@ -5056,7 +4937,7 @@ CoreAccountId account_id = CoreAccountId::FromString(pref_account_id); CoreAccountInfo account_info = account_tracker_service_->GetAccountInfo(account_id); -@@ -182,8 +148,7 @@ void PrimaryAccountManager::SetSyncPrima +@@ -166,8 +132,7 @@ void PrimaryAccountManager::SetSyncPrima #if DCHECK_IS_ON() { @@ -5066,7 +4947,7 @@ bool consented_to_sync = client_->GetPrefs()->GetBoolean(prefs::kGoogleServicesConsentedToSync); -@@ -199,10 +164,6 @@ void PrimaryAccountManager::SetSyncPrima +@@ -183,10 +148,6 @@ void PrimaryAccountManager::SetSyncPrima // Go ahead and update the last signed in account info here as well. Once a // user is signed in the corresponding preferences should match. Doing it here // as opposed to on signin allows us to catch the upgrade scenario. @@ -5077,7 +4958,7 @@ // Commit primary sync account info immediately so that it does not get lost // if Chrome crashes before the next commit interval. -@@ -216,20 +177,11 @@ void PrimaryAccountManager::SetPrimaryAc +@@ -200,20 +161,11 @@ void PrimaryAccountManager::SetPrimaryAc PrefService* prefs = client_->GetPrefs(); const std::string& account_id = primary_account_info_.account_id.ToString(); @@ -5099,9 +4980,9 @@ if (primary_account_info().account_id.empty()) { DCHECK(!consented_pref); return false; ---- a/components/signin/internal/identity_manager/primary_account_manager_unittest.cc -+++ b/components/signin/internal/identity_manager/primary_account_manager_unittest.cc -@@ -25,7 +25,6 @@ +--- components/signin/internal/identity_manager/primary_account_manager_unittest.cc.orig ++++ components/signin/internal/identity_manager/primary_account_manager_unittest.cc +@@ -24,7 +24,6 @@ #include "components/signin/internal/identity_manager/fake_profile_oauth2_token_service_delegate.h" #include "components/signin/internal/identity_manager/primary_account_policy_manager.h" #include "components/signin/internal/identity_manager/profile_oauth2_token_service.h" @@ -5109,8 +4990,8 @@ #include "components/signin/public/base/signin_switches.h" #include "components/signin/public/base/test_signin_client.h" #include "components/sync_preferences/testing_pref_service_syncable.h" ---- a/components/signin/internal/identity_manager/primary_account_mutator_impl.cc -+++ b/components/signin/internal/identity_manager/primary_account_mutator_impl.cc +--- components/signin/internal/identity_manager/primary_account_mutator_impl.cc.orig ++++ components/signin/internal/identity_manager/primary_account_mutator_impl.cc @@ -14,7 +14,6 @@ #include "components/signin/internal/identity_manager/profile_oauth2_token_service.h" #include "components/signin/public/base/signin_buildflags.h" @@ -5128,8 +5009,8 @@ #if BUILDFLAG(IS_CHROMEOS_LACROS) // Check that `prefs::kSigninAllowed` has not been set to false in a context // where Lacros wants to set a Primary Account. Lacros doesn't offer account ---- a/components/signin/internal/identity_manager/primary_account_policy_manager_impl.cc -+++ b/components/signin/internal/identity_manager/primary_account_policy_manager_impl.cc +--- components/signin/internal/identity_manager/primary_account_policy_manager_impl.cc.orig ++++ components/signin/internal/identity_manager/primary_account_policy_manager_impl.cc @@ -10,7 +10,6 @@ #include "components/signin/internal/identity_manager/primary_account_manager.h" #include "components/signin/public/base/signin_client.h" @@ -5157,8 +5038,8 @@ CoreAccountInfo account_info = primary_account_manager->GetPrimaryAccountInfo( signin::ConsentLevel::kSync); ---- a/components/signin/internal/identity_manager/primary_account_policy_manager_impl.h -+++ b/components/signin/internal/identity_manager/primary_account_policy_manager_impl.h +--- components/signin/internal/identity_manager/primary_account_policy_manager_impl.h.orig ++++ components/signin/internal/identity_manager/primary_account_policy_manager_impl.h @@ -56,9 +56,6 @@ class PrimaryAccountPolicyManagerImpl : // profile-specific local prefs (like kGoogleServicesUsernamePattern). PrefChangeRegistrar local_state_pref_registrar_; @@ -5169,8 +5050,8 @@ base::WeakPtrFactory<PrimaryAccountPolicyManagerImpl> weak_pointer_factory_{ this}; }; ---- a/components/signin/internal/identity_manager/primary_account_policy_manager_impl_unittest.cc -+++ b/components/signin/internal/identity_manager/primary_account_policy_manager_impl_unittest.cc +--- components/signin/internal/identity_manager/primary_account_policy_manager_impl_unittest.cc.orig ++++ components/signin/internal/identity_manager/primary_account_policy_manager_impl_unittest.cc @@ -15,7 +15,6 @@ #include "components/signin/internal/identity_manager/primary_account_policy_manager_impl.h" #include "components/signin/internal/identity_manager/profile_oauth2_token_service.h" @@ -5179,8 +5060,8 @@ #include "components/signin/public/base/test_signin_client.h" #include "components/sync_preferences/testing_pref_service_syncable.h" #include "testing/gtest/include/gtest/gtest.h" ---- a/components/signin/internal/identity_manager/profile_oauth2_token_service.cc -+++ b/components/signin/internal/identity_manager/profile_oauth2_token_service.cc +--- components/signin/internal/identity_manager/profile_oauth2_token_service.cc.orig ++++ components/signin/internal/identity_manager/profile_oauth2_token_service.cc @@ -12,7 +12,6 @@ #include "components/prefs/pref_registry_simple.h" #include "components/signin/internal/identity_manager/profile_oauth2_token_service_delegate.h" @@ -5198,9 +5079,9 @@ } ProfileOAuth2TokenServiceDelegate* ProfileOAuth2TokenService::GetDelegate() { ---- a/components/signin/internal/identity_manager/profile_oauth2_token_service_delegate_chromeos_unittest.cc -+++ b/components/signin/internal/identity_manager/profile_oauth2_token_service_delegate_chromeos_unittest.cc -@@ -24,7 +24,6 @@ +--- components/signin/internal/identity_manager/profile_oauth2_token_service_delegate_chromeos_unittest.cc.orig ++++ components/signin/internal/identity_manager/profile_oauth2_token_service_delegate_chromeos_unittest.cc +@@ -25,7 +25,6 @@ #include "components/account_manager_core/mock_account_manager_facade.h" #include "components/signin/internal/identity_manager/account_tracker_service.h" #include "components/signin/internal/identity_manager/profile_oauth2_token_service_observer.h" @@ -5208,9 +5089,9 @@ #include "components/signin/public/base/test_signin_client.h" #include "components/signin/public/identity_manager/account_info.h" #include "components/sync_preferences/testing_pref_service_syncable.h" ---- a/components/signin/public/base/BUILD.gn -+++ b/components/signin/public/base/BUILD.gn -@@ -35,8 +35,6 @@ static_library("base") { +--- components/signin/public/base/BUILD.gn.orig ++++ components/signin/public/base/BUILD.gn +@@ -34,8 +34,6 @@ static_library("base") { "signin_client.h", "signin_metrics.cc", "signin_metrics.h", @@ -5219,8 +5100,8 @@ "signin_switches.cc", "signin_switches.h", ] ---- a/components/signin/public/base/device_id_helper.cc -+++ b/components/signin/public/base/device_id_helper.cc +--- components/signin/public/base/device_id_helper.cc.orig ++++ components/signin/public/base/device_id_helper.cc @@ -9,7 +9,6 @@ #include "base/guid.h" #include "build/chromeos_buildflags.h" @@ -5265,8 +5146,8 @@ } #endif ---- a/components/signin/public/base/device_id_helper_unittest.cc -+++ b/components/signin/public/base/device_id_helper_unittest.cc +--- components/signin/public/base/device_id_helper_unittest.cc.orig ++++ components/signin/public/base/device_id_helper_unittest.cc @@ -8,7 +8,6 @@ #include "build/build_config.h" @@ -5316,8 +5197,8 @@ } #endif ---- a/components/signin/public/identity_manager/identity_utils.cc -+++ b/components/signin/public/identity_manager/identity_utils.cc +--- components/signin/public/identity_manager/identity_utils.cc.orig ++++ components/signin/public/identity_manager/identity_utils.cc @@ -11,7 +11,6 @@ #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" @@ -5336,8 +5217,8 @@ } } // namespace signin ---- a/components/signin/public/identity_manager/identity_utils_unittest.cc -+++ b/components/signin/public/identity_manager/identity_utils_unittest.cc +--- components/signin/public/identity_manager/identity_utils_unittest.cc.orig ++++ components/signin/public/identity_manager/identity_utils_unittest.cc @@ -7,7 +7,6 @@ #include "components/prefs/pref_registry_simple.h" #include "components/prefs/pref_service.h" @@ -5346,19 +5227,19 @@ #include "testing/gtest/include/gtest/gtest.h" namespace { ---- a/components/signin/public/identity_manager/primary_account_mutator_unittest.cc -+++ b/components/signin/public/identity_manager/primary_account_mutator_unittest.cc -@@ -16,7 +16,6 @@ - #include "components/signin/public/base/consent_level.h" +--- components/signin/public/identity_manager/primary_account_mutator_unittest.cc.orig ++++ components/signin/public/identity_manager/primary_account_mutator_unittest.cc +@@ -15,7 +15,6 @@ + #include "build/chromeos_buildflags.h" #include "components/signin/public/base/signin_buildflags.h" #include "components/signin/public/base/signin_metrics.h" -#include "components/signin/public/base/signin_pref_names.h" + #include "components/signin/public/identity_manager/consent_level.h" #include "components/signin/public/identity_manager/identity_test_environment.h" #include "components/signin/public/identity_manager/identity_test_utils.h" - #include "components/sync_preferences/testing_pref_service_syncable.h" ---- a/tools/metrics/histograms/enums.xml -+++ b/tools/metrics/histograms/enums.xml -@@ -88989,7 +88989,6 @@ Full version information for the fingerp +--- tools/metrics/histograms/enums.xml.orig ++++ tools/metrics/histograms/enums.xml +@@ -83754,7 +83754,6 @@ Full version information for the fingerp <int value="3" label="kRestoreOnStartup"/> <int value="4" label="kURLsToRestoreOnStartup"/> <int value="5" label="extensions::pref_names::kExtensions"/> @@ -5366,7 +5247,7 @@ <int value="7" label="kSearchProviderOverrides"/> <int value="8" label="kDefaultSearchProviderSearchURL (Obsolete 12/2016)"/> <int value="9" label="kDefaultSearchProviderKeyword (Obsolete 12/2016)"/> -@@ -89004,10 +89003,7 @@ Full version information for the fingerp +@@ -83769,10 +83768,7 @@ Full version information for the fingerp <int value="18" label="kSafeBrowsingIncidentsSent"/> <int value="19" label="kSwReporterPromptVersion"/> <int value="20" label="kSwReporterPromptReason"/> diff --git a/www/chromium-uc/patches/core/ungoogled-chromium/replace-google-search-engine-with-nosearch.patch b/www/chromium-uc/patches/core/ungoogled-chromium/replace-google-search-engine-with-nosearch.patch @@ -1,5 +1,5 @@ ---- a/components/search_engines/prepopulated_engines.json -+++ b/components/search_engines/prepopulated_engines.json +--- components/search_engines/prepopulated_engines.json.orig ++++ components/search_engines/prepopulated_engines.json @@ -113,21 +113,11 @@ }, @@ -8,7 +8,7 @@ - "keyword": "google.com", - "favicon_url": "https://www.google.com/images/branding/product/ico/googleg_lodp.ico", - "search_url": "{google:baseURL}search?q={searchTerms}&{google:RLZ}{google:originalQueryForSuggestion}{google:assistedQueryStats}{google:searchFieldtrialParameter}{google:iOSSearchLanguage}{google:prefetchSource}{google:searchClient}{google:sourceId}{google:contextualSearchVersion}ie={inputEncoding}", -- "suggest_url": "{google:baseSuggestURL}search?{google:searchFieldtrialParameter}client={google:suggestClient}&gs_ri={google:suggestRid}&xssi=t&q={searchTerms}&{google:inputType}{google:omniboxFocusType}{google:cursorPosition}{google:currentPageUrl}{google:pageClassification}{google:clientCacheTimeToLive}{google:searchVersion}{google:sessionToken}{google:prefetchQuery}sugkey={google:suggestAPIKeyParameter}", +- "suggest_url": "{google:baseSuggestURL}search?{google:searchFieldtrialParameter}client={google:suggestClient}&gs_ri={google:suggestRid}&xssi=t&q={searchTerms}&{google:inputType}{google:omniboxFocusType}{google:cursorPosition}{google:currentPageUrl}{google:pageClassification}{google:searchVersion}{google:sessionToken}{google:prefetchQuery}sugkey={google:suggestAPIKeyParameter}", - "image_url": "{google:baseSearchByImageURL}upload", - "contextual_search_url": "{google:baseURL}_/contextualsearch?{google:contextualSearchVersion}{google:contextualSearchContextData}", - "image_url_post_params": "encoded_image={google:imageThumbnail},image_url={google:imageURL},sbisrc={google:imageSearchSource},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight}", diff --git a/www/chromium-uc/patches/core/ungoogled-chromium/toggle-translation-via-switch.patch b/www/chromium-uc/patches/core/ungoogled-chromium/toggle-translation-via-switch.patch @@ -1,7 +1,7 @@ # Disables translation and removes the "Translate to" context menu when --translate-script-url flag is not set ---- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc -+++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc -@@ -135,6 +135,7 @@ +--- chrome/browser/renderer_context_menu/render_view_context_menu.cc.orig ++++ chrome/browser/renderer_context_menu/render_view_context_menu.cc +@@ -133,6 +133,7 @@ #include "components/spellcheck/common/spellcheck_common.h" #include "components/spellcheck/spellcheck_buildflags.h" #include "components/strings/grit/components_strings.h" @@ -9,7 +9,7 @@ #include "components/translate/core/browser/translate_download_manager.h" #include "components/translate/core/browser/translate_manager.h" #include "components/translate/core/browser/translate_prefs.h" -@@ -1725,6 +1726,8 @@ void RenderViewContextMenu::AppendPageIt +@@ -1751,6 +1752,8 @@ void RenderViewContextMenu::AppendPageIt menu_model_.AddSeparator(ui::NORMAL_SEPARATOR); } @@ -18,7 +18,7 @@ ChromeTranslateClient* chrome_translate_client = ChromeTranslateClient::FromWebContents(embedder_web_contents_); const bool canTranslate = -@@ -1746,6 +1749,7 @@ void RenderViewContextMenu::AppendPageIt +@@ -1772,6 +1775,7 @@ void RenderViewContextMenu::AppendPageIt IDC_CONTENT_CONTEXT_TRANSLATE, l10n_util::GetStringFUTF16(IDS_CONTENT_CONTEXT_TRANSLATE, language)); } @@ -26,8 +26,8 @@ } void RenderViewContextMenu::AppendExitFullscreenItem() { ---- a/components/translate/core/browser/translate_language_list.cc -+++ b/components/translate/core/browser/translate_language_list.cc +--- components/translate/core/browser/translate_language_list.cc.orig ++++ components/translate/core/browser/translate_language_list.cc @@ -11,6 +11,7 @@ #include "base/bind.h" @@ -54,9 +54,9 @@ // If resource requests are not allowed, we'll get a callback when they are. if (!resource_requests_allowed_) { request_pending_ = true; ---- a/components/translate/core/browser/translate_manager.cc -+++ b/components/translate/core/browser/translate_manager.cc -@@ -880,8 +880,9 @@ void TranslateManager::FilterIsTranslate +--- components/translate/core/browser/translate_manager.cc.orig ++++ components/translate/core/browser/translate_manager.cc +@@ -887,8 +887,9 @@ void TranslateManager::FilterIsTranslate ->LogAutofillAssistantDeferredTriggerDecision(); } @@ -68,8 +68,8 @@ // Without an API key, translate won't work, so don't offer to translate in // the first place. Leave kOfferTranslateEnabled on, though, because that // settings syncs and we don't want to turn off translate everywhere else. ---- a/components/translate/core/browser/translate_ranker_impl.cc -+++ b/components/translate/core/browser/translate_ranker_impl.cc +--- components/translate/core/browser/translate_ranker_impl.cc.orig ++++ components/translate/core/browser/translate_ranker_impl.cc @@ -156,12 +156,9 @@ TranslateRankerImpl::TranslateRankerImpl ukm::UkmRecorder* ukm_recorder) : ukm_recorder_(ukm_recorder), @@ -95,8 +95,8 @@ translate_event->set_ranker_request_timestamp_sec( (base::TimeTicks::Now() - base::TimeTicks()).InSeconds()); translate_event->set_ranker_version(GetModelVersion()); ---- a/components/translate/core/browser/translate_script.cc -+++ b/components/translate/core/browser/translate_script.cc +--- components/translate/core/browser/translate_script.cc.orig ++++ components/translate/core/browser/translate_script.cc @@ -137,8 +137,13 @@ void TranslateScript::OnScriptFetchCompl server_params.c_str()); diff --git a/www/chromium-uc/patches/extra/bromite/fingerprinting-flags-client-rects-and-measuretext.patch b/www/chromium-uc/patches/extra/bromite/fingerprinting-flags-client-rects-and-measuretext.patch @@ -7,9 +7,9 @@ # # Unlike the latest Bromite patch, it was chosen to not regenerate the noise value each time the value is read to prevent potential efficiency issues with the load on the RNG. ---- a/chrome/browser/BUILD.gn -+++ b/chrome/browser/BUILD.gn -@@ -2350,6 +2350,7 @@ static_library("browser") { +--- chrome/browser/BUILD.gn.orig ++++ chrome/browser/BUILD.gn +@@ -2370,6 +2370,7 @@ static_library("browser") { "//third_party/libyuv", "//third_party/metrics_proto", "//third_party/re2", @@ -17,9 +17,9 @@ "//third_party/webrtc_overrides:webrtc_component", "//third_party/widevine/cdm:buildflags", "//third_party/widevine/cdm:headers", ---- a/chrome/browser/about_flags.cc -+++ b/chrome/browser/about_flags.cc -@@ -150,6 +150,7 @@ +--- chrome/browser/about_flags.cc.orig ++++ chrome/browser/about_flags.cc +@@ -151,6 +151,7 @@ #include "components/translate/core/browser/translate_ranker_impl.h" #include "components/translate/core/common/translate_util.h" #include "components/ui_devtools/switches.h" @@ -27,8 +27,8 @@ #include "components/version_info/version_info.h" #include "components/viz/common/features.h" #include "components/viz/common/switches.h" ---- a/chrome/browser/bromite_flag_entries.h -+++ b/chrome/browser/bromite_flag_entries.h +--- chrome/browser/bromite_flag_entries.h.orig ++++ chrome/browser/bromite_flag_entries.h @@ -4,4 +4,12 @@ #ifndef CHROME_BROWSER_BROMITE_FLAG_ENTRIES_H_ @@ -42,9 +42,9 @@ + "Scale the output values of Canvas::measureText() with a randomly selected factor in the range -0.0003% to 0.0003%, which are recomputed on every document initialization. ungoogled-chromium flag, Bromite feature.", + kOsAll, SINGLE_VALUE_TYPE(switches::kFingerprintingCanvasMeasureTextNoise)}, #endif // CHROME_BROWSER_BROMITE_FLAG_ENTRIES_H_ ---- a/content/browser/BUILD.gn -+++ b/content/browser/BUILD.gn -@@ -226,6 +226,7 @@ source_set("browser") { +--- content/browser/BUILD.gn.orig ++++ content/browser/BUILD.gn +@@ -222,6 +222,7 @@ source_set("browser") { "//third_party/libyuv", "//third_party/re2", "//third_party/sqlite", @@ -52,9 +52,9 @@ "//third_party/webrtc_overrides:webrtc_component", "//third_party/wtl", "//third_party/zlib", ---- a/content/browser/renderer_host/render_process_host_impl.cc -+++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -74,6 +74,7 @@ +--- content/browser/renderer_host/render_process_host_impl.cc.orig ++++ content/browser/renderer_host/render_process_host_impl.cc +@@ -68,6 +68,7 @@ #include "components/services/storage/public/mojom/cache_storage_control.mojom.h" #include "components/services/storage/public/mojom/indexed_db_control.mojom.h" #include "components/tracing/common/tracing_switches.h" @@ -62,7 +62,7 @@ #include "components/viz/common/switches.h" #include "components/viz/host/gpu_client.h" #include "content/browser/bad_message.h" -@@ -3363,6 +3364,8 @@ void RenderProcessHostImpl::PropagateBro +@@ -3465,6 +3466,8 @@ void RenderProcessHostImpl::PropagateBro switches::kEnableWebGLDraftExtensions, switches::kEnableWebGLImageChromium, switches::kFileUrlPathAlias, @@ -71,8 +71,8 @@ switches::kForceDeviceScaleFactor, switches::kForceDisplayColorProfile, switches::kForceGpuMemAvailableMb, ---- a/content/child/BUILD.gn -+++ b/content/child/BUILD.gn +--- content/child/BUILD.gn.orig ++++ content/child/BUILD.gn @@ -103,6 +103,7 @@ target(link_target_type, "child") { "//third_party/blink/public/common", "//third_party/blink/public/strings", @@ -81,9 +81,9 @@ "//third_party/zlib/google:compression_utils", "//ui/base", "//ui/events/blink", ---- a/content/child/runtime_features.cc -+++ b/content/child/runtime_features.cc -@@ -32,6 +32,7 @@ +--- content/child/runtime_features.cc.orig ++++ content/child/runtime_features.cc +@@ -31,6 +31,7 @@ #include "third_party/blink/public/common/loader/referrer_utils.h" #include "third_party/blink/public/common/switches.h" #include "third_party/blink/public/platform/web_runtime_features.h" @@ -91,10 +91,10 @@ #include "ui/accessibility/accessibility_features.h" #include "ui/base/ui_base_features.h" #include "ui/events/blink/blink_features.h" -@@ -486,6 +487,10 @@ void SetRuntimeFeaturesFromCommandLine(c +@@ -466,6 +467,10 @@ void SetRuntimeFeaturesFromCommandLine(c + {wrf::EnableWebGPU, switches::kEnableUnsafeWebGPU, true}, {wrf::ForceOverlayFullscreenVideo, switches::kForceOverlayFullscreenVideo, true}, - {wrf::EnableDirectSockets, switches::kRestrictedApiOrigins, false}, + {wrf::EnableFingerprintingClientRectsNoise, + switches::kFingerprintingClientRectsNoise, true}, + {wrf::EnableFingerprintingCanvasMeasureTextNoise, @@ -102,9 +102,9 @@ }; for (const auto& mapping : switchToFeatureMapping) { if (command_line.HasSwitch(mapping.switch_name)) ---- a/third_party/blink/public/platform/web_runtime_features.h -+++ b/third_party/blink/public/platform/web_runtime_features.h -@@ -212,6 +212,8 @@ class WebRuntimeFeatures { +--- third_party/blink/public/platform/web_runtime_features.h.orig ++++ third_party/blink/public/platform/web_runtime_features.h +@@ -218,6 +218,8 @@ class WebRuntimeFeatures { BLINK_PLATFORM_EXPORT static void EnableMediaControlsExpandGesture(bool); BLINK_PLATFORM_EXPORT static void EnableGetDisplayMedia(bool); BLINK_PLATFORM_EXPORT static void EnableAllowSyncXHRInPageDismissal(bool); @@ -113,8 +113,8 @@ BLINK_PLATFORM_EXPORT static void EnableSignedExchangeSubresourcePrefetch( bool); BLINK_PLATFORM_EXPORT static void EnableSubresourceWebBundles(bool); ---- a/third_party/blink/renderer/core/dom/document.cc -+++ b/third_party/blink/renderer/core/dom/document.cc +--- third_party/blink/renderer/core/dom/document.cc.orig ++++ third_party/blink/renderer/core/dom/document.cc @@ -42,6 +42,7 @@ #include "base/containers/contains.h" #include "base/debug/dump_without_crashing.h" @@ -123,7 +123,7 @@ #include "base/time/time.h" #include "cc/input/overscroll_behavior.h" #include "cc/input/scroll_snap_data.h" -@@ -871,6 +872,14 @@ Range* Document::CreateRangeAdjustedToTr +@@ -855,6 +856,14 @@ Range* Document::CreateRangeAdjustedToTr Position::BeforeNode(*shadow_host)); } @@ -138,7 +138,7 @@ SelectorQueryCache& Document::GetSelectorQueryCache() { if (!selector_query_cache_) selector_query_cache_ = std::make_unique<SelectorQueryCache>(); -@@ -2166,6 +2175,15 @@ void Document::UpdateStyleAndLayoutTreeF +@@ -2145,6 +2154,15 @@ void Document::UpdateStyleAndLayoutTreeF #if DCHECK_IS_ON() AssertLayoutTreeUpdated(*this, true /* allow_dirty_container_subtrees */); #endif @@ -154,9 +154,9 @@ } void Document::InvalidateStyleAndLayoutForFontUpdates() { ---- a/third_party/blink/renderer/core/dom/document.h -+++ b/third_party/blink/renderer/core/dom/document.h -@@ -478,6 +478,10 @@ class CORE_EXPORT Document : public Cont +--- third_party/blink/renderer/core/dom/document.h.orig ++++ third_party/blink/renderer/core/dom/document.h +@@ -456,6 +456,10 @@ class CORE_EXPORT Document : public Cont has_xml_declaration_ = has_xml_declaration ? 1 : 0; } @@ -167,7 +167,7 @@ AtomicString visibilityState() const; bool IsPageVisible() const; bool hidden() const; -@@ -2137,6 +2141,9 @@ class CORE_EXPORT Document : public Cont +@@ -2078,6 +2082,9 @@ class CORE_EXPORT Document : public Cont base::ElapsedTimer start_time_; @@ -177,38 +177,38 @@ Member<ScriptRunner> script_runner_; HeapVector<Member<ScriptElementBase>> current_script_stack_; ---- a/third_party/blink/renderer/core/dom/element.cc -+++ b/third_party/blink/renderer/core/dom/element.cc -@@ -2090,6 +2090,11 @@ DOMRectList* Element::getClientRects() { +--- third_party/blink/renderer/core/dom/element.cc.orig ++++ third_party/blink/renderer/core/dom/element.cc +@@ -2114,6 +2114,11 @@ DOMRectList* Element::getClientRects() { DCHECK(element_layout_object); - GetDocument().AdjustQuadsForScrollAndAbsoluteZoom(quads, - *element_layout_object); + GetDocument().AdjustFloatQuadsForScrollAndAbsoluteZoom( + quads, *element_layout_object); + if (RuntimeEnabledFeatures::FingerprintingClientRectsNoiseEnabled()) { -+ for (gfx::QuadF& quad : quads) { ++ for (FloatQuad& quad : quads) { + quad.Scale(GetDocument().GetNoiseFactorX(), GetDocument().GetNoiseFactorY()); + } + } return MakeGarbageCollected<DOMRectList>(quads); } -@@ -2107,6 +2112,9 @@ gfx::RectF Element::GetBoundingClientRec +@@ -2131,6 +2136,9 @@ FloatRect Element::GetBoundingClientRect DCHECK(element_layout_object); - GetDocument().AdjustRectForScrollAndAbsoluteZoom(result, - *element_layout_object); + GetDocument().AdjustFloatRectForScrollAndAbsoluteZoom(result, + *element_layout_object); + if (RuntimeEnabledFeatures::FingerprintingClientRectsNoiseEnabled()) { + result.Scale(GetDocument().GetNoiseFactorX(), GetDocument().GetNoiseFactorY()); + } return result; } ---- a/third_party/blink/renderer/core/dom/range.cc -+++ b/third_party/blink/renderer/core/dom/range.cc +--- third_party/blink/renderer/core/dom/range.cc.orig ++++ third_party/blink/renderer/core/dom/range.cc @@ -1598,11 +1598,21 @@ DOMRectList* Range::getClientRects() con - Vector<gfx::QuadF> quads; + Vector<FloatQuad> quads; GetBorderAndTextQuads(quads); + if (RuntimeEnabledFeatures::FingerprintingClientRectsNoiseEnabled()) { -+ for (gfx::QuadF& quad : quads) { ++ for (FloatQuad& quad : quads) { + quad.Scale(owner_document_->GetNoiseFactorX(), owner_document_->GetNoiseFactorY()); + } + } @@ -217,17 +217,17 @@ } DOMRect* Range::getBoundingClientRect() const { -- return DOMRect::FromRectF(BoundingRect()); +- return DOMRect::FromFloatRect(BoundingRect()); + auto rect = BoundingRect(); + if (RuntimeEnabledFeatures::FingerprintingClientRectsNoiseEnabled()) { + rect.Scale(owner_document_->GetNoiseFactorX(), owner_document_->GetNoiseFactorY()); + } -+ return DOMRect::FromRectF(rect); ++ return DOMRect::FromFloatRect(rect); } // TODO(editing-dev): We should make ---- a/third_party/blink/renderer/core/html/canvas/text_metrics.cc -+++ b/third_party/blink/renderer/core/html/canvas/text_metrics.cc +--- third_party/blink/renderer/core/html/canvas/text_metrics.cc.orig ++++ third_party/blink/renderer/core/html/canvas/text_metrics.cc @@ -55,6 +55,24 @@ TextMetrics::TextMetrics(const Font& fon Update(font, direction, baseline, align, text); } @@ -253,8 +253,8 @@ void TextMetrics::Update(const Font& font, const TextDirection& direction, const TextBaseline& baseline, ---- a/third_party/blink/renderer/core/html/canvas/text_metrics.h -+++ b/third_party/blink/renderer/core/html/canvas/text_metrics.h +--- third_party/blink/renderer/core/html/canvas/text_metrics.h.orig ++++ third_party/blink/renderer/core/html/canvas/text_metrics.h @@ -64,6 +64,8 @@ class CORE_EXPORT TextMetrics final : pu void Trace(Visitor*) const override; @@ -264,9 +264,9 @@ private: void Update(const Font&, const TextDirection&, ---- a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.cc -+++ b/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.cc -@@ -923,9 +923,15 @@ TextMetrics* CanvasRenderingContext2D::m +--- third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.cc.orig ++++ third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.cc +@@ -912,9 +912,15 @@ TextMetrics* CanvasRenderingContext2D::m TextDirection direction = ToTextDirection(GetState().GetDirection(), canvas()); @@ -283,19 +283,19 @@ } void CanvasRenderingContext2D::fillFormattedText( ---- a/third_party/blink/renderer/platform/BUILD.gn -+++ b/third_party/blink/renderer/platform/BUILD.gn -@@ -1665,6 +1665,7 @@ component("platform") { +--- third_party/blink/renderer/platform/BUILD.gn.orig ++++ third_party/blink/renderer/platform/BUILD.gn +@@ -1686,6 +1686,7 @@ component("platform") { "//components/paint_preview/common", "//components/power_scheduler", "//components/search_engines:search_engine_utils", + "//components/ungoogled:ungoogled_switches", "//components/viz/client", "//components/viz/common", - "//components/webrtc:net_address_utils", ---- a/third_party/blink/renderer/platform/exported/web_runtime_features.cc -+++ b/third_party/blink/renderer/platform/exported/web_runtime_features.cc -@@ -659,4 +659,12 @@ void WebRuntimeFeatures::EnableCLSScroll + "//crypto", +--- third_party/blink/renderer/platform/exported/web_runtime_features.cc.orig ++++ third_party/blink/renderer/platform/exported/web_runtime_features.cc +@@ -689,4 +689,12 @@ void WebRuntimeFeatures::EnableCLSScroll RuntimeEnabledFeatures::SetCLSScrollAnchoringEnabled(enable); } @@ -308,10 +308,10 @@ +} + } // namespace blink ---- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 -+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 -@@ -1118,6 +1118,12 @@ - name: "Focusgroup", +--- third_party/blink/renderer/platform/runtime_enabled_features.json5.orig ++++ third_party/blink/renderer/platform/runtime_enabled_features.json5 +@@ -1076,6 +1076,12 @@ + origin_trial_feature_name: "Fledge", }, { + name: "FingerprintingClientRectsNoise", diff --git a/www/chromium-uc/patches/extra/bromite/flag-fingerprinting-canvas-image-data-noise.patch b/www/chromium-uc/patches/extra/bromite/flag-fingerprinting-canvas-image-data-noise.patch @@ -21,8 +21,8 @@ approach to change color components. .../platform/graphics/static_bitmap_image.h | 2 + 4 files changed, 163 insertions(+), 2 deletions(-) ---- a/chrome/browser/bromite_flag_entries.h -+++ b/chrome/browser/bromite_flag_entries.h +--- chrome/browser/bromite_flag_entries.h.orig ++++ chrome/browser/bromite_flag_entries.h @@ -16,4 +16,8 @@ flag_descriptions::kMaxConnectionsPerHostName, flag_descriptions::kMaxConnectionsPerHostDescription, @@ -32,9 +32,9 @@ approach to change color components. + "Slightly modifies at most 10 pixels in Canvas image data extracted via JS APIs. ungoogled-chromium flag, Bromite feature.", + kOsAll, SINGLE_VALUE_TYPE(switches::kFingerprintingCanvasImageDataNoise)}, #endif // CHROME_BROWSER_BROMITE_FLAG_ENTRIES_H_ ---- a/content/browser/renderer_host/render_process_host_impl.cc -+++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -3366,6 +3366,7 @@ void RenderProcessHostImpl::PropagateBro +--- content/browser/renderer_host/render_process_host_impl.cc.orig ++++ content/browser/renderer_host/render_process_host_impl.cc +@@ -3468,6 +3468,7 @@ void RenderProcessHostImpl::PropagateBro switches::kFileUrlPathAlias, switches::kFingerprintingClientRectsNoise, switches::kFingerprintingCanvasMeasureTextNoise, @@ -42,9 +42,9 @@ approach to change color components. switches::kForceDeviceScaleFactor, switches::kForceDisplayColorProfile, switches::kForceGpuMemAvailableMb, ---- a/content/child/runtime_features.cc -+++ b/content/child/runtime_features.cc -@@ -491,6 +491,8 @@ void SetRuntimeFeaturesFromCommandLine(c +--- content/child/runtime_features.cc.orig ++++ content/child/runtime_features.cc +@@ -471,6 +471,8 @@ void SetRuntimeFeaturesFromCommandLine(c switches::kFingerprintingClientRectsNoise, true}, {wrf::EnableFingerprintingCanvasMeasureTextNoise, switches::kFingerprintingCanvasMeasureTextNoise, true}, @@ -53,9 +53,9 @@ approach to change color components. }; for (const auto& mapping : switchToFeatureMapping) { if (command_line.HasSwitch(mapping.switch_name)) ---- a/third_party/blink/public/platform/web_runtime_features.h -+++ b/third_party/blink/public/platform/web_runtime_features.h -@@ -214,6 +214,7 @@ class WebRuntimeFeatures { +--- third_party/blink/public/platform/web_runtime_features.h.orig ++++ third_party/blink/public/platform/web_runtime_features.h +@@ -220,6 +220,7 @@ class WebRuntimeFeatures { BLINK_PLATFORM_EXPORT static void EnableAllowSyncXHRInPageDismissal(bool); BLINK_PLATFORM_EXPORT static void EnableFingerprintingClientRectsNoise(bool); BLINK_PLATFORM_EXPORT static void EnableFingerprintingCanvasMeasureTextNoise(bool); @@ -63,17 +63,17 @@ approach to change color components. BLINK_PLATFORM_EXPORT static void EnableSignedExchangeSubresourcePrefetch( bool); BLINK_PLATFORM_EXPORT static void EnableSubresourceWebBundles(bool); ---- a/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc -+++ b/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc -@@ -29,6 +29,7 @@ +--- third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc.orig ++++ third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc +@@ -30,6 +30,7 @@ #include "third_party/blink/renderer/platform/graphics/bitmap_image.h" #include "third_party/blink/renderer/platform/graphics/graphics_context.h" #include "third_party/blink/renderer/platform/graphics/skia/skia_utils.h" +#include "third_party/blink/renderer/platform/graphics/static_bitmap_image.h" #include "third_party/blink/renderer/platform/graphics/stroke_data.h" #include "third_party/blink/renderer/platform/graphics/video_frame_image_util.h" - #include "third_party/blink/renderer/platform/heap/garbage_collected.h" -@@ -2049,6 +2050,9 @@ ImageData* BaseRenderingContext2D::getIm + #include "third_party/blink/renderer/platform/heap/heap.h" +@@ -2311,6 +2312,9 @@ ImageData* BaseRenderingContext2D::getIm snapshot->PaintImageForCurrentFrame().GetSkImageInfo().bounds(); DCHECK(!bounds.intersect(SkIRect::MakeXYWH(sx, sy, sw, sh))); } @@ -83,9 +83,9 @@ approach to change color components. } return image_data; ---- a/third_party/blink/renderer/platform/BUILD.gn -+++ b/third_party/blink/renderer/platform/BUILD.gn -@@ -1623,7 +1623,9 @@ component("platform") { +--- third_party/blink/renderer/platform/BUILD.gn.orig ++++ third_party/blink/renderer/platform/BUILD.gn +@@ -1645,7 +1645,9 @@ component("platform") { "//third_party/blink/renderer:non_test_config", ] @@ -96,9 +96,9 @@ approach to change color components. allow_circular_includes_from = [ "//third_party/blink/renderer/platform/blob", ---- a/third_party/blink/renderer/platform/exported/web_runtime_features.cc -+++ b/third_party/blink/renderer/platform/exported/web_runtime_features.cc -@@ -667,4 +667,8 @@ void WebRuntimeFeatures::EnableFingerpri +--- third_party/blink/renderer/platform/exported/web_runtime_features.cc.orig ++++ third_party/blink/renderer/platform/exported/web_runtime_features.cc +@@ -697,4 +697,8 @@ void WebRuntimeFeatures::EnableFingerpri RuntimeEnabledFeatures::SetFingerprintingCanvasMeasureTextNoiseEnabled(enable); } @@ -107,8 +107,8 @@ approach to change color components. +} + } // namespace blink ---- a/third_party/blink/renderer/platform/graphics/image_data_buffer.cc -+++ b/third_party/blink/renderer/platform/graphics/image_data_buffer.cc +--- third_party/blink/renderer/platform/graphics/image_data_buffer.cc.orig ++++ third_party/blink/renderer/platform/graphics/image_data_buffer.cc @@ -36,6 +36,8 @@ #include "base/compiler_specific.h" @@ -130,8 +130,8 @@ approach to change color components. if (mime_type == kMimeTypeJpeg) { SkJpegEncoder::Options options; options.fQuality = ImageEncoder::ComputeJpegQuality(quality); ---- a/third_party/blink/renderer/platform/graphics/static_bitmap_image.cc -+++ b/third_party/blink/renderer/platform/graphics/static_bitmap_image.cc +--- third_party/blink/renderer/platform/graphics/static_bitmap_image.cc.orig ++++ third_party/blink/renderer/platform/graphics/static_bitmap_image.cc @@ -4,6 +4,8 @@ #include "third_party/blink/renderer/platform/graphics/static_bitmap_image.h" @@ -151,10 +151,10 @@ approach to change color components. #include "third_party/skia/include/core/SkPaint.h" #include "third_party/skia/include/core/SkSurface.h" +#include "third_party/skia/include/private/SkColorData.h" - #include "ui/gfx/geometry/skia_conversions.h" #include "v8/include/v8.h" -@@ -79,4 +83,154 @@ void StaticBitmapImage::DrawHelper(cc::P + namespace blink { +@@ -80,4 +84,154 @@ void StaticBitmapImage::DrawHelper(cc::P WebCoreClampingModeToSkiaRectConstraint(draw_options.clamping_mode)); } @@ -309,8 +309,8 @@ approach to change color components. +#undef shuffleComponent + } // namespace blink ---- a/third_party/blink/renderer/platform/graphics/static_bitmap_image.h -+++ b/third_party/blink/renderer/platform/graphics/static_bitmap_image.h +--- third_party/blink/renderer/platform/graphics/static_bitmap_image.h.orig ++++ third_party/blink/renderer/platform/graphics/static_bitmap_image.h @@ -36,6 +36,8 @@ class PLATFORM_EXPORT StaticBitmapImage StaticBitmapImage(ImageOrientation orientation) : orientation_(orientation) {} @@ -320,9 +320,9 @@ approach to change color components. bool IsStaticBitmapImage() const override { return true; } // Methods overridden by all sub-classes ---- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 -+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 -@@ -1124,6 +1124,9 @@ +--- third_party/blink/renderer/platform/runtime_enabled_features.json5.orig ++++ third_party/blink/renderer/platform/runtime_enabled_features.json5 +@@ -1082,6 +1082,9 @@ name: "FingerprintingCanvasMeasureTextNoise", }, { diff --git a/www/chromium-uc/patches/extra/bromite/flag-max-connections-per-host.patch b/www/chromium-uc/patches/extra/bromite/flag-max-connections-per-host.patch @@ -15,9 +15,9 @@ with limited CPU/memory resources and it is disabled by default. net/socket/client_socket_pool_manager.cc | 16 ++++++++++++++++ 7 files changed, 42 insertions(+) ---- a/chrome/browser/BUILD.gn -+++ b/chrome/browser/BUILD.gn -@@ -2102,6 +2102,7 @@ static_library("browser") { +--- chrome/browser/BUILD.gn.orig ++++ chrome/browser/BUILD.gn +@@ -2126,6 +2126,7 @@ static_library("browser") { "//components/net_log", "//components/network_hints/common:mojo_bindings", "//components/network_session_configurator/browser", @@ -25,8 +25,8 @@ with limited CPU/memory resources and it is disabled by default. "//components/network_time", "//components/no_state_prefetch/browser", "//components/no_state_prefetch/common", ---- a/chrome/browser/bromite_flag_choices.h -+++ b/chrome/browser/bromite_flag_choices.h +--- chrome/browser/bromite_flag_choices.h.orig ++++ chrome/browser/bromite_flag_choices.h @@ -4,4 +4,8 @@ #ifndef CHROME_BROWSER_BROMITE_FLAG_CHOICES_H_ @@ -36,8 +36,8 @@ with limited CPU/memory resources and it is disabled by default. + {features::kMaxConnectionsPerHostChoice15, switches::kMaxConnectionsPerHost, "15"}, +}; #endif // CHROME_BROWSER_BROMITE_FLAG_CHOICES_H_ ---- a/chrome/browser/bromite_flag_entries.h -+++ b/chrome/browser/bromite_flag_entries.h +--- chrome/browser/bromite_flag_entries.h.orig ++++ chrome/browser/bromite_flag_entries.h @@ -12,4 +12,8 @@ "Enable Canvas::measureText() fingerprint deception", "Scale the output values of Canvas::measureText() with a randomly selected factor in the range -0.0003% to 0.0003%, which are recomputed on every document initialization. ungoogled-chromium flag, Bromite feature.", @@ -47,22 +47,24 @@ with limited CPU/memory resources and it is disabled by default. + flag_descriptions::kMaxConnectionsPerHostDescription, + kOsAll, MULTI_VALUE_TYPE(kMaxConnectionsPerHostChoices)}, #endif // CHROME_BROWSER_BROMITE_FLAG_ENTRIES_H_ ---- a/chrome/browser/browser_process_impl.cc -+++ b/chrome/browser/browser_process_impl.cc -@@ -19,10 +19,12 @@ +--- chrome/browser/browser_process_impl.cc.orig ++++ chrome/browser/browser_process_impl.cc +@@ -19,12 +19,14 @@ #include "base/debug/leak_annotations.h" #include "base/files/file_path.h" #include "base/location.h" +#include "base/logging.h" + #include "base/macros.h" #include "base/memory/ptr_util.h" #include "base/metrics/histogram_macros.h" #include "base/path_service.h" #include "base/run_loop.h" + #include "base/single_thread_task_runner.h" +#include "base/strings/string_number_conversions.h" #include "base/synchronization/waitable_event.h" - #include "base/task/single_thread_task_runner.h" #include "base/task/task_traits.h" -@@ -102,6 +104,7 @@ + #include "base/task/thread_pool.h" +@@ -103,6 +105,7 @@ #include "components/metrics/metrics_service.h" #include "components/metrics_services_manager/metrics_services_manager.h" #include "components/metrics_services_manager/metrics_services_manager_client.h" @@ -70,7 +72,7 @@ with limited CPU/memory resources and it is disabled by default. #include "components/network_time/network_time_tracker.h" #include "components/permissions/permissions_client.h" #include "components/policy/core/common/policy_service.h" -@@ -134,6 +137,7 @@ +@@ -135,6 +138,7 @@ #include "media/media_buildflags.h" #include "mojo/public/cpp/bindings/pending_receiver.h" #include "net/log/net_log.h" @@ -78,9 +80,9 @@ with limited CPU/memory resources and it is disabled by default. #include "ppapi/buildflags/buildflags.h" #include "printing/buildflags/buildflags.h" #include "services/network/public/cpp/features.h" -@@ -343,6 +347,18 @@ void BrowserProcessImpl::Init() { - pref_change_registrar_.Add(metrics::prefs::kMetricsReportingEnabled, +@@ -345,6 +349,18 @@ void BrowserProcessImpl::Init() { base::BindRepeating(&ApplyMetricsReportingPolicy)); + #endif + int max_connections_per_host = 0; + auto switch_value = base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( @@ -97,11 +99,11 @@ with limited CPU/memory resources and it is disabled by default. DCHECK(!webrtc_event_log_manager_); webrtc_event_log_manager_ = WebRtcEventLogManager::CreateSingletonInstance(); ---- a/chrome/browser/flag_descriptions.cc -+++ b/chrome/browser/flag_descriptions.cc -@@ -1630,6 +1630,10 @@ const char kLogJsConsoleMessagesDescript - "Enable logging JS console messages in system logs, please note that they " - "may contain PII."; +--- chrome/browser/flag_descriptions.cc.orig ++++ chrome/browser/flag_descriptions.cc +@@ -1621,6 +1621,10 @@ const char kMediaHistoryDescription[] = + "Enables Media History which records data around media playbacks on " + "websites."; +const char kMaxConnectionsPerHostName[] = "Maximum connections per host"; +const char kMaxConnectionsPerHostDescription[] = @@ -110,11 +112,11 @@ with limited CPU/memory resources and it is disabled by default. const char kMediaRouterCastAllowAllIPsName[] = "Connect to Cast devices on all IP addresses"; const char kMediaRouterCastAllowAllIPsDescription[] = ---- a/chrome/browser/flag_descriptions.h -+++ b/chrome/browser/flag_descriptions.h -@@ -931,6 +931,9 @@ extern const char kLensCameraAssistedSea - extern const char kLogJsConsoleMessagesName[]; - extern const char kLogJsConsoleMessagesDescription[]; +--- chrome/browser/flag_descriptions.h.orig ++++ chrome/browser/flag_descriptions.h +@@ -930,6 +930,9 @@ extern const char kLogJsConsoleMessagesD + extern const char kMediaHistoryName[]; + extern const char kMediaHistoryDescription[]; +extern const char kMaxConnectionsPerHostName[]; +extern const char kMaxConnectionsPerHostDescription[]; @@ -122,8 +124,8 @@ with limited CPU/memory resources and it is disabled by default. extern const char kMediaRouterCastAllowAllIPsName[]; extern const char kMediaRouterCastAllowAllIPsDescription[]; ---- a/components/network_session_configurator/common/network_features.cc -+++ b/components/network_session_configurator/common/network_features.cc +--- components/network_session_configurator/common/network_features.cc.orig ++++ components/network_session_configurator/common/network_features.cc @@ -8,4 +8,7 @@ namespace features { @@ -132,8 +134,8 @@ with limited CPU/memory resources and it is disabled by default. + kMaxConnectionsPerHostChoice15[] = "15"; + } // namespace features ---- a/components/network_session_configurator/common/network_features.h -+++ b/components/network_session_configurator/common/network_features.h +--- components/network_session_configurator/common/network_features.h.orig ++++ components/network_session_configurator/common/network_features.h @@ -10,6 +10,10 @@ namespace features { @@ -145,8 +147,8 @@ with limited CPU/memory resources and it is disabled by default. } // namespace features #endif // COMPONENTS_NETWORK_SESSION_CONFIGURATOR_COMMON_NETWORK_FEATURES_H_ ---- a/components/network_session_configurator/common/network_switch_list.h -+++ b/components/network_session_configurator/common/network_switch_list.h +--- components/network_session_configurator/common/network_switch_list.h.orig ++++ components/network_session_configurator/common/network_switch_list.h @@ -19,6 +19,10 @@ NETWORK_SWITCH(kEnableUserAlternateProto // Enables the QUIC protocol. This is a temporary testing flag. NETWORK_SWITCH(kEnableQuic, "enable-quic") diff --git a/www/chromium-uc/patches/extra/debian/disable/google-api-warning.patch b/www/chromium-uc/patches/extra/debian/disable/google-api-warning.patch @@ -1,9 +1,9 @@ description: disable the google api key warning when those aren't found author: Michael Gilbert <mgilbert@debian.org> ---- a/chrome/browser/ui/startup/infobar_utils.cc -+++ b/chrome/browser/ui/startup/infobar_utils.cc -@@ -113,9 +113,6 @@ void AddInfoBarsIfNecessary(Browser* bro +--- chrome/browser/ui/startup/startup_browser_creator_impl.cc.orig ++++ chrome/browser/ui/startup/startup_browser_creator_impl.cc +@@ -672,9 +672,6 @@ void StartupBrowserCreatorImpl::AddInfoB infobars::ContentInfoBarManager* infobar_manager = infobars::ContentInfoBarManager::FromWebContents(web_contents); diff --git a/www/chromium-uc/patches/extra/debian/disable/welcome-page.patch b/www/chromium-uc/patches/extra/debian/disable/welcome-page.patch @@ -2,13 +2,13 @@ description: do not override the welcome page setting set in master_preferences author: Michael Gilbert <mgilbert@debian.org> bug-debian: http://bugs.debian.org/857767 ---- a/chrome/browser/profiles/profile_manager.cc -+++ b/chrome/browser/profiles/profile_manager.cc -@@ -1379,7 +1379,7 @@ void ProfileManager::InitProfileUserPref +--- chrome/browser/profiles/profile_manager.cc.orig ++++ chrome/browser/profiles/profile_manager.cc +@@ -1310,7 +1310,7 @@ void ProfileManager::InitProfileUserPref profile->GetPrefs()->SetString(prefs::kSupervisedUserId, supervised_user_id); } --#if !BUILDFLAG(IS_ANDROID) +-#if !defined(OS_ANDROID) +#if 0 // TODO(pmonette): Fix IsNewProfile() to handle the case where the profile is // new even if the "Preferences" file already existed. (For example: The diff --git a/www/chromium-uc/patches/extra/debian/fixes/connection-message.patch b/www/chromium-uc/patches/extra/debian/fixes/connection-message.patch @@ -2,8 +2,8 @@ description: suggest proxy misconfiguration when network is unreachable author: Michael Gilbert <mgilbert@debian.org> bug-debian: http://bugs.debian.org/864539 ---- a/components/error_page_strings.grdp -+++ b/components/error_page_strings.grdp +--- components/error_page_strings.grdp.orig ++++ components/error_page_strings.grdp @@ -54,7 +54,7 @@ </message> <message name="IDS_ERRORPAGES_SUGGESTION_CHECK_CONNECTION_BODY" desc="When a page fails to load, sometimes we suggest checking the network connections. This contains details below the suggestion."> diff --git a/www/chromium-uc/patches/extra/debian/gn/parallel.patch b/www/chromium-uc/patches/extra/debian/gn/parallel.patch @@ -1,8 +1,8 @@ description: respect specified number of parallel jobs while bootstrapping gn author: Michael Gilbert <mgilbert@debian.org> ---- a/tools/gn/bootstrap/bootstrap.py -+++ b/tools/gn/bootstrap/bootstrap.py +--- tools/gn/bootstrap/bootstrap.py.orig ++++ tools/gn/bootstrap/bootstrap.py @@ -47,6 +47,7 @@ def main(argv): help='The directory in which to build gn, ' 'relative to the src directory. (eg. out/Release)') diff --git a/www/chromium-uc/patches/extra/inox-patchset/0006-modify-default-prefs.patch b/www/chromium-uc/patches/extra/inox-patchset/0006-modify-default-prefs.patch @@ -1,6 +1,6 @@ ---- a/chrome/browser/background/background_mode_manager.cc -+++ b/chrome/browser/background/background_mode_manager.cc +--- chrome/browser/background/background_mode_manager.cc.orig ++++ chrome/browser/background/background_mode_manager.cc @@ -376,7 +376,7 @@ void BackgroundModeManager::RegisterPref registry->RegisterBooleanPref(prefs::kChromeCreatedLoginItem, false); registry->RegisterBooleanPref(prefs::kMigratedLoginItemPref, false); @@ -10,9 +10,9 @@ } void BackgroundModeManager::RegisterProfile(Profile* profile) { ---- a/chrome/browser/chrome_content_browser_client.cc -+++ b/chrome/browser/chrome_content_browser_client.cc -@@ -1264,7 +1264,7 @@ void ChromeContentBrowserClient::Registe +--- chrome/browser/chrome_content_browser_client.cc.orig ++++ chrome/browser/chrome_content_browser_client.cc +@@ -1238,7 +1238,7 @@ void ChromeContentBrowserClient::Registe void ChromeContentBrowserClient::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { registry->RegisterBooleanPref(prefs::kDisable3DAPIs, false); @@ -21,9 +21,31 @@ // Register user prefs for mapping SitePerProcess and IsolateOrigins in // user policy in addition to the same named ones in Local State (which are // used for mapping the command-line flags). ---- a/chrome/browser/net/profile_network_context_service.cc -+++ b/chrome/browser/net/profile_network_context_service.cc -@@ -337,7 +337,7 @@ void ProfileNetworkContextService::Updat +--- chrome/browser/net/prediction_options.cc.orig ++++ chrome/browser/net/prediction_options.cc +@@ -31,7 +31,7 @@ NetworkPredictionStatus CanPrefetchAndPr + } + return NetworkPredictionStatus::DISABLED_DUE_TO_NETWORK; + default: +- DCHECK_EQ(NETWORK_PREDICTION_NEVER, network_prediction_options); ++ //DCHECK_EQ(NETWORK_PREDICTION_NEVER, network_prediction_options); + return NetworkPredictionStatus::DISABLED_ALWAYS; + } + } +--- chrome/browser/net/prediction_options.h.orig ++++ chrome/browser/net/prediction_options.h +@@ -22,7 +22,7 @@ enum NetworkPredictionOptions { + NETWORK_PREDICTION_ALWAYS, + NETWORK_PREDICTION_WIFI_ONLY, + NETWORK_PREDICTION_NEVER, +- NETWORK_PREDICTION_DEFAULT = NETWORK_PREDICTION_WIFI_ONLY, ++ NETWORK_PREDICTION_DEFAULT = NETWORK_PREDICTION_NEVER, + }; + + enum class NetworkPredictionStatus { +--- chrome/browser/net/profile_network_context_service.cc.orig ++++ chrome/browser/net/profile_network_context_service.cc +@@ -319,7 +319,7 @@ void ProfileNetworkContextService::Updat void ProfileNetworkContextService::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { registry->RegisterBooleanPref( @@ -32,30 +54,19 @@ user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); registry->RegisterBooleanPref(prefs::kQuicAllowed, true); registry->RegisterBooleanPref(prefs::kGloballyScopeHTTPAuthCacheEnabled, ---- a/chrome/browser/prefetch/prefetch_prefs.h -+++ b/chrome/browser/prefetch/prefetch_prefs.h -@@ -22,7 +22,7 @@ enum class NetworkPredictionOptions { - kWifiOnlyDeprecated = 1, - kDisabled = 2, - kExtended = 3, -- kDefault = kWifiOnlyDeprecated, -+ kDefault = kDisabled, - }; - - // Enum representing possible values of the Preload Pages opt-in state. Since ---- a/chrome/browser/profiles/profile.cc -+++ b/chrome/browser/profiles/profile.cc -@@ -275,7 +275,7 @@ const char Profile::kProfileKey[] = "__P +--- chrome/browser/profiles/profile.cc.orig ++++ chrome/browser/profiles/profile.cc +@@ -276,7 +276,7 @@ const char Profile::kProfileKey[] = "__P void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { registry->RegisterBooleanPref( prefs::kSearchSuggestEnabled, - true, + false, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); - #if BUILDFLAG(IS_ANDROID) + #if defined(OS_ANDROID) registry->RegisterStringPref( ---- a/chrome/browser/resources/settings/reset_page/reset_profile_dialog.html -+++ b/chrome/browser/resources/settings/reset_page/reset_profile_dialog.html +--- chrome/browser/resources/settings/reset_page/reset_profile_dialog.html.orig ++++ chrome/browser/resources/settings/reset_page/reset_profile_dialog.html @@ -36,7 +36,7 @@ </cr-button> </div> @@ -65,9 +76,9 @@ $i18nRaw{resetPageFeedback}</cr-checkbox> </div> </cr-dialog> ---- a/chrome/browser/signin/account_consistency_mode_manager.cc -+++ b/chrome/browser/signin/account_consistency_mode_manager.cc -@@ -110,7 +110,7 @@ AccountConsistencyModeManager::~AccountC +--- chrome/browser/signin/account_consistency_mode_manager.cc.orig ++++ chrome/browser/signin/account_consistency_mode_manager.cc +@@ -111,7 +111,7 @@ AccountConsistencyModeManager::~AccountC // static void AccountConsistencyModeManager::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { @@ -76,8 +87,8 @@ } // static ---- a/chrome/browser/ui/browser_ui_prefs.cc -+++ b/chrome/browser/ui/browser_ui_prefs.cc +--- chrome/browser/ui/browser_ui_prefs.cc.orig ++++ chrome/browser/ui/browser_ui_prefs.cc @@ -77,11 +77,11 @@ void RegisterBrowserUserPrefs(user_prefs registry->RegisterBooleanPref(prefs::kWebAppCreateInAppsMenu, true); registry->RegisterBooleanPref(prefs::kWebAppCreateInQuickLaunchBar, true); @@ -92,8 +103,19 @@ registry->RegisterDictionaryPref(prefs::kBrowserWindowPlacement); registry->RegisterDictionaryPref(prefs::kBrowserWindowPlacementPopup); registry->RegisterDictionaryPref(prefs::kAppWindowPlacement); ---- a/components/autofill/core/common/autofill_prefs.cc -+++ b/components/autofill/core/common/autofill_prefs.cc +--- chrome/service/cloud_print/connector_settings.cc.orig ++++ chrome/service/cloud_print/connector_settings.cc +@@ -59,7 +59,7 @@ void ConnectorSettings::InitFrom(Service + DCHECK(server_url_.is_valid()); + + connect_new_printers_ = prefs->GetBoolean( +- prefs::kCloudPrintConnectNewPrinters, true); ++ prefs::kCloudPrintConnectNewPrinters, false); + + xmpp_ping_enabled_ = prefs->GetBoolean( + prefs::kCloudPrintXmppPingEnabled, false); +--- components/autofill/core/common/autofill_prefs.cc.orig ++++ components/autofill/core/common/autofill_prefs.cc @@ -131,10 +131,10 @@ const char kAutocompleteLastVersionReten void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { // Synced prefs. Used for cross-device choices, e.g., credit card Autofill. @@ -116,9 +138,9 @@ user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); registry->RegisterStringPref( prefs::kAutofillProfileValidity, "", ---- a/components/bookmarks/browser/bookmark_utils.cc -+++ b/components/bookmarks/browser/bookmark_utils.cc -@@ -438,7 +438,7 @@ bool DoesBookmarkContainWords(const std: +--- components/bookmarks/browser/bookmark_utils.cc.orig ++++ components/bookmarks/browser/bookmark_utils.cc +@@ -437,7 +437,7 @@ bool DoesBookmarkContainWords(const std: void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { registry->RegisterBooleanPref( prefs::kShowBookmarkBar, @@ -127,8 +149,8 @@ user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); registry->RegisterBooleanPref(prefs::kEditBookmarksEnabled, true); registry->RegisterBooleanPref( ---- a/components/bookmarks/browser/features.cc -+++ b/components/bookmarks/browser/features.cc +--- components/bookmarks/browser/features.cc.orig ++++ components/bookmarks/browser/features.cc @@ -10,7 +10,7 @@ namespace features { // Changes the apps shortcut on the bookmarks bar to default to off. // https://crbug.com/1236793 @@ -138,8 +160,8 @@ } // namespace features } // namespace bookmarks ---- a/components/content_settings/core/browser/cookie_settings.cc -+++ b/components/content_settings/core/browser/cookie_settings.cc +--- components/content_settings/core/browser/cookie_settings.cc.orig ++++ components/content_settings/core/browser/cookie_settings.cc @@ -63,7 +63,7 @@ void CookieSettings::RegisterProfilePref user_prefs::PrefRegistrySyncable* registry) { registry->RegisterIntegerPref( @@ -149,8 +171,8 @@ user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); } ---- a/components/password_manager/core/browser/password_manager.cc -+++ b/components/password_manager/core/browser/password_manager.cc +--- components/password_manager/core/browser/password_manager.cc.orig ++++ components/password_manager/core/browser/password_manager.cc @@ -204,10 +204,10 @@ bool HasMutedCredentials(base::span<cons void PasswordManager::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { @@ -164,8 +186,8 @@ user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF); registry->RegisterStringPref(prefs::kSyncPasswordHash, std::string(), PrefRegistry::NO_REGISTRATION_FLAGS); ---- a/components/payments/core/payment_prefs.cc -+++ b/components/payments/core/payment_prefs.cc +--- components/payments/core/payment_prefs.cc.orig ++++ components/payments/core/payment_prefs.cc @@ -16,7 +16,7 @@ const char kCanMakePaymentEnabled[] = "p void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { registry->RegisterBooleanPref(kPaymentsFirstTransactionCompleted, false); diff --git a/www/chromium-uc/patches/extra/inox-patchset/0008-restore-classic-ntp.patch b/www/chromium-uc/patches/extra/inox-patchset/0008-restore-classic-ntp.patch @@ -1,6 +1,6 @@ ---- a/chrome/browser/search/search.cc -+++ b/chrome/browser/search/search.cc -@@ -184,26 +184,7 @@ struct NewTabURLDetails { +--- chrome/browser/search/search.cc.orig ++++ chrome/browser/search/search.cc +@@ -182,26 +182,7 @@ struct NewTabURLDetails { : chrome::kChromeUINewTabPageThirdPartyURL); #endif @@ -28,8 +28,8 @@ } const GURL url; ---- a/components/ntp_snippets/features.cc -+++ b/components/ntp_snippets/features.cc +--- components/ntp_snippets/features.cc.orig ++++ components/ntp_snippets/features.cc @@ -39,7 +39,7 @@ const base::Feature* const kAllFeatures[ &kOptionalImagesEnabledFeature}; diff --git a/www/chromium-uc/patches/extra/inox-patchset/0013-disable-missing-key-warning.patch b/www/chromium-uc/patches/extra/inox-patchset/0013-disable-missing-key-warning.patch @@ -1,5 +1,5 @@ ---- a/chrome/browser/ui/startup/google_api_keys_infobar_delegate.cc -+++ b/chrome/browser/ui/startup/google_api_keys_infobar_delegate.cc +--- chrome/browser/ui/startup/google_api_keys_infobar_delegate.cc.orig ++++ chrome/browser/ui/startup/google_api_keys_infobar_delegate.cc @@ -17,9 +17,6 @@ // static void GoogleApiKeysInfoBarDelegate::Create( diff --git a/www/chromium-uc/patches/extra/inox-patchset/0016-chromium-sandbox-pie.patch b/www/chromium-uc/patches/extra/inox-patchset/0016-chromium-sandbox-pie.patch @@ -1,6 +1,6 @@ ---- a/sandbox/linux/BUILD.gn -+++ b/sandbox/linux/BUILD.gn -@@ -296,6 +296,12 @@ if (is_linux || is_chromeos) { +--- sandbox/linux/BUILD.gn.orig ++++ sandbox/linux/BUILD.gn +@@ -327,6 +327,12 @@ if (is_linux || is_chromeos) { # These files have a suspicious comparison. # TODO fix this and re-enable this warning. "-Wno-sign-compare", diff --git a/www/chromium-uc/patches/extra/inox-patchset/0018-disable-first-run-behaviour.patch b/www/chromium-uc/patches/extra/inox-patchset/0018-disable-first-run-behaviour.patch @@ -1,6 +1,6 @@ ---- a/chrome/browser/ui/startup/startup_tab_provider.cc -+++ b/chrome/browser/ui/startup/startup_tab_provider.cc -@@ -108,7 +108,7 @@ bool ValidateUrl(const GURL& url) { +--- chrome/browser/ui/startup/startup_tab_provider.cc.orig ++++ chrome/browser/ui/startup/startup_tab_provider.cc +@@ -105,7 +105,7 @@ bool ValidateUrl(const GURL& url) { StartupTabs StartupTabProviderImpl::GetOnboardingTabs(Profile* profile) const { // Chrome OS has its own welcome flow provided by OOBE. diff --git a/www/chromium-uc/patches/extra/inox-patchset/0019-disable-battery-status-service.patch b/www/chromium-uc/patches/extra/inox-patchset/0019-disable-battery-status-service.patch @@ -1,5 +1,5 @@ ---- a/services/device/battery/battery_status_service.cc -+++ b/services/device/battery/battery_status_service.cc +--- services/device/battery/battery_status_service.cc.orig ++++ services/device/battery/battery_status_service.cc @@ -22,10 +22,7 @@ BatteryStatusService::BatteryStatusServi update_callback_( base::BindRepeating(&BatteryStatusService::NotifyConsumers, @@ -82,9 +82,9 @@ is_shutdown_ = false; main_thread_task_runner_ = base::ThreadTaskRunnerHandle::Get(); } ---- a/services/device/battery/battery_status_service.h -+++ b/services/device/battery/battery_status_service.h -@@ -59,15 +59,10 @@ class BatteryStatusService { +--- services/device/battery/battery_status_service.h.orig ++++ services/device/battery/battery_status_service.h +@@ -60,15 +60,10 @@ class BatteryStatusService { // Updates current battery status and sends new status to interested // render processes. Can be called on any thread via a callback. void NotifyConsumers(const mojom::BatteryStatus& status); diff --git a/www/chromium-uc/patches/extra/iridium-browser/Remove-EV-certificates.patch b/www/chromium-uc/patches/extra/iridium-browser/Remove-EV-certificates.patch @@ -7,15 +7,16 @@ The team chose to let EV certificates appear just like normal certificates. The web of trust is considered a failure in itself, so do not give users a false sense of extra security with EV certs. Instead, let them appear just like regular ones. +--- + net/cert/ev_root_ca_metadata.cc | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) ---- a/net/cert/ev_root_ca_metadata.cc -+++ b/net/cert/ev_root_ca_metadata.cc -@@ -41,7 +41,17 @@ struct EVMetadata { - const base::StringPiece policy_oids[kMaxOIDsPerCA]; - }; +--- net/cert/ev_root_ca_metadata.cc.orig ++++ net/cert/ev_root_ca_metadata.cc +@@ -41,6 +41,16 @@ struct EVMetadata { --#include "net/data/ssl/ev_roots/chrome-ev-root-store-inc.cc" -+static const EVMetadata kEvRootCaMetadata[] = { + // These certificates may be found in net/data/ssl/ev_roots. + static const EVMetadata kEvRootCaMetadata[] = { + // need some dummy thing to make compiler happy, because + // arraysize() is implemented as a convoluted template rather than + // the traditional sizeof(x)/sizeof(*x) @@ -24,7 +25,18 @@ Instead, let them appear just like regular ones. + { + "0", + } ++ }, ++#if 0 + // AC Camerfirma S.A. Chambers of Commerce Root - 2008 + // https://www.camerfirma.com + { +@@ -590,7 +600,9 @@ static const EVMetadata kEvRootCaMetadat + 0xd2, 0x09, 0xb7, 0x37, 0xcb, 0xe2, 0xc1, 0x8c, 0xfb, 0x2c, 0x10, + 0xc0, 0xff, 0x0b, 0xcf, 0x0d, 0x32, 0x86, 0xfc, 0x1a, 0xa2}}, + {"2.16.840.1.114404.1.1.2.4.1", ""}, +- }}; + } ++#endif +}; #endif // defined(PLATFORM_USES_CHROMIUM_EV_METADATA) diff --git a/www/chromium-uc/patches/extra/iridium-browser/browser-disable-profile-auto-import-on-first-run.patch b/www/chromium-uc/patches/extra/iridium-browser/browser-disable-profile-auto-import-on-first-run.patch @@ -3,14 +3,18 @@ From: Joachim Bauch <jojo@struktur.de> Date: Thu, 25 Jun 2015 15:51:59 +0200 Subject: [PATCH 56/66] browser: disable profile auto-import on first run ---- a/chrome/browser/chrome_browser_main.cc -+++ b/chrome/browser/chrome_browser_main.cc -@@ -1617,8 +1617,6 @@ int ChromeBrowserMainParts::PreMainMessa +--- + chrome/browser/chrome_browser_main.cc | 2 -- + 1 file changed, 2 deletions(-) + +--- chrome/browser/chrome_browser_main.cc.orig ++++ chrome/browser/chrome_browser_main.cc +@@ -1492,8 +1492,6 @@ int ChromeBrowserMainParts::PreMainMessa // and preferences have been registered since some of the import code depends // on preferences. if (first_run::IsChromeFirstRun()) { -- first_run::AutoImport(profile, master_prefs_->import_bookmarks_path); +- first_run::AutoImport(profile_, master_prefs_->import_bookmarks_path); - // Note: This can pop-up the first run consent dialog on Linux & Mac. - first_run::DoPostImportTasks(profile, + first_run::DoPostImportTasks(profile_, master_prefs_->make_chrome_default_for_user); diff --git a/www/chromium-uc/patches/extra/iridium-browser/mime_util-force-text-x-suse-ymp-to-be-downloaded.patch b/www/chromium-uc/patches/extra/iridium-browser/mime_util-force-text-x-suse-ymp-to-be-downloaded.patch @@ -9,8 +9,8 @@ very interesting in themselves. Force them to be stored. components/mime_util/mime_util.cc | 1 + 1 file changed, 1 insertion(+) ---- a/third_party/blink/common/mime_util/mime_util.cc -+++ b/third_party/blink/common/mime_util/mime_util.cc +--- third_party/blink/common/mime_util/mime_util.cc.orig ++++ third_party/blink/common/mime_util/mime_util.cc @@ -83,6 +83,7 @@ static const char* const kUnsupportedTex "text/x-csv", "text/x-vcf", diff --git a/www/chromium-uc/patches/extra/iridium-browser/net-cert-increase-default-key-length-for-newly-gener.patch b/www/chromium-uc/patches/extra/iridium-browser/net-cert-increase-default-key-length-for-newly-gener.patch @@ -10,9 +10,9 @@ it as hidden as it was before? net/cert/x509_util.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---- a/net/cert/x509_util.cc -+++ b/net/cert/x509_util.cc -@@ -243,7 +243,7 @@ bool GetTLSServerEndPointChannelBinding( +--- net/cert/x509_util.cc.orig ++++ net/cert/x509_util.cc +@@ -241,7 +241,7 @@ bool GetTLSServerEndPointChannelBinding( } // RSA keys created by CreateKeyAndSelfSignedCert will be of this length. diff --git a/www/chromium-uc/patches/extra/iridium-browser/prefs-always-prompt-for-download-directory-by-defaul.patch b/www/chromium-uc/patches/extra/iridium-browser/prefs-always-prompt-for-download-directory-by-defaul.patch @@ -27,9 +27,9 @@ TLDR: Do not let files sneak onto the disk too easily. chrome/browser/download/download_prefs.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---- a/chrome/browser/download/download_prefs.cc -+++ b/chrome/browser/download/download_prefs.cc -@@ -262,7 +262,7 @@ void DownloadPrefs::RegisterProfilePrefs +--- chrome/browser/download/download_prefs.cc.orig ++++ chrome/browser/download/download_prefs.cc +@@ -271,7 +271,7 @@ void DownloadPrefs::RegisterProfilePrefs user_prefs::PrefRegistrySyncable* registry) { registry->RegisterBooleanPref( prefs::kPromptForDownload, diff --git a/www/chromium-uc/patches/extra/iridium-browser/prefs-only-keep-cookies-until-exit.patch b/www/chromium-uc/patches/extra/iridium-browser/prefs-only-keep-cookies-until-exit.patch @@ -8,11 +8,11 @@ Out with all those tracking cookies! components/content_settings/core/browser/content_settings_registry.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---- a/components/content_settings/core/browser/content_settings_registry.cc -+++ b/components/content_settings/core/browser/content_settings_registry.cc -@@ -131,7 +131,7 @@ void ContentSettingsRegistry::Init() { - // PrefProvider::DiscardOrMigrateObsoletePreferences() and - // DefaultProvider::DiscardOrMigrateObsoletePreferences() accordingly. +--- components/content_settings/core/browser/content_settings_registry.cc.orig ++++ components/content_settings/core/browser/content_settings_registry.cc +@@ -126,7 +126,7 @@ void ContentSettingsRegistry::Init() { + // WARNING: The string names of the permissions passed in below are used to + // generate preference names and should never be changed! - Register(ContentSettingsType::COOKIES, "cookies", CONTENT_SETTING_ALLOW, + Register(ContentSettingsType::COOKIES, "cookies", CONTENT_SETTING_SESSION_ONLY, diff --git a/www/chromium-uc/patches/extra/iridium-browser/updater-disable-auto-update.patch b/www/chromium-uc/patches/extra/iridium-browser/updater-disable-auto-update.patch @@ -14,8 +14,8 @@ the case anyway, since we are based off Chromium, not Chrome. chrome/browser/app_controller_mac.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---- a/chrome/browser/app_controller_mac.mm -+++ b/chrome/browser/app_controller_mac.mm +--- chrome/browser/app_controller_mac.mm.orig ++++ chrome/browser/app_controller_mac.mm @@ -866,7 +866,7 @@ static base::mac::ScopedObjCClassSwizzle CFStringRef checkInterval = CFSTR("checkInterval"); CFPropertyListRef plist = CFPreferencesCopyAppValue(checkInterval, app); diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-components-ungoogled.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-components-ungoogled.patch @@ -1,7 +1,7 @@ # Add ungoogled-chromium-specific code to components/ungoogled/ --- /dev/null -+++ b/components/ungoogled/BUILD.gn ++++ components/ungoogled/BUILD.gn @@ -0,0 +1,14 @@ +# Copyright (c) 2020 The ungoogled-chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be @@ -18,7 +18,7 @@ + deps = [ "//base" ] +} --- /dev/null -+++ b/components/ungoogled/ungoogled_switches.cc ++++ components/ungoogled/ungoogled_switches.cc @@ -0,0 +1,21 @@ +// Copyright (c) 2020 The ungoogled-chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -42,7 +42,7 @@ + +} // namespace switches --- /dev/null -+++ b/components/ungoogled/ungoogled_switches.h ++++ components/ungoogled/ungoogled_switches.h @@ -0,0 +1,21 @@ +// Copyright (c) 2020 The ungoogled-chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-extra-channel-info.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-extra-channel-info.patch @@ -5,8 +5,8 @@ author: Wengling Chen <feiyu2817@gmail.com> components/version_ui_strings.grdp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---- a/components/version_ui_strings.grdp -+++ b/components/version_ui_strings.grdp +--- components/version_ui_strings.grdp.orig ++++ components/version_ui_strings.grdp @@ -4,10 +4,10 @@ About Version </message> diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-bookmark-bar-ntp.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-bookmark-bar-ntp.patch @@ -1,5 +1,5 @@ ---- a/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc -+++ b/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc +--- chrome/browser/ui/bookmarks/bookmark_tab_helper.cc.orig ++++ chrome/browser/ui/bookmarks/bookmark_tab_helper.cc @@ -4,6 +4,7 @@ #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" @@ -22,8 +22,8 @@ } void BookmarkTabHelper::AddObserver(BookmarkTabHelperObserver* observer) { ---- a/chrome/browser/ungoogled_flag_choices.h -+++ b/chrome/browser/ungoogled_flag_choices.h +--- chrome/browser/ungoogled_flag_choices.h.orig ++++ chrome/browser/ungoogled_flag_choices.h @@ -39,4 +39,10 @@ const FeatureEntry::Choice kPDFPluginNam {"Google Chrome", switches::kPDFPluginName, "chrome"}, {"Microsoft Edge", switches::kPDFPluginName, "edge"}, @@ -35,9 +35,9 @@ + "never"}, +}; #endif // CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_ ---- a/chrome/browser/ungoogled_flag_entries.h -+++ b/chrome/browser/ungoogled_flag_entries.h -@@ -40,4 +40,8 @@ +--- chrome/browser/ungoogled_flag_entries.h.orig ++++ chrome/browser/ungoogled_flag_entries.h +@@ -44,4 +44,8 @@ "Set internal PDF plugin name", "Sets the internal PDF viewer plugin name. Useful for sites that probe JS API navigator.plugins. ungoogled-chromium flag.", kOsDesktop, MULTI_VALUE_TYPE(kPDFPluginNameChoices)}, diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-close-confirmation.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-close-confirmation.patch @@ -1,6 +1,6 @@ ---- a/chrome/browser/ui/browser.cc -+++ b/chrome/browser/ui/browser.cc -@@ -139,6 +139,8 @@ +--- chrome/browser/ui/browser.cc.orig ++++ chrome/browser/ui/browser.cc +@@ -140,6 +140,8 @@ #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/browser/ui/tabs/tab_utils.h" #include "chrome/browser/ui/ui_features.h" @@ -9,7 +9,7 @@ #include "chrome/browser/ui/web_applications/app_browser_controller.h" #include "chrome/browser/ui/web_applications/web_app_launch_utils.h" #include "chrome/browser/ui/webui/signin/login_ui_service.h" -@@ -468,6 +470,7 @@ Browser::Browser(const CreateParams& par +@@ -467,6 +469,7 @@ Browser::Browser(const CreateParams& par omit_from_session_restore_(params.omit_from_session_restore), should_trigger_session_restore_(params.should_trigger_session_restore), cancel_download_confirmation_state_(NOT_PROMPTED), @@ -17,7 +17,7 @@ override_bounds_(params.initial_bounds), initial_show_state_(params.initial_show_state), initial_workspace_(params.initial_workspace), -@@ -835,7 +838,7 @@ Browser::WarnBeforeClosingResult Browser +@@ -830,7 +833,7 @@ Browser::WarnBeforeClosingResult Browser // If the browser can close right away (there are no pending downloads we need // to prompt about) then there's no need to warn. In the future, we might need // to check other conditions as well. @@ -26,7 +26,7 @@ return WarnBeforeClosingResult::kOkToClose; DCHECK(!warn_before_closing_callback_) -@@ -865,6 +868,7 @@ bool Browser::TryToCloseWindow( +@@ -860,6 +863,7 @@ bool Browser::TryToCloseWindow( void Browser::ResetTryToCloseWindow() { cancel_download_confirmation_state_ = NOT_PROMPTED; @@ -34,7 +34,7 @@ unload_controller_.ResetTryToCloseWindow(); } -@@ -2698,6 +2702,62 @@ bool Browser::CanCloseWithInProgressDown +@@ -2702,6 +2706,62 @@ bool Browser::CanCloseWithInProgressDown return false; } @@ -97,7 +97,7 @@ void Browser::InProgressDownloadResponse(bool cancel_downloads) { if (cancel_downloads) { cancel_download_confirmation_state_ = RESPONSE_RECEIVED; -@@ -2716,6 +2776,22 @@ void Browser::InProgressDownloadResponse +@@ -2720,6 +2780,22 @@ void Browser::InProgressDownloadResponse std::move(warn_before_closing_callback_) .Run(WarnBeforeClosingResult::kDoNotClose); @@ -120,8 +120,8 @@ } void Browser::FinishWarnBeforeClosing(WarnBeforeClosingResult result) { ---- a/chrome/browser/ui/browser.h -+++ b/chrome/browser/ui/browser.h +--- chrome/browser/ui/browser.h.orig ++++ chrome/browser/ui/browser.h @@ -26,6 +26,7 @@ #include "chrome/browser/ui/bookmarks/bookmark_tab_helper_observer.h" #include "chrome/browser/ui/browser_navigator_params.h" @@ -130,7 +130,7 @@ #include "chrome/browser/ui/signin_view_controller.h" #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" #include "chrome/browser/ui/unload_controller.h" -@@ -1015,12 +1016,17 @@ class Browser : public TabStripModelObse +@@ -1008,12 +1009,17 @@ class Browser : public TabStripModelObse // Returns true if the window can close, false otherwise. bool CanCloseWithInProgressDownloads(); @@ -148,7 +148,7 @@ // Called when all warnings have completed when attempting to close the // browser directly (e.g. via hotkey, close button, terminate signal, etc.) // Used as a WarnBeforeClosingCallback by ShouldCloseWindow(). -@@ -1183,6 +1189,8 @@ class Browser : public TabStripModelObse +@@ -1176,6 +1182,8 @@ class Browser : public TabStripModelObse // when the browser is closed with in-progress downloads. CancelDownloadConfirmationState cancel_download_confirmation_state_; @@ -157,8 +157,8 @@ ///////////////////////////////////////////////////////////////////////////// // Override values for the bounds of the window and its maximized or minimized ---- a/chrome/browser/ungoogled_flag_choices.h -+++ b/chrome/browser/ungoogled_flag_choices.h +--- chrome/browser/ungoogled_flag_choices.h.orig ++++ chrome/browser/ungoogled_flag_choices.h @@ -66,4 +66,13 @@ const FeatureEntry::Choice kCloseWindowW "close-window-with-last-tab", "never"}, @@ -173,9 +173,9 @@ + "multiple"}, +}; #endif // CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_ ---- a/chrome/browser/ungoogled_flag_entries.h -+++ b/chrome/browser/ungoogled_flag_entries.h -@@ -76,4 +76,8 @@ +--- chrome/browser/ungoogled_flag_entries.h.orig ++++ chrome/browser/ungoogled_flag_entries.h +@@ -80,4 +80,8 @@ "Remove Grab Handle", "Removes the reserved empty space in the tabstrip for moving the window. ungoogled-chromium flag", kOsDesktop, SINGLE_VALUE_TYPE("remove-grab-handle")}, diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-custom-ntp.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-custom-ntp.patch @@ -1,6 +1,6 @@ ---- a/chrome/browser/chrome_content_browser_client.cc -+++ b/chrome/browser/chrome_content_browser_client.cc -@@ -771,6 +771,9 @@ bool HandleNewTabPageLocationOverride( +--- chrome/browser/chrome_content_browser_client.cc.orig ++++ chrome/browser/chrome_content_browser_client.cc +@@ -743,6 +743,9 @@ bool HandleNewTabPageLocationOverride( Profile* profile = Profile::FromBrowserContext(browser_context); std::string ntp_location = profile->GetPrefs()->GetString(prefs::kNewTabPageLocationOverride); @@ -10,9 +10,9 @@ if (ntp_location.empty()) return false; url::Component scheme; ---- a/chrome/browser/ungoogled_flag_entries.h -+++ b/chrome/browser/ungoogled_flag_entries.h -@@ -80,4 +80,8 @@ +--- chrome/browser/ungoogled_flag_entries.h.orig ++++ chrome/browser/ungoogled_flag_entries.h +@@ -84,4 +84,8 @@ "Close Confirmation", "Show a warning prompt when closing the browser window. ungoogled-chromium flag", kOsDesktop, MULTI_VALUE_TYPE(kCloseConfirmation)}, @@ -21,17 +21,17 @@ + "Allows setting a custom URL for the new tab page. Value can be internal (e.g. `about:blank`), external (e.g. `example.com`), or local (e.g. `file:///tmp/startpage.html`). This applies for incognito windows as well when not set to a `chrome://` internal page. ungoogled-chromium flag", + kOsDesktop, ORIGIN_LIST_VALUE_TYPE("custom-ntp", "")}, #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ ---- a/components/flags_ui/flags_state.cc -+++ b/components/flags_ui/flags_state.cc -@@ -207,6 +207,7 @@ std::string GetCombinedOriginListValue(c - command_line.GetSwitchValueASCII(command_line_switch); +--- components/flags_ui/flags_state.cc.orig ++++ components/flags_ui/flags_state.cc +@@ -231,6 +231,7 @@ std::string GetCombinedOriginListValue(c + command_line_switch); const std::string new_value = flags_storage.GetOriginListFlag(internal_entry_name); + if (command_line_switch == "custom-ntp") return existing_value.empty() ? new_value : existing_value; return CombineAndSanitizeOriginLists(existing_value, new_value); } -@@ -395,6 +396,7 @@ void FlagsState::SetOriginListFlag(const +@@ -417,6 +418,7 @@ void FlagsState::SetOriginListFlag(const const std::string& value, FlagsStorage* flags_storage) { const std::string new_value = diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-grab-handle.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-grab-handle.patch @@ -1,6 +1,6 @@ ---- a/chrome/browser/ui/views/frame/tab_strip_region_view.cc -+++ b/chrome/browser/ui/views/frame/tab_strip_region_view.cc -@@ -46,6 +46,7 @@ class FrameGrabHandle : public views::Vi +--- chrome/browser/ui/views/frame/tab_strip_region_view.cc.orig ++++ chrome/browser/ui/views/frame/tab_strip_region_view.cc +@@ -42,6 +42,7 @@ class FrameGrabHandle : public views::Vi // Reserve some space for the frame to be grabbed by, even if the tabstrip // is full. // TODO(tbergquist): Define this relative to the NTB insets again. @@ -8,9 +8,9 @@ return gfx::Size(42, 0); } }; ---- a/chrome/browser/ungoogled_flag_entries.h -+++ b/chrome/browser/ungoogled_flag_entries.h -@@ -72,4 +72,8 @@ +--- chrome/browser/ungoogled_flag_entries.h.orig ++++ chrome/browser/ungoogled_flag_entries.h +@@ -76,4 +76,8 @@ "Disable QR Generator", "Disables the QR generator for sharing page links. ungoogled-chromium flag", kOsDesktop, FEATURE_VALUE_TYPE(kDisableQRGenerator)}, diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-omnibox-autocomplete-filtering.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-omnibox-autocomplete-filtering.patch @@ -1,5 +1,5 @@ ---- a/chrome/browser/ungoogled_flag_choices.h -+++ b/chrome/browser/ungoogled_flag_choices.h +--- chrome/browser/ungoogled_flag_choices.h.orig ++++ chrome/browser/ungoogled_flag_choices.h @@ -45,4 +45,19 @@ const FeatureEntry::Choice kBookmarkBarN "bookmark-bar-ntp", "never"}, @@ -20,9 +20,9 @@ + "search-bookmarks-chrome"}, +}; #endif // CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_ ---- a/chrome/browser/ungoogled_flag_entries.h -+++ b/chrome/browser/ungoogled_flag_entries.h -@@ -44,4 +44,8 @@ +--- chrome/browser/ungoogled_flag_entries.h.orig ++++ chrome/browser/ungoogled_flag_entries.h +@@ -48,4 +48,8 @@ "Bookmark Bar on New-Tab-Page", "Disable the Bookmark Bar on the New-Tab-Page. ungoogled-chromium flag.", kOsDesktop, MULTI_VALUE_TYPE(kBookmarkBarNewTab)}, @@ -31,8 +31,8 @@ + "Restrict omnibox autocomplete results to a combination of search suggestions (if enabled), bookmarks, and internal chrome pages. ungoogled-chromium flag.", + kOsAll, MULTI_VALUE_TYPE(kOmniboxAutocompleteFiltering)}, #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ ---- a/components/omnibox/browser/autocomplete_controller.cc -+++ b/components/omnibox/browser/autocomplete_controller.cc +--- components/omnibox/browser/autocomplete_controller.cc.orig ++++ components/omnibox/browser/autocomplete_controller.cc @@ -15,6 +15,8 @@ #include "base/bind.h" @@ -42,7 +42,7 @@ #include "base/feature_list.h" #include "base/format_macros.h" #include "base/metrics/histogram.h" -@@ -272,6 +274,15 @@ AutocompleteController::AutocompleteCont +@@ -276,6 +278,15 @@ AutocompleteController::AutocompleteCont search_service_worker_signal_sent_(false), template_url_service_(provider_client_->GetTemplateURLService()) { provider_types &= ~OmniboxFieldTrial::GetDisabledProviderTypes(); @@ -58,9 +58,9 @@ if (provider_types & AutocompleteProvider::TYPE_BOOKMARK) providers_.push_back(new BookmarkProvider(provider_client_.get())); if (provider_types & AutocompleteProvider::TYPE_BUILTIN) ---- a/components/omnibox/browser/history_url_provider.cc -+++ b/components/omnibox/browser/history_url_provider.cc -@@ -472,6 +472,9 @@ void HistoryURLProvider::Start(const Aut +--- components/omnibox/browser/history_url_provider.cc.orig ++++ components/omnibox/browser/history_url_provider.cc +@@ -551,6 +551,9 @@ void HistoryURLProvider::Start(const Aut if (fixed_up_input.type() != metrics::OmniboxInputType::QUERY) matches_.push_back(what_you_typed_match); @@ -70,8 +70,8 @@ // We'll need the history service to run both passes, so try to obtain it. history::HistoryService* const history_service = client()->GetHistoryService(); ---- a/components/omnibox/browser/search_provider.cc -+++ b/components/omnibox/browser/search_provider.cc +--- components/omnibox/browser/search_provider.cc.orig ++++ components/omnibox/browser/search_provider.cc @@ -12,6 +12,7 @@ #include "base/base64.h" #include "base/bind.h" @@ -90,8 +90,8 @@ // The history query results are synchronous, so if minimal_changes is true, // we still have the last results and don't need to do anything. if (minimal_changes) ---- a/components/url_formatter/url_fixer.cc -+++ b/components/url_formatter/url_fixer.cc +--- components/url_formatter/url_fixer.cc.orig ++++ components/url_formatter/url_fixer.cc @@ -9,6 +9,8 @@ #include <algorithm> diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-pdf-plugin-name.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-pdf-plugin-name.patch @@ -1,6 +1,6 @@ ---- a/chrome/browser/chrome_content_browser_client.cc -+++ b/chrome/browser/chrome_content_browser_client.cc -@@ -6068,7 +6068,7 @@ bool ChromeContentBrowserClient::ShouldA +--- chrome/browser/chrome_content_browser_client.cc.orig ++++ chrome/browser/chrome_content_browser_client.cc +@@ -6001,7 +6001,7 @@ bool ChromeContentBrowserClient::ShouldA const url::Origin& embedder_origin, const content::PepperPluginInfo& plugin_info) { #if BUILDFLAG(ENABLE_PDF) @@ -9,8 +9,8 @@ return IsPdfInternalPluginAllowedOrigin(embedder_origin); } #endif // BUILDFLAG(ENABLE_PDF) ---- a/chrome/browser/pdf/pdf_extension_util.cc -+++ b/chrome/browser/pdf/pdf_extension_util.cc +--- chrome/browser/pdf/pdf_extension_util.cc.orig ++++ chrome/browser/pdf/pdf_extension_util.cc @@ -170,7 +170,7 @@ std::string GetManifest() { DCHECK(manifest_contents.find(kNameTag) != std::string::npos); base::ReplaceFirstSubstringAfterOffset( @@ -20,9 +20,9 @@ return manifest_contents; } ---- a/chrome/browser/plugins/pdf_iframe_navigation_throttle_unittest.cc -+++ b/chrome/browser/plugins/pdf_iframe_navigation_throttle_unittest.cc -@@ -67,7 +67,7 @@ class PDFIFrameNavigationThrottleTest : +--- chrome/browser/plugins/pdf_iframe_navigation_throttle_unittest.cc.orig ++++ chrome/browser/plugins/pdf_iframe_navigation_throttle_unittest.cc +@@ -65,7 +65,7 @@ class PDFIFrameNavigationThrottleTest : // Register a fake PDF Viewer plugin into our plugin service. content::WebPluginInfo info; info.name = @@ -31,8 +31,8 @@ info.mime_types.push_back(content::WebPluginMimeType( kPDFMimeType, "pdf", "Fake PDF description")); plugin_service->RegisterInternalPlugin(info, true); ---- a/chrome/browser/plugins/plugin_prefs.cc -+++ b/chrome/browser/plugins/plugin_prefs.cc +--- chrome/browser/plugins/plugin_prefs.cc.orig ++++ chrome/browser/plugins/plugin_prefs.cc @@ -40,7 +40,7 @@ bool IsPDFViewerPlugin(const std::u16str // plugin, which is also used for Print Preview. Note that only the PDF viewer // and Print Preview can create the internal PDF plugin in the first place. @@ -42,8 +42,8 @@ } } // namespace ---- a/chrome/browser/plugins/plugin_prefs_unittest.cc -+++ b/chrome/browser/plugins/plugin_prefs_unittest.cc +--- chrome/browser/plugins/plugin_prefs_unittest.cc.orig ++++ chrome/browser/plugins/plugin_prefs_unittest.cc @@ -24,11 +24,11 @@ class PluginPrefsTest : public ::testing TEST_F(PluginPrefsTest, AlwaysOpenPdfExternally) { EXPECT_EQ(PluginPrefs::NO_POLICY, @@ -58,8 +58,8 @@ - ChromeContentClient::kPDFExtensionPluginName))); + ChromeContentClient::GetPDFExtensionPluginName()))); } ---- a/chrome/browser/resources/plugin_metadata/plugins_chromeos.json -+++ b/chrome/browser/resources/plugin_metadata/plugins_chromeos.json +--- chrome/browser/resources/plugin_metadata/plugins_chromeos.json.orig ++++ chrome/browser/resources/plugin_metadata/plugins_chromeos.json @@ -44,6 +44,19 @@ "name": "Chrome PDF Viewer", "group_name_matcher": "*Chrome PDF Viewer*" @@ -100,8 +100,8 @@ "chromium-pdf-plugin": { "mime_types": [ ], ---- a/chrome/browser/resources/plugin_metadata/plugins_linux.json -+++ b/chrome/browser/resources/plugin_metadata/plugins_linux.json +--- chrome/browser/resources/plugin_metadata/plugins_linux.json.orig ++++ chrome/browser/resources/plugin_metadata/plugins_linux.json @@ -36,6 +36,19 @@ "name": "Chrome PDF Viewer", "group_name_matcher": "*Chrome PDF Viewer*" @@ -142,8 +142,8 @@ "chromium-pdf-plugin": { "mime_types": [ ], ---- a/chrome/browser/resources/plugin_metadata/plugins_mac.json -+++ b/chrome/browser/resources/plugin_metadata/plugins_mac.json +--- chrome/browser/resources/plugin_metadata/plugins_mac.json.orig ++++ chrome/browser/resources/plugin_metadata/plugins_mac.json @@ -33,6 +33,19 @@ "name": "Chrome PDF Viewer", "group_name_matcher": "*Chrome PDF Viewer*" @@ -184,8 +184,8 @@ "chromium-pdf-plugin": { "mime_types": [ ], ---- a/chrome/browser/resources/plugin_metadata/plugins_win.json -+++ b/chrome/browser/resources/plugin_metadata/plugins_win.json +--- chrome/browser/resources/plugin_metadata/plugins_win.json.orig ++++ chrome/browser/resources/plugin_metadata/plugins_win.json @@ -33,6 +33,19 @@ "name": "Chrome PDF Viewer", "group_name_matcher": "*Chrome PDF Viewer*" @@ -226,8 +226,8 @@ "chromium-pdf-plugin": { "mime_types": [ ], ---- a/chrome/browser/ungoogled_flag_choices.h -+++ b/chrome/browser/ungoogled_flag_choices.h +--- chrome/browser/ungoogled_flag_choices.h.orig ++++ chrome/browser/ungoogled_flag_choices.h @@ -34,4 +34,9 @@ const FeatureEntry::Choice kScrollEventC "scroll-tabs", "never"} @@ -238,9 +238,9 @@ + {"Microsoft Edge", switches::kPDFPluginName, "edge"}, +}; #endif // CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_ ---- a/chrome/browser/ungoogled_flag_entries.h -+++ b/chrome/browser/ungoogled_flag_entries.h -@@ -36,4 +36,8 @@ +--- chrome/browser/ungoogled_flag_entries.h.orig ++++ chrome/browser/ungoogled_flag_entries.h +@@ -40,4 +40,8 @@ "Scroll switches tab", "Switch to the left/right tab if the wheel-scroll happens over the tabstrip, or the empty space beside the tabstrip. ungoogled-chromium flag.", kOsDesktop, MULTI_VALUE_TYPE(kScrollEventChangesTab)}, @@ -249,9 +249,9 @@ + "Sets the internal PDF viewer plugin name. Useful for sites that probe JS API navigator.plugins. ungoogled-chromium flag.", + kOsDesktop, MULTI_VALUE_TYPE(kPDFPluginNameChoices)}, #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ ---- a/chrome/common/BUILD.gn -+++ b/chrome/common/BUILD.gn -@@ -246,6 +246,7 @@ static_library("common") { +--- chrome/common/BUILD.gn.orig ++++ chrome/common/BUILD.gn +@@ -249,6 +249,7 @@ static_library("common") { "//components/no_state_prefetch/common", "//components/no_state_prefetch/common:mojo_bindings", "//components/page_load_metrics/common:common", @@ -259,9 +259,9 @@ ] if (enable_pdf) { ---- a/chrome/common/chrome_content_client.cc -+++ b/chrome/common/chrome_content_client.cc -@@ -126,7 +126,7 @@ void ComputeBuiltInPlugins(std::vector<c +--- chrome/common/chrome_content_client.cc.orig ++++ chrome/common/chrome_content_client.cc +@@ -122,7 +122,7 @@ void ComputeBuiltInPlugins(std::vector<c content::PepperPluginInfo pdf_info; pdf_info.is_internal = true; pdf_info.is_out_of_process = true; @@ -270,9 +270,9 @@ pdf_info.description = kPDFPluginDescription; pdf_info.path = base::FilePath(ChromeContentClient::kPDFPluginPath); content::WebPluginMimeType pdf_mime_type( ---- a/chrome/common/chrome_content_client.h -+++ b/chrome/common/chrome_content_client.h -@@ -41,8 +41,8 @@ class ChromeContentClient : public conte +--- chrome/common/chrome_content_client.h.orig ++++ chrome/common/chrome_content_client.h +@@ -42,8 +42,8 @@ class ChromeContentClient : public conte static const base::FilePath::CharType kNaClPluginFileName[]; #endif @@ -283,8 +283,8 @@ static const base::FilePath::CharType kPDFPluginPath[]; ChromeContentClient(); ---- a/chrome/common/chrome_content_client_constants.cc -+++ b/chrome/common/chrome_content_client_constants.cc +--- chrome/common/chrome_content_client_constants.cc.orig ++++ chrome/common/chrome_content_client_constants.cc @@ -2,8 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -358,9 +358,9 @@ const base::FilePath::CharType ChromeContentClient::kPDFPluginPath[] = FILE_PATH_LITERAL("internal-pdf-viewer"); ---- a/chrome/renderer/chrome_content_renderer_client.cc -+++ b/chrome/renderer/chrome_content_renderer_client.cc -@@ -1027,7 +1027,7 @@ WebPlugin* ChromeContentRendererClient:: +--- chrome/renderer/chrome_content_renderer_client.cc.orig ++++ chrome/renderer/chrome_content_renderer_client.cc +@@ -1047,7 +1047,7 @@ WebPlugin* ChromeContentRendererClient:: } } } else if (info.name == @@ -369,7 +369,7 @@ // Report PDF load metrics. Since the PDF plugin is comprised of an // extension that loads a second plugin, avoid double counting by // ignoring the creation of the second plugin. -@@ -1059,7 +1059,7 @@ WebPlugin* ChromeContentRendererClient:: +@@ -1079,7 +1079,7 @@ WebPlugin* ChromeContentRendererClient:: #if BUILDFLAG(ENABLE_PDF) if (info.name == @@ -378,7 +378,7 @@ return pdf::CreateInternalPlugin( info, std::move(params), render_frame, std::make_unique<ChromePdfInternalPluginDelegate>()); -@@ -1072,7 +1072,7 @@ WebPlugin* ChromeContentRendererClient:: +@@ -1092,7 +1092,7 @@ WebPlugin* ChromeContentRendererClient:: PluginUMAReporter::GetInstance()->ReportPluginDisabled(orig_mime_type, url); if (info.name == diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-qr-generator.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-qr-generator.patch @@ -1,21 +1,21 @@ ---- a/chrome/browser/sharing/features.cc -+++ b/chrome/browser/sharing/features.cc -@@ -26,3 +26,5 @@ const base::Feature kSharingSendViaSync{ - - const base::Feature kSharingPreferVapid { - "SharingPreferVapid", base::FEATURE_DISABLED_BY_DEFAULT}; +--- chrome/browser/sharing/features.cc.orig ++++ chrome/browser/sharing/features.cc +@@ -32,3 +32,5 @@ const base::Feature kSharingPreferVapid + base::FEATURE_DISABLED_BY_DEFAULT + #endif // defined(OS_ANDROID) + }; + +const base::Feature kDisableQRGenerator{"DisableQRGenerator", base::FEATURE_DISABLED_BY_DEFAULT}; ---- a/chrome/browser/sharing/features.h -+++ b/chrome/browser/sharing/features.h +--- chrome/browser/sharing/features.h.orig ++++ chrome/browser/sharing/features.h @@ -34,4 +34,5 @@ extern const base::Feature kSharingSendV // Feature flag for prefer sending sharing message using VAPID. extern const base::Feature kSharingPreferVapid; +extern const base::Feature kDisableQRGenerator; #endif // CHROME_BROWSER_SHARING_FEATURES_H_ ---- a/chrome/browser/ui/qrcode_generator/qrcode_generator_bubble_controller.cc -+++ b/chrome/browser/ui/qrcode_generator/qrcode_generator_bubble_controller.cc +--- chrome/browser/ui/qrcode_generator/qrcode_generator_bubble_controller.cc.orig ++++ chrome/browser/ui/qrcode_generator/qrcode_generator_bubble_controller.cc @@ -23,7 +23,7 @@ QRCodeGeneratorBubbleController::~QRCode // static @@ -25,9 +25,9 @@ return false; return true; ---- a/chrome/browser/ui/views/location_bar/location_bar_view.cc -+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc -@@ -298,7 +298,8 @@ void LocationBarView::Init() { +--- chrome/browser/ui/views/location_bar/location_bar_view.cc.orig ++++ chrome/browser/ui/views/location_bar/location_bar_view.cc +@@ -297,7 +297,8 @@ void LocationBarView::Init() { // the left most icon. params.types_enabled.push_back(PageActionIconType::kSendTabToSelf); params.types_enabled.push_back(PageActionIconType::kClickToCall); @@ -37,9 +37,9 @@ if (base::FeatureList::IsEnabled(kSharedClipboardUI)) params.types_enabled.push_back(PageActionIconType::kSharedClipboard); if (base::FeatureList::IsEnabled(kWebOTPCrossDevice)) ---- a/chrome/browser/ungoogled_flag_entries.h -+++ b/chrome/browser/ungoogled_flag_entries.h -@@ -68,4 +68,8 @@ +--- chrome/browser/ungoogled_flag_entries.h.orig ++++ chrome/browser/ungoogled_flag_entries.h +@@ -72,4 +72,8 @@ "Remove Tabsearch Button", "Removes the tabsearch button from the tabstrip. ungoogled-chromium flag", kOsDesktop, SINGLE_VALUE_TYPE("remove-tabsearch-button")}, diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-search-engine-collection.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-search-engine-collection.patch @@ -1,8 +1,8 @@ # Add flag to disable automatic search engine collection ---- a/chrome/browser/ungoogled_flag_entries.h -+++ b/chrome/browser/ungoogled_flag_entries.h -@@ -12,4 +12,8 @@ +--- chrome/browser/ungoogled_flag_entries.h.orig ++++ chrome/browser/ungoogled_flag_entries.h +@@ -16,4 +16,8 @@ "Handling of extension MIME type requests", "Used when deciding how to handle a request for a CRX or User Script MIME type. ungoogled-chromium flag.", kOsAll, MULTI_VALUE_TYPE(kExtensionHandlingChoices)}, @@ -11,8 +11,8 @@ + "Prevents search engines from being added automatically. ungoogled-chromium flag.", + kOsAll, SINGLE_VALUE_TYPE("disable-search-engine-collection")}, #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ ---- a/chrome/renderer/chrome_render_frame_observer.cc -+++ b/chrome/renderer/chrome_render_frame_observer.cc +--- chrome/renderer/chrome_render_frame_observer.cc.orig ++++ chrome/renderer/chrome_render_frame_observer.cc @@ -139,9 +139,10 @@ ChromeRenderFrameObserver::ChromeRenderF if (!render_frame->IsMainFrame()) return; @@ -25,7 +25,7 @@ if (!command_line.HasSwitch(switches::kDisableClientSidePhishingDetection)) SetClientSidePhishingDetection(); #endif -@@ -200,14 +201,16 @@ void ChromeRenderFrameObserver::DidFinis +@@ -201,14 +202,16 @@ void ChromeRenderFrameObserver::DidFinis if (frame->Parent()) return; @@ -50,9 +50,9 @@ } } ---- a/chrome/renderer/chrome_render_frame_observer.h -+++ b/chrome/renderer/chrome_render_frame_observer.h -@@ -138,6 +138,7 @@ class ChromeRenderFrameObserver : public +--- chrome/renderer/chrome_render_frame_observer.h.orig ++++ chrome/renderer/chrome_render_frame_observer.h +@@ -139,6 +139,7 @@ class ChromeRenderFrameObserver : public #if BUILDFLAG(SAFE_BROWSING_AVAILABLE) safe_browsing::PhishingClassifierDelegate* phishing_classifier_ = nullptr; #endif @@ -60,8 +60,8 @@ // Owned by ChromeContentRendererClient and outlive us. web_cache::WebCacheImpl* web_cache_impl_; ---- a/components/search_engines/template_url_service.cc -+++ b/components/search_engines/template_url_service.cc +--- components/search_engines/template_url_service.cc.orig ++++ components/search_engines/template_url_service.cc @@ -12,6 +12,7 @@ #include "base/bind.h" #include "base/callback.h" @@ -70,7 +70,7 @@ #include "base/containers/contains.h" #include "base/debug/crash_logging.h" #include "base/format_macros.h" -@@ -199,6 +200,12 @@ bool IsCreatedByExtension(const Template +@@ -197,6 +198,12 @@ bool IsCreatedByExtension(const Template template_url->type() == TemplateURL::OMNIBOX_API_EXTENSION; } @@ -83,7 +83,7 @@ } // namespace // TemplateURLService::LessWithPrefix ----------------------------------------- -@@ -284,6 +291,7 @@ TemplateURLService::TemplateURLService( +@@ -282,6 +289,7 @@ TemplateURLService::TemplateURLService( std::unique_ptr<TemplateURLServiceClient> client, const base::RepeatingClosure& dsp_change_callback) : prefs_(prefs), @@ -91,7 +91,7 @@ search_terms_data_(std::move(search_terms_data)), web_data_service_(web_data_service), client_(std::move(client)), -@@ -365,8 +373,8 @@ bool TemplateURLService::CanAddAutogener +@@ -363,8 +371,8 @@ bool TemplateURLService::CanAddAutogener // that may interfere with search queries). An easy heuristic for this is // whether the user has a TemplateURL that has been manually modified (e.g., // renamed) connected to the same host. @@ -102,7 +102,7 @@ } bool TemplateURLService::IsPrepopulatedOrCreatedByPolicy( -@@ -1502,6 +1510,8 @@ SyncDataMap TemplateURLService::CreateGU +@@ -1496,6 +1504,8 @@ SyncDataMap TemplateURLService::CreateGU void TemplateURLService::Init(const Initializer* initializers, int num_initializers) { @@ -111,7 +111,7 @@ if (client_) client_->SetOwner(this); -@@ -1638,6 +1648,9 @@ void TemplateURLService::ChangeToLoadedS +@@ -1632,6 +1642,9 @@ void TemplateURLService::ChangeToLoadedS bool TemplateURLService::CanAddAutogeneratedKeywordForHost( const std::string& host) const { @@ -121,11 +121,11 @@ const TemplateURLSet* urls = provider_map_->GetURLsForHost(host); if (!urls) return true; ---- a/components/search_engines/template_url_service.h -+++ b/components/search_engines/template_url_service.h +--- components/search_engines/template_url_service.h.orig ++++ components/search_engines/template_url_service.h @@ -706,6 +706,8 @@ class TemplateURLService : public WebDat // ---------- Browser state related members --------------------------------- - raw_ptr<PrefService> prefs_ = nullptr; + PrefService* prefs_ = nullptr; + bool should_autocollect_; // Whether search engines should be auto-collected + diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-tab-hover-cards.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-tab-hover-cards.patch @@ -1,5 +1,5 @@ ---- a/chrome/browser/ui/views/tabs/tab.cc -+++ b/chrome/browser/ui/views/tabs/tab.cc +--- chrome/browser/ui/views/tabs/tab.cc.orig ++++ chrome/browser/ui/views/tabs/tab.cc @@ -12,6 +12,7 @@ #include <utility> @@ -7,7 +7,7 @@ +#include "base/command_line.h" #include "base/debug/alias.h" #include "base/i18n/rtl.h" - #include "base/memory/raw_ptr.h" + #include "base/metrics/user_metrics.h" @@ -641,6 +642,8 @@ void Tab::OnGestureEvent(ui::GestureEven } @@ -17,9 +17,9 @@ // Tab hover cards replace tooltips for tabs. return std::u16string(); } ---- a/chrome/browser/ui/views/tabs/tab_strip.cc -+++ b/chrome/browser/ui/views/tabs/tab_strip.cc -@@ -16,6 +16,7 @@ +--- chrome/browser/ui/views/tabs/tab_strip.cc.orig ++++ chrome/browser/ui/views/tabs/tab_strip.cc +@@ -15,6 +15,7 @@ #include "base/bind.h" #include "base/callback.h" @@ -27,7 +27,7 @@ #include "base/compiler_specific.h" #include "base/containers/adapters.h" #include "base/containers/contains.h" -@@ -1904,6 +1905,8 @@ void TabStrip::OnMouseEventInTab(views:: +@@ -2153,6 +2154,8 @@ void TabStrip::OnMouseEventInTab(views:: } void TabStrip::UpdateHoverCard(Tab* tab, HoverCardUpdateType update_type) { @@ -36,8 +36,8 @@ // Some operations (including e.g. starting a drag) can cause the tab focus // to change at the same time as the tabstrip is starting to animate; the // hover card should not be visible at this time. ---- a/chrome/browser/ungoogled_flag_choices.h -+++ b/chrome/browser/ungoogled_flag_choices.h +--- chrome/browser/ungoogled_flag_choices.h.orig ++++ chrome/browser/ungoogled_flag_choices.h @@ -75,4 +75,13 @@ const FeatureEntry::Choice kCloseConfirm "close-confirmation", "multiple"}, @@ -52,9 +52,9 @@ + "tooltip"}, +}; #endif // CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_ ---- a/chrome/browser/ungoogled_flag_entries.h -+++ b/chrome/browser/ungoogled_flag_entries.h -@@ -84,4 +84,8 @@ +--- chrome/browser/ungoogled_flag_entries.h.orig ++++ chrome/browser/ungoogled_flag_entries.h +@@ -88,4 +88,8 @@ "Custom New Tab Page", "Allows setting a custom URL for the new tab page. Value can be internal (e.g. `about:blank`), external (e.g. `example.com`), or local (e.g. `file:///tmp/startpage.html`). This applies for incognito windows as well when not set to a `chrome://` internal page. ungoogled-chromium flag", kOsDesktop, ORIGIN_LIST_VALUE_TYPE("custom-ntp", "")}, diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-tabsearch-button.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-tabsearch-button.patch @@ -1,6 +1,6 @@ ---- a/chrome/browser/ui/browser_command_controller.cc -+++ b/chrome/browser/ui/browser_command_controller.cc -@@ -1160,7 +1160,8 @@ void BrowserCommandController::InitComma +--- chrome/browser/ui/browser_command_controller.cc.orig ++++ chrome/browser/ui/browser_command_controller.cc +@@ -1139,7 +1139,8 @@ void BrowserCommandController::InitComma command_updater_.UpdateCommandEnabled(IDC_WINDOW_CLOSE_OTHER_TABS, normal_window); @@ -10,8 +10,8 @@ command_updater_.UpdateCommandEnabled(IDC_TAB_SEARCH, enable_tab_search_commands); command_updater_.UpdateCommandEnabled(IDC_TAB_SEARCH_CLOSE, ---- a/chrome/browser/ui/views/frame/tab_strip_region_view.cc -+++ b/chrome/browser/ui/views/frame/tab_strip_region_view.cc +--- chrome/browser/ui/views/frame/tab_strip_region_view.cc.orig ++++ chrome/browser/ui/views/frame/tab_strip_region_view.cc @@ -5,6 +5,7 @@ #include "chrome/browser/ui/views/frame/tab_strip_region_view.h" @@ -20,19 +20,19 @@ #include "base/strings/utf_string_conversions.h" #include "build/build_config.h" #include "chrome/browser/themes/theme_properties.h" -@@ -137,7 +138,8 @@ TabStripRegionView::TabStripRegionView(s +@@ -132,7 +133,8 @@ TabStripRegionView::TabStripRegionView(s return; - } - -- if (browser->is_type_normal()) { -+ if (browser->is_type_normal() && + #endif + const Browser* browser = tab_strip_->controller()->GetBrowser(); +- if (browser && browser->is_type_normal()) { ++ if (browser && browser->is_type_normal() && + !base::CommandLine::ForCurrentProcess()->HasSwitch("remove-tabsearch-button")) { auto tab_search_button = std::make_unique<TabSearchButton>(tab_strip_); tab_search_button->SetTooltipText( l10n_util::GetStringUTF16(IDS_TOOLTIP_TAB_SEARCH)); ---- a/chrome/browser/ungoogled_flag_entries.h -+++ b/chrome/browser/ungoogled_flag_entries.h -@@ -64,4 +64,8 @@ +--- chrome/browser/ungoogled_flag_entries.h.orig ++++ chrome/browser/ungoogled_flag_entries.h +@@ -68,4 +68,8 @@ "Clear data on exit", "Clears all browsing data on exit. ungoogled-chromium flag", kOsDesktop, FEATURE_VALUE_TYPE(browsing_data::features::kClearDataOnExit)}, diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-clear-data-on-exit.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-clear-data-on-exit.patch @@ -1,6 +1,6 @@ ---- a/chrome/browser/browsing_data/chrome_browsing_data_lifetime_manager.cc -+++ b/chrome/browser/browsing_data/chrome_browsing_data_lifetime_manager.cc -@@ -25,6 +25,7 @@ +--- chrome/browser/browsing_data/chrome_browsing_data_lifetime_manager.cc.orig ++++ chrome/browser/browsing_data/chrome_browsing_data_lifetime_manager.cc +@@ -24,6 +24,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/sync/sync_service_factory.h" @@ -8,7 +8,7 @@ #include "components/browsing_data/core/pref_names.h" #include "components/keep_alive_registry/keep_alive_types.h" #include "components/keep_alive_registry/scoped_keep_alive.h" -@@ -157,6 +158,21 @@ class BrowsingDataRemoverObserver +@@ -151,6 +152,21 @@ class BrowsingDataRemoverObserver #endif }; @@ -29,20 +29,20 @@ + uint64_t GetOriginTypeMask(const base::Value& data_types) { uint64_t result = 0; - for (const auto& data_type : data_types.GetListDeprecated()) { -@@ -307,8 +323,9 @@ void ChromeBrowsingDataLifetimeManager:: + for (const auto& data_type : data_types.GetList()) { +@@ -292,8 +308,9 @@ void ChromeBrowsingDataLifetimeManager:: bool keep_browser_alive) { auto* data_types = profile_->GetPrefs()->GetList( browsing_data::prefs::kClearBrowsingDataOnExitList); -- if (data_types && !data_types->GetListDeprecated().empty() && +- if (data_types && !data_types->GetList().empty() && - !SyncServiceFactory::IsSyncAllowed(profile_)) { + bool cdoe = base::FeatureList::IsEnabled(browsing_data::features::kClearDataOnExit); -+ if (cdoe || (data_types && !data_types->GetListDeprecated().empty() && ++ if (cdoe || (data_types && !data_types->GetList().empty() && + !SyncServiceFactory::IsSyncAllowed(profile_))) { profile_->GetPrefs()->SetBoolean( browsing_data::prefs::kClearBrowsingDataOnExitDeletionPending, true); auto* remover = profile_->GetBrowsingDataRemover(); -@@ -319,8 +336,8 @@ void ChromeBrowsingDataLifetimeManager:: +@@ -304,8 +321,8 @@ void ChromeBrowsingDataLifetimeManager:: DCHECK(keep_browser_alive); #endif remover->RemoveAndReply(base::Time(), base::Time::Max(), @@ -53,8 +53,8 @@ BrowsingDataRemoverObserver::Create( remover, /*filterable_deletion=*/true, profile_, keep_browser_alive)); ---- a/chrome/browser/browsing_data/chrome_browsing_data_lifetime_manager_factory.cc -+++ b/chrome/browser/browsing_data/chrome_browsing_data_lifetime_manager_factory.cc +--- chrome/browser/browsing_data/chrome_browsing_data_lifetime_manager_factory.cc.orig ++++ chrome/browser/browsing_data/chrome_browsing_data_lifetime_manager_factory.cc @@ -48,6 +48,8 @@ ChromeBrowsingDataLifetimeManagerFactory KeyedService* ChromeBrowsingDataLifetimeManagerFactory::BuildServiceInstanceFor( content::BrowserContext* context) const { @@ -64,9 +64,9 @@ browsing_data::features::kEnableBrowsingDataLifetimeManager)) return nullptr; Profile* profile = Profile::FromBrowserContext(context); ---- a/chrome/browser/ungoogled_flag_entries.h -+++ b/chrome/browser/ungoogled_flag_entries.h -@@ -60,4 +60,8 @@ +--- chrome/browser/ungoogled_flag_entries.h.orig ++++ chrome/browser/ungoogled_flag_entries.h +@@ -64,4 +64,8 @@ "Keep old history", "Keep history older than 3 months. ungoogled-chromium flag", kOsAll, SINGLE_VALUE_TYPE("keep-old-history")}, @@ -75,8 +75,8 @@ + "Clears all browsing data on exit. ungoogled-chromium flag", + kOsDesktop, FEATURE_VALUE_TYPE(browsing_data::features::kClearDataOnExit)}, #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ ---- a/components/browsing_data/core/features.cc -+++ b/components/browsing_data/core/features.cc +--- components/browsing_data/core/features.cc.orig ++++ components/browsing_data/core/features.cc @@ -19,5 +19,7 @@ const base::Feature kEnableBrowsingDataL const base::Feature kEnableBrowsingDataLifetimeManager{ "BrowsingDataLifetimeManager", base::FEATURE_ENABLED_BY_DEFAULT}; @@ -85,8 +85,8 @@ +const base::Feature kClearDataOnExit{"ClearDataOnExit", base::FEATURE_DISABLED_BY_DEFAULT}; } // namespace features } // namespace browsing_data ---- a/components/browsing_data/core/features.h -+++ b/components/browsing_data/core/features.h +--- components/browsing_data/core/features.h.orig ++++ components/browsing_data/core/features.h @@ -17,6 +17,7 @@ extern const base::Feature kEnableRemovi // defined by the BrowsingDataLifetime policy. extern const base::Feature kEnableBrowsingDataLifetimeManager; diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-close-window-with-last-tab.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-close-window-with-last-tab.patch @@ -1,5 +1,5 @@ ---- a/chrome/browser/ui/tabs/tab_strip_model.cc -+++ b/chrome/browser/ui/tabs/tab_strip_model.cc +--- chrome/browser/ui/tabs/tab_strip_model.cc.orig ++++ chrome/browser/ui/tabs/tab_strip_model.cc @@ -11,6 +11,7 @@ #include <utility> @@ -7,8 +7,8 @@ +#include "base/command_line.h" #include "base/containers/flat_map.h" #include "base/cxx17_backports.h" - #include "base/memory/raw_ptr.h" -@@ -1875,6 +1876,10 @@ bool TabStripModel::CloseTabs(base::span + #include "base/metrics/histogram_macros.h" +@@ -1779,6 +1780,10 @@ bool TabStripModel::CloseTabs(base::span if (items.empty()) return true; @@ -19,8 +19,8 @@ const bool closing_all = static_cast<int>(items.size()) == count(); base::WeakPtr<TabStripModel> ref = weak_factory_.GetWeakPtr(); if (closing_all) { ---- a/chrome/browser/ungoogled_flag_choices.h -+++ b/chrome/browser/ungoogled_flag_choices.h +--- chrome/browser/ungoogled_flag_choices.h.orig ++++ chrome/browser/ungoogled_flag_choices.h @@ -60,4 +60,10 @@ const FeatureEntry::Choice kOmniboxAutoc "omnibox-autocomplete-filtering", "search-bookmarks-chrome"}, @@ -32,9 +32,9 @@ + "never"}, +}; #endif // CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_ ---- a/chrome/browser/ungoogled_flag_entries.h -+++ b/chrome/browser/ungoogled_flag_entries.h -@@ -48,4 +48,8 @@ +--- chrome/browser/ungoogled_flag_entries.h.orig ++++ chrome/browser/ungoogled_flag_entries.h +@@ -52,4 +52,8 @@ "Omnibox Autocomplete Filtering", "Restrict omnibox autocomplete results to a combination of search suggestions (if enabled), bookmarks, and internal chrome pages. ungoogled-chromium flag.", kOsAll, MULTI_VALUE_TYPE(kOmniboxAutocompleteFiltering)}, diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-configure-extension-downloading.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-configure-extension-downloading.patch @@ -1,8 +1,8 @@ # Add extension-mime-request-handling chrome://flag to tweak the behavior of # extension MIME types ---- a/chrome/browser/download/download_crx_util.cc -+++ b/chrome/browser/download/download_crx_util.cc +--- chrome/browser/download/download_crx_util.cc.orig ++++ chrome/browser/download/download_crx_util.cc @@ -8,6 +8,7 @@ #include <memory> @@ -35,8 +35,8 @@ } else { return false; } ---- a/chrome/browser/download/download_crx_util.h -+++ b/chrome/browser/download/download_crx_util.h +--- chrome/browser/download/download_crx_util.h.orig ++++ chrome/browser/download/download_crx_util.h @@ -43,6 +43,10 @@ scoped_refptr<extensions::CrxInstaller> Profile* profile, const download::DownloadItem& download_item); @@ -48,9 +48,9 @@ // Returns true if this is an extension download. This also considers user // scripts to be extension downloads, since we convert those automatically. bool IsExtensionDownload(const download::DownloadItem& download_item); ---- a/chrome/browser/download/download_target_determiner.cc -+++ b/chrome/browser/download/download_target_determiner.cc -@@ -1057,10 +1057,12 @@ DownloadConfirmationReason DownloadTarge +--- chrome/browser/download/download_target_determiner.cc.orig ++++ chrome/browser/download/download_target_determiner.cc +@@ -1059,10 +1059,12 @@ DownloadConfirmationReason DownloadTarge return DownloadConfirmationReason::SAVE_AS; #if BUILDFLAG(ENABLE_EXTENSIONS) @@ -67,8 +67,8 @@ #endif // Don't prompt for file types that are marked for opening automatically. ---- a/chrome/browser/extensions/extension_management.cc -+++ b/chrome/browser/extensions/extension_management.cc +--- chrome/browser/extensions/extension_management.cc.orig ++++ chrome/browser/extensions/extension_management.cc @@ -10,6 +10,7 @@ #include "base/bind.h" @@ -91,8 +91,8 @@ // No allowed install sites specified, disallow by default. if (!global_settings_->has_restricted_install_sources) return false; ---- a/chrome/browser/ungoogled_flag_choices.h -+++ b/chrome/browser/ungoogled_flag_choices.h +--- chrome/browser/ungoogled_flag_choices.h.orig ++++ chrome/browser/ungoogled_flag_choices.h @@ -4,4 +4,13 @@ #ifndef CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_ @@ -107,12 +107,12 @@ + "always-prompt-for-install"}, +}; #endif // CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_ ---- a/chrome/browser/ungoogled_flag_entries.h -+++ b/chrome/browser/ungoogled_flag_entries.h -@@ -8,4 +8,8 @@ - "SetIpv6ProbeFalse", - "Forces the result of the browser's IPv6 probing (i.e. IPv6 connectivity test) to be unsuccessful. This causes IPv4 addresses to be prioritized over IPv6 addresses. Without this flag, the probing result is set to be successful, which causes IPv6 to be used over IPv4 when possible. ungoogled-chromium flag.", - kOsAll, FEATURE_VALUE_TYPE(net::features::kSetIpv6ProbeFalse)}, +--- chrome/browser/ungoogled_flag_entries.h.orig ++++ chrome/browser/ungoogled_flag_entries.h +@@ -12,4 +12,8 @@ + "Enable stacking in the tab strip", + "Forces tabs to be stacked in the tab strip. Otherwise, they follow default behavior. ungoogled-chromium flag.", + kOsAll, SINGLE_VALUE_TYPE("enable-stacked-tab-strip")}, + {"extension-mime-request-handling", + "Handling of extension MIME type requests", + "Used when deciding how to handle a request for a CRX or User Script MIME type. ungoogled-chromium flag.", diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-convert-popups-to-tabs.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-convert-popups-to-tabs.patch @@ -1,8 +1,8 @@ # Make popups go to tabs instead ---- a/chrome/browser/ungoogled_flag_entries.h -+++ b/chrome/browser/ungoogled_flag_entries.h -@@ -52,4 +52,8 @@ +--- chrome/browser/ungoogled_flag_entries.h.orig ++++ chrome/browser/ungoogled_flag_entries.h +@@ -56,4 +56,8 @@ "Close window with last tab", "Determines whether a window should close once the last tab is closed. ungoogled-chromium flag.", kOsDesktop, MULTI_VALUE_TYPE(kCloseWindowWithLastTab)}, @@ -11,20 +11,19 @@ + "Makes popups open in new tabs. ungoogled-chromium flag", + kOsAll, SINGLE_VALUE_TYPE("popups-to-tabs")}, #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ ---- a/content/renderer/render_view_impl.cc -+++ b/content/renderer/render_view_impl.cc -@@ -74,6 +74,9 @@ WindowOpenDisposition RenderViewImpl::Na +--- content/renderer/render_view_impl.cc.orig ++++ content/renderer/render_view_impl.cc +@@ -73,6 +73,8 @@ WindowOpenDisposition RenderViewImpl::Na case blink::kWebNavigationPolicyNewWindow: return WindowOpenDisposition::NEW_WINDOW; case blink::kWebNavigationPolicyNewPopup: + if (base::CommandLine::ForCurrentProcess()->HasSwitch("popups-to-tabs")) + return WindowOpenDisposition::NEW_FOREGROUND_TAB; -+ return WindowOpenDisposition::NEW_POPUP; - case blink::kWebNavigationPolicyPictureInPicture: return WindowOpenDisposition::NEW_POPUP; default: ---- a/ui/base/mojom/window_open_disposition_mojom_traits.h -+++ b/ui/base/mojom/window_open_disposition_mojom_traits.h + NOTREACHED() << "Unexpected WebNavigationPolicy"; +--- ui/base/mojom/window_open_disposition_mojom_traits.h.orig ++++ ui/base/mojom/window_open_disposition_mojom_traits.h @@ -5,6 +5,7 @@ #ifndef UI_BASE_MOJOM_WINDOW_OPEN_DISPOSITION_MOJOM_TRAITS_H_ #define UI_BASE_MOJOM_WINDOW_OPEN_DISPOSITION_MOJOM_TRAITS_H_ @@ -33,16 +32,16 @@ #include "base/notreached.h" #include "mojo/public/cpp/bindings/enum_traits.h" #include "ui/base/mojom/window_open_disposition.mojom.h" -@@ -30,6 +31,8 @@ struct EnumTraits<ui::mojom::WindowOpenD - case WindowOpenDisposition::NEW_PICTURE_IN_PICTURE: - return ui::mojom::WindowOpenDisposition::NEW_PICTURE_IN_PICTURE; +@@ -28,6 +29,8 @@ struct EnumTraits<ui::mojom::WindowOpenD + case WindowOpenDisposition::NEW_BACKGROUND_TAB: + return ui::mojom::WindowOpenDisposition::NEW_BACKGROUND_TAB; case WindowOpenDisposition::NEW_POPUP: + if (base::CommandLine::ForCurrentProcess()->HasSwitch("popups-to-tabs")) + return ui::mojom::WindowOpenDisposition::NEW_FOREGROUND_TAB; return ui::mojom::WindowOpenDisposition::NEW_POPUP; case WindowOpenDisposition::NEW_WINDOW: return ui::mojom::WindowOpenDisposition::NEW_WINDOW; -@@ -68,6 +71,8 @@ struct EnumTraits<ui::mojom::WindowOpenD +@@ -63,6 +66,8 @@ struct EnumTraits<ui::mojom::WindowOpenD return true; case ui::mojom::WindowOpenDisposition::NEW_POPUP: *out = WindowOpenDisposition::NEW_POPUP; diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-disable-beforeunload.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-disable-beforeunload.patch @@ -1,8 +1,8 @@ # Add --disable-beforeunload to always disable beforeunload JavaScript dialogs ---- a/chrome/browser/ungoogled_flag_entries.h -+++ b/chrome/browser/ungoogled_flag_entries.h -@@ -16,4 +16,8 @@ +--- chrome/browser/ungoogled_flag_entries.h.orig ++++ chrome/browser/ungoogled_flag_entries.h +@@ -20,4 +20,8 @@ "Disable search engine collection", "Prevents search engines from being added automatically. ungoogled-chromium flag.", kOsAll, SINGLE_VALUE_TYPE("disable-search-engine-collection")}, @@ -11,17 +11,17 @@ + "Disables JavaScript dialog boxes triggered by beforeunload. ungoogled-chromium flag.", + kOsAll, SINGLE_VALUE_TYPE("disable-beforeunload")}, #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ ---- a/components/javascript_dialogs/app_modal_dialog_manager.cc -+++ b/components/javascript_dialogs/app_modal_dialog_manager.cc +--- components/javascript_dialogs/app_modal_dialog_manager.cc.orig ++++ components/javascript_dialogs/app_modal_dialog_manager.cc @@ -8,6 +8,7 @@ #include <utility> #include "base/bind.h" +#include "base/command_line.h" #include "base/i18n/rtl.h" + #include "base/macros.h" #include "base/metrics/histogram_macros.h" - #include "base/strings/utf_string_conversions.h" -@@ -195,7 +196,8 @@ void AppModalDialogManager::RunBeforeUnl +@@ -196,7 +197,8 @@ void AppModalDialogManager::RunBeforeUnl ChromeJavaScriptDialogExtraData* extra_data = &javascript_dialog_extra_data_[web_contents]; diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-disable-local-history-expiration.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-disable-local-history-expiration.patch @@ -1,8 +1,8 @@ # Keep local history longer than 90 days ---- a/chrome/browser/ungoogled_flag_entries.h -+++ b/chrome/browser/ungoogled_flag_entries.h -@@ -56,4 +56,8 @@ +--- chrome/browser/ungoogled_flag_entries.h.orig ++++ chrome/browser/ungoogled_flag_entries.h +@@ -60,4 +60,8 @@ "Popups to tabs", "Makes popups open in new tabs. ungoogled-chromium flag", kOsAll, SINGLE_VALUE_TYPE("popups-to-tabs")}, @@ -11,8 +11,8 @@ + "Keep history older than 3 months. ungoogled-chromium flag", + kOsAll, SINGLE_VALUE_TYPE("keep-old-history")}, #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ ---- a/components/history/core/browser/history_backend.cc -+++ b/components/history/core/browser/history_backend.cc +--- components/history/core/browser/history_backend.cc.orig ++++ components/history/core/browser/history_backend.cc @@ -15,6 +15,7 @@ #include <vector> @@ -21,7 +21,7 @@ #include "base/callback_helpers.h" #include "base/compiler_specific.h" #include "base/containers/flat_set.h" -@@ -977,7 +978,8 @@ void HistoryBackend::InitImpl( +@@ -911,7 +912,8 @@ void HistoryBackend::InitImpl( db_->GetStartDate(&first_recorded_time_); // Start expiring old stuff. diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-force-punycode-hostnames.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-force-punycode-hostnames.patch @@ -1,8 +1,8 @@ # Add flag to force punycode in hostnames instead of Unicode when displaying Internationalized Domain Names (IDNs) to mitigate homograph attacks ---- a/chrome/browser/ungoogled_flag_entries.h -+++ b/chrome/browser/ungoogled_flag_entries.h -@@ -20,4 +20,8 @@ +--- chrome/browser/ungoogled_flag_entries.h.orig ++++ chrome/browser/ungoogled_flag_entries.h +@@ -24,4 +24,8 @@ "Disable beforeunload", "Disables JavaScript dialog boxes triggered by beforeunload. ungoogled-chromium flag.", kOsAll, SINGLE_VALUE_TYPE("disable-beforeunload")}, @@ -11,17 +11,17 @@ + "Force punycode in hostnames instead of Unicode when displaying Internationalized Domain Names (IDNs). ungoogled-chromium flag.", + kOsAll, SINGLE_VALUE_TYPE("force-punycode-hostnames")}, #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ ---- a/components/url_formatter/url_formatter.cc -+++ b/components/url_formatter/url_formatter.cc -@@ -9,6 +9,7 @@ +--- components/url_formatter/url_formatter.cc.orig ++++ components/url_formatter/url_formatter.cc +@@ -8,6 +8,7 @@ #include <utility> #include <vector> +#include "base/command_line.h" #include "base/lazy_instance.h" - #include "base/memory/raw_ptr.h" #include "base/numerics/safe_conversions.h" -@@ -270,6 +271,13 @@ IDNConversionResult IDNToUnicodeWithAdju + #include "base/strings/strcat.h" +@@ -264,6 +265,13 @@ IDNConversionResult IDNToUnicodeWithAdju host16.reserve(host.length()); host16.insert(host16.end(), host.begin(), host.end()); diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-hide-crashed-bubble.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-hide-crashed-bubble.patch @@ -1,21 +1,21 @@ # Add flag --hide-crashed-bubble to hide the bubble box: # "Restore Pages? Chromium didn't shut down correctly." ---- a/chrome/browser/ui/startup/infobar_utils.cc -+++ b/chrome/browser/ui/startup/infobar_utils.cc -@@ -80,7 +80,8 @@ void AddInfoBarsIfNecessary(Browser* bro +--- chrome/browser/ui/startup/startup_browser_creator_impl.cc.orig ++++ chrome/browser/ui/startup/startup_browser_creator_impl.cc +@@ -648,7 +648,8 @@ void StartupBrowserCreatorImpl::AddInfoB + if (command_line_.HasSwitch(switches::kKioskMode)) return; - // Web apps should not display the session restore bubble (crbug.com/1264121) -- if (!is_web_app && HasPendingUncleanExit(browser->profile())) -+ if (!is_web_app && HasPendingUncleanExit(browser->profile()) && -+ !startup_command_line.HasSwitch("hide-crashed-bubble")) +- if (HasPendingUncleanExit(browser->profile())) ++ if (HasPendingUncleanExit(browser->profile()) && ++ !command_line_.HasSwitch("hide-crashed-bubble")) SessionCrashedBubble::ShowIfNotOffTheRecordProfile( browser, /*skip_tab_checking=*/false); ---- a/chrome/browser/ungoogled_flag_entries.h -+++ b/chrome/browser/ungoogled_flag_entries.h -@@ -28,4 +28,8 @@ +--- chrome/browser/ungoogled_flag_entries.h.orig ++++ chrome/browser/ungoogled_flag_entries.h +@@ -32,4 +32,8 @@ "Show avatar/people/profile button", "Show avatar/people/profile button in the browser toolbar. ungoogled-chromium flag.", kOsDesktop, MULTI_VALUE_TYPE(kShowAvatarButtonChoices)}, diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-hide-tab-close-buttons.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-hide-tab-close-buttons.patch @@ -1,29 +1,17 @@ ---- a/chrome/browser/ui/views/tabs/tab.cc -+++ b/chrome/browser/ui/views/tabs/tab.cc -@@ -978,7 +978,11 @@ void Tab::UpdateIconVisibility() { - if (IsActive()) { - // Close button is shown on active tabs regardless of the size. - showing_close_button_ = true; -+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("hide-tab-close-buttons")) { -+ showing_close_button_ = false; -+ } else { - available_width -= close_button_width; -+ } +--- chrome/browser/ui/views/tabs/tab_strip.cc.orig ++++ chrome/browser/ui/views/tabs/tab_strip.cc +@@ -1909,6 +1909,8 @@ bool TabStrip::SupportsMultipleSelection + } - showing_alert_indicator_ = - has_alert_icon && alert_icon_width <= available_width; -@@ -999,6 +1003,8 @@ void Tab::UpdateIconVisibility() { - available_width -= favicon_width; - - showing_close_button_ = large_enough_for_close_button; -+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("hide-tab-close-buttons")) -+ showing_close_button_ = false; - if (showing_close_button_) - available_width -= close_button_width; - ---- a/chrome/browser/ungoogled_flag_entries.h -+++ b/chrome/browser/ungoogled_flag_entries.h -@@ -88,4 +88,8 @@ + bool TabStrip::ShouldHideCloseButtonForTab(Tab* tab) const { ++ if (base::CommandLine::ForCurrentProcess()->HasSwitch("hide-tab-close-buttons")) ++ return true; + if (tab->IsActive()) + return false; + return !!touch_layout_; +--- chrome/browser/ungoogled_flag_entries.h.orig ++++ chrome/browser/ungoogled_flag_entries.h +@@ -92,4 +92,8 @@ "Tab Hover Cards", "Allows removing the tab hover cards or using a tooltip as a replacement. ungoogled-chromium flag.", kOsDesktop, MULTI_VALUE_TYPE(kTabHoverCards)}, diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-scroll-tabs.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-scroll-tabs.patch @@ -1,5 +1,5 @@ ---- a/chrome/browser/ui/views/frame/browser_root_view.cc -+++ b/chrome/browser/ui/views/frame/browser_root_view.cc +--- chrome/browser/ui/views/frame/browser_root_view.cc.orig ++++ chrome/browser/ui/views/frame/browser_root_view.cc @@ -11,6 +11,7 @@ #include "base/bind.h" @@ -38,7 +38,7 @@ BrowserRootView::~BrowserRootView() { // It's possible to destroy the browser while a drop is active. In this case, -@@ -255,7 +270,7 @@ bool BrowserRootView::OnMouseWheel(const +@@ -245,7 +260,7 @@ bool BrowserRootView::OnMouseWheel(const // Scroll-event-changes-tab is incompatible with scrolling tabstrip, so // disable it if the latter feature is enabled. @@ -47,9 +47,9 @@ !base::FeatureList::IsEnabled(features::kScrollableTabStrip)) { // Switch to the left/right tab if the wheel-scroll happens over the // tabstrip, or the empty space beside the tabstrip. ---- a/chrome/browser/ui/views/frame/browser_root_view.h -+++ b/chrome/browser/ui/views/frame/browser_root_view.h -@@ -144,6 +144,8 @@ class BrowserRootView : public views::in +--- chrome/browser/ui/views/frame/browser_root_view.h.orig ++++ chrome/browser/ui/views/frame/browser_root_view.h +@@ -143,6 +143,8 @@ class BrowserRootView : public views::in int scroll_remainder_x_ = 0; int scroll_remainder_y_ = 0; @@ -58,8 +58,8 @@ std::unique_ptr<DropInfo> drop_info_; base::WeakPtrFactory<BrowserRootView> weak_ptr_factory_{this}; ---- a/chrome/browser/ungoogled_flag_choices.h -+++ b/chrome/browser/ungoogled_flag_choices.h +--- chrome/browser/ungoogled_flag_choices.h.orig ++++ chrome/browser/ungoogled_flag_choices.h @@ -25,4 +25,13 @@ const FeatureEntry::Choice kShowAvatarBu "show-avatar-button", "never"} @@ -74,9 +74,9 @@ + "never"} +}; #endif // CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_ ---- a/chrome/browser/ungoogled_flag_entries.h -+++ b/chrome/browser/ungoogled_flag_entries.h -@@ -32,4 +32,8 @@ +--- chrome/browser/ungoogled_flag_entries.h.orig ++++ chrome/browser/ungoogled_flag_entries.h +@@ -36,4 +36,8 @@ "Hide crashed bubble", "Hides the bubble box with the message \"Restore Pages? Chromium didn't shut down correctly.\" that shows on startup after the browser did not exit cleanly. ungoogled-chromium flag.", kOsAll, SINGLE_VALUE_TYPE("hide-crashed-bubble")}, diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-show-avatar-button.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-show-avatar-button.patch @@ -1,6 +1,6 @@ ---- a/chrome/browser/ui/views/toolbar/toolbar_view.cc -+++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc -@@ -282,14 +282,30 @@ void ToolbarView::Init() { +--- chrome/browser/ui/views/toolbar/toolbar_view.cc.orig ++++ chrome/browser/ui/views/toolbar/toolbar_view.cc +@@ -273,12 +273,28 @@ void ToolbarView::Init() { std::unique_ptr<ToolbarAccountIconContainerView> toolbar_account_icon_container; @@ -19,8 +19,6 @@ - show_avatar_toolbar_button = browser_->profile()->IsOffTheRecord() || - browser_->profile()->IsGuestSession(); + show_avatar_toolbar_button = in_incognito_or_guest_mode; - #elif BUILDFLAG(IS_CHROMEOS_LACROS) - show_avatar_toolbar_button = !profiles::IsPublicSession(); #endif + + if (flag_value == "always") @@ -33,8 +31,8 @@ if (base::FeatureList::IsEnabled( autofill::features::kAutofillEnableToolbarStatusChip)) { // The avatar button is contained inside the page-action container and ---- a/chrome/browser/ungoogled_flag_choices.h -+++ b/chrome/browser/ungoogled_flag_choices.h +--- chrome/browser/ungoogled_flag_choices.h.orig ++++ chrome/browser/ungoogled_flag_choices.h @@ -13,4 +13,16 @@ const FeatureEntry::Choice kExtensionHan "extension-mime-request-handling", "always-prompt-for-install"}, @@ -52,9 +50,9 @@ + "never"} +}; #endif // CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_ ---- a/chrome/browser/ungoogled_flag_entries.h -+++ b/chrome/browser/ungoogled_flag_entries.h -@@ -24,4 +24,8 @@ +--- chrome/browser/ungoogled_flag_entries.h.orig ++++ chrome/browser/ungoogled_flag_entries.h +@@ -28,4 +28,8 @@ "Force punycode hostnames", "Force punycode in hostnames instead of Unicode when displaying Internationalized Domain Names (IDNs). ungoogled-chromium flag.", kOsAll, SINGLE_VALUE_TYPE("force-punycode-hostnames")}, diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-stack-tabs.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-stack-tabs.patch @@ -0,0 +1,33 @@ +# Add --enable-stacked-tab-strip and --enable-tab-adjust-layout flags to tweak tab strip behavior + +--- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc.orig ++++ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc +@@ -83,14 +83,13 @@ using content::WebContents; + namespace { + + bool DetermineTabStripLayoutStacked(PrefService* prefs, bool* adjust_layout) { +- *adjust_layout = false; +- // For ash, always allow entering stacked mode. + #if BUILDFLAG(IS_CHROMEOS_ASH) + *adjust_layout = true; + return prefs->GetBoolean(prefs::kTabStripStackedLayout); + #else +- return base::CommandLine::ForCurrentProcess()->HasSwitch( +- switches::kForceStackedTabStripLayout); ++ *adjust_layout = base::CommandLine::ForCurrentProcess()->HasSwitch("enable-tab-adjust-layout"); ++ return prefs->GetBoolean(prefs::kTabStripStackedLayout) || ++ base::CommandLine::ForCurrentProcess()->HasSwitch("enable-stacked-tab-strip"); + #endif + } + +--- chrome/browser/ungoogled_flag_entries.h.orig ++++ chrome/browser/ungoogled_flag_entries.h +@@ -8,4 +8,8 @@ + "SetIpv6ProbeFalse", + "Forces the result of the browser's IPv6 probing (i.e. IPv6 connectivity test) to be unsuccessful. This causes IPv4 addresses to be prioritized over IPv6 addresses. Without this flag, the probing result is set to be successful, which causes IPv6 to be used over IPv4 when possible. ungoogled-chromium flag.", + kOsAll, FEATURE_VALUE_TYPE(net::features::kSetIpv6ProbeFalse)}, ++ {"enable-stacked-tab-strip", ++ "Enable stacking in the tab strip", ++ "Forces tabs to be stacked in the tab strip. Otherwise, they follow default behavior. ungoogled-chromium flag.", ++ kOsAll, SINGLE_VALUE_TYPE("enable-stacked-tab-strip")}, + #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-ipv6-probing-option.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-ipv6-probing-option.patch @@ -1,7 +1,7 @@ # Disables IPv6 probing and adds an option to change the IPv6 probing result ---- a/chrome/browser/ungoogled_flag_entries.h -+++ b/chrome/browser/ungoogled_flag_entries.h +--- chrome/browser/ungoogled_flag_entries.h.orig ++++ chrome/browser/ungoogled_flag_entries.h @@ -4,4 +4,8 @@ #ifndef CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ @@ -11,30 +11,30 @@ + "Forces the result of the browser's IPv6 probing (i.e. IPv6 connectivity test) to be unsuccessful. This causes IPv4 addresses to be prioritized over IPv6 addresses. Without this flag, the probing result is set to be successful, which causes IPv6 to be used over IPv4 when possible. ungoogled-chromium flag.", + kOsAll, FEATURE_VALUE_TYPE(net::features::kSetIpv6ProbeFalse)}, #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ ---- a/net/base/features.cc -+++ b/net/base/features.cc -@@ -259,5 +259,7 @@ const base::Feature kRecordRadioWakeupTr - const base::Feature kSandboxHttpCache("SandboxHttpCache", - base::FEATURE_DISABLED_BY_DEFAULT); +--- net/base/features.cc.orig ++++ net/base/features.cc +@@ -263,5 +263,7 @@ const base::Feature kPartitionedCookies{ + const base::Feature kExtraCookieValidityChecks{ + "ExtraCookieValidityChecks", base::FEATURE_ENABLED_BY_DEFAULT}; +const base::Feature kSetIpv6ProbeFalse{"SetIpv6ProbeFalse", base::FEATURE_DISABLED_BY_DEFAULT}; + } // namespace features } // namespace net ---- a/net/base/features.h -+++ b/net/base/features.h -@@ -390,6 +390,8 @@ NET_EXPORT extern const base::Feature kR - // the network process to be sandboxed. - NET_EXPORT extern const base::Feature kSandboxHttpCache; +--- net/base/features.h.orig ++++ net/base/features.h +@@ -396,6 +396,8 @@ NET_EXPORT extern const base::Feature kP + // feature flag, assuming no breakage occurs with it enabled. + NET_EXPORT extern const base::Feature kExtraCookieValidityChecks; +NET_EXPORT extern const base::Feature kSetIpv6ProbeFalse; + } // namespace features } // namespace net ---- a/net/dns/host_resolver_manager.cc -+++ b/net/dns/host_resolver_manager.cc -@@ -151,11 +151,6 @@ const unsigned kMinimumTTLSeconds = kCac +--- net/dns/host_resolver_manager.cc.orig ++++ net/dns/host_resolver_manager.cc +@@ -139,11 +139,6 @@ const unsigned kMinimumTTLSeconds = kCac // cached. const int kIPv6ProbePeriodMs = 1000; @@ -46,7 +46,7 @@ enum DnsResolveStatus { RESOLVE_STATUS_DNS_SUCCESS = 0, RESOLVE_STATUS_PROC_SUCCESS, -@@ -3907,7 +3902,7 @@ bool HostResolverManager::IsIPv6Reachabl +@@ -3696,7 +3691,7 @@ bool HostResolverManager::IsIPv6Reachabl (tick_clock_->NowTicks() - last_ipv6_probe_time_).InMilliseconds() > kIPv6ProbePeriodMs) { SetLastIPv6ProbeResult( diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-suggestions-url-field.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-suggestions-url-field.patch @@ -1,8 +1,8 @@ # Add suggestions URL text field to the search engine editing dialog # (chrome://settings/searchEngines). ---- a/chrome/browser/resources/settings/search_engines_page/search_engine_edit_dialog.html -+++ b/chrome/browser/resources/settings/search_engines_page/search_engine_edit_dialog.html +--- chrome/browser/resources/settings/search_engines_page/search_engine_dialog.html.orig ++++ chrome/browser/resources/settings/search_engines_page/search_engine_dialog.html @@ -20,6 +20,13 @@ value="{{queryUrl_}}" on-focus="validate_" on-input="validate_" disabled$="[[model.urlLocked]]"> @@ -17,9 +17,9 @@ </div> <div slot="button-container"> <cr-button class="cancel-button" on-click="cancel_" id="cancel"> ---- a/chrome/browser/resources/settings/search_engines_page/search_engine_edit_dialog.ts -+++ b/chrome/browser/resources/settings/search_engines_page/search_engine_edit_dialog.ts -@@ -28,6 +28,7 @@ export interface SettingsSearchEngineEdi +--- chrome/browser/resources/settings/search_engines_page/search_engine_dialog.ts.orig ++++ chrome/browser/resources/settings/search_engines_page/search_engine_dialog.ts +@@ -26,6 +26,7 @@ interface SettingsSearchEngineDialogElem dialog: CrDialogElement, keyword: CrInputElement, queryUrl: CrInputElement, @@ -27,23 +27,23 @@ searchEngine: CrInputElement, }; } -@@ -56,6 +57,7 @@ export class SettingsSearchEngineEditDia +@@ -54,6 +55,7 @@ class SettingsSearchEngineDialogElement searchEngine_: String, keyword_: String, queryUrl_: String, + suggestionsUrl_: String, dialogTitle_: String, - keywordFieldLabel_: String, actionButtonText_: String, -@@ -72,6 +74,7 @@ export class SettingsSearchEngineEditDia + }; +@@ -63,6 +65,7 @@ class SettingsSearchEngineDialogElement private searchEngine_: string; private keyword_: string; private queryUrl_: string; + private suggestionsUrl_: string; private dialogTitle_: string; - private keywordFieldLabel_: string; private actionButtonText_: string; -@@ -103,6 +106,7 @@ export class SettingsSearchEngineEditDia + private browserProxy_: SearchEnginesBrowserProxy = +@@ -92,6 +95,7 @@ class SettingsSearchEngineDialogElement this.searchEngine_ = this.model.name; this.keyword_ = this.model.keyword; this.queryUrl_ = this.model.url; @@ -51,7 +51,7 @@ } else { this.dialogTitle_ = loadTimeData.getString('searchEnginesAddSearchEngine'); -@@ -142,8 +146,12 @@ export class SettingsSearchEngineEditDia +@@ -127,8 +131,12 @@ class SettingsSearchEngineDialogElement } } @@ -66,7 +66,7 @@ } private cancel_() { -@@ -152,7 +160,8 @@ export class SettingsSearchEngineEditDia +@@ -137,7 +145,8 @@ class SettingsSearchEngineDialogElement private onActionButtonTap_() { this.browserProxy_.searchEngineEditCompleted( @@ -76,7 +76,7 @@ this.$.dialog.close(); } -@@ -180,9 +189,11 @@ export class SettingsSearchEngineEditDia +@@ -165,9 +174,11 @@ class SettingsSearchEngineDialogElement private updateActionButtonState_() { const allValid = [ @@ -90,17 +90,17 @@ }); this.$.actionButton.disabled = !allValid; } ---- a/chrome/browser/resources/settings/search_engines_page/search_engines_browser_proxy.ts -+++ b/chrome/browser/resources/settings/search_engines_page/search_engines_browser_proxy.ts -@@ -31,6 +31,7 @@ export type SearchEngine = { +--- chrome/browser/resources/settings/search_engines_page/search_engines_browser_proxy.ts.orig ++++ chrome/browser/resources/settings/search_engines_page/search_engines_browser_proxy.ts +@@ -30,6 +30,7 @@ export type SearchEngine = { + modelIndex: number, name: string, - shouldConfirmDeletion: boolean, url: string, + suggestionsUrl: string, urlLocked: boolean, }; -@@ -73,7 +74,7 @@ export interface SearchEnginesBrowserPro +@@ -53,7 +54,7 @@ export interface SearchEnginesBrowserPro searchEngineEditCancelled(): void; searchEngineEditCompleted( @@ -109,7 +109,7 @@ getSearchEnginesList(): Promise<SearchEnginesInfo>; -@@ -114,11 +115,12 @@ export class SearchEnginesBrowserProxyIm +@@ -84,11 +85,12 @@ export class SearchEnginesBrowserProxyIm } searchEngineEditCompleted( @@ -123,8 +123,8 @@ ]); } ---- a/chrome/browser/ui/search_engines/edit_search_engine_controller.cc -+++ b/chrome/browser/ui/search_engines/edit_search_engine_controller.cc +--- chrome/browser/ui/search_engines/edit_search_engine_controller.cc.orig ++++ chrome/browser/ui/search_engines/edit_search_engine_controller.cc @@ -67,6 +67,15 @@ bool EditSearchEngineController::IsURLVa .is_valid(); } @@ -165,8 +165,8 @@ } } ---- a/chrome/browser/ui/search_engines/edit_search_engine_controller.h -+++ b/chrome/browser/ui/search_engines/edit_search_engine_controller.h +--- chrome/browser/ui/search_engines/edit_search_engine_controller.h.orig ++++ chrome/browser/ui/search_engines/edit_search_engine_controller.h @@ -23,7 +23,8 @@ class EditSearchEngineControllerDelegate virtual void OnEditedKeyword(TemplateURL* template_url, const std::u16string& title, @@ -196,8 +196,8 @@ // Deletes an unused TemplateURL, if its add was cancelled and it's not // already owned by the TemplateURLService. ---- a/chrome/browser/ui/search_engines/keyword_editor_controller.cc -+++ b/chrome/browser/ui/search_engines/keyword_editor_controller.cc +--- chrome/browser/ui/search_engines/keyword_editor_controller.cc.orig ++++ chrome/browser/ui/search_engines/keyword_editor_controller.cc @@ -21,23 +21,27 @@ KeywordEditorController::KeywordEditorCo KeywordEditorController::~KeywordEditorController() { } @@ -249,8 +249,8 @@ base::RecordAction(UserMetricsAction("KeywordEditor_ModifiedKeyword")); } ---- a/chrome/browser/ui/search_engines/keyword_editor_controller.h -+++ b/chrome/browser/ui/search_engines/keyword_editor_controller.h +--- chrome/browser/ui/search_engines/keyword_editor_controller.h.orig ++++ chrome/browser/ui/search_engines/keyword_editor_controller.h @@ -29,14 +29,16 @@ class KeywordEditorController { // model. Returns the index of the added URL. int AddTemplateURL(const std::u16string& title, @@ -270,9 +270,9 @@ // Return true if the given |url| can be edited. bool CanEdit(const TemplateURL* url) const; ---- a/chrome/browser/ui/search_engines/template_url_table_model.cc -+++ b/chrome/browser/ui/search_engines/template_url_table_model.cc -@@ -108,21 +108,25 @@ void TemplateURLTableModel::Remove(int i +--- chrome/browser/ui/search_engines/template_url_table_model.cc.orig ++++ chrome/browser/ui/search_engines/template_url_table_model.cc +@@ -109,21 +109,25 @@ void TemplateURLTableModel::Remove(int i void TemplateURLTableModel::Add(int index, const std::u16string& short_name, const std::u16string& keyword, @@ -303,7 +303,7 @@ DCHECK(index >= 0 && index <= RowCount()); DCHECK(!url.empty()); TemplateURL* template_url = GetTemplateURL(index); -@@ -131,7 +135,8 @@ void TemplateURLTableModel::ModifyTempla +@@ -132,7 +136,8 @@ void TemplateURLTableModel::ModifyTempla DCHECK(template_url_service_->GetDefaultSearchProvider() != template_url || template_url->SupportsReplacement( template_url_service_->search_terms_data())); @@ -313,9 +313,9 @@ } TemplateURL* TemplateURLTableModel::GetTemplateURL(int index) { ---- a/chrome/browser/ui/search_engines/template_url_table_model.h -+++ b/chrome/browser/ui/search_engines/template_url_table_model.h -@@ -53,13 +53,15 @@ class TemplateURLTableModel : public ui: +--- chrome/browser/ui/search_engines/template_url_table_model.h.orig ++++ chrome/browser/ui/search_engines/template_url_table_model.h +@@ -54,13 +54,15 @@ class TemplateURLTableModel : public ui: void Add(int index, const std::u16string& short_name, const std::u16string& keyword, @@ -333,8 +333,8 @@ // Reloads the icon at the specified index. void ReloadIcon(int index); ---- a/chrome/browser/ui/webui/settings/search_engines_handler.cc -+++ b/chrome/browser/ui/webui/settings/search_engines_handler.cc +--- chrome/browser/ui/webui/settings/search_engines_handler.cc.orig ++++ chrome/browser/ui/webui/settings/search_engines_handler.cc @@ -37,6 +37,7 @@ namespace { const char kSearchEngineField[] = "searchEngine"; const char kKeywordField[] = "keyword"; @@ -345,12 +345,12 @@ const int kNewSearchEngineIndex = -1; @@ -212,6 +213,9 @@ SearchEnginesHandler::CreateDictionaryFo Profile* profile = Profile::FromWebUI(web_ui()); - dict->SetStringKey( + dict->SetString( "url", template_url->url_ref().DisplayURL(UIThreadSearchTermsData())); -+ dict->SetStringKey("suggestionsUrl", ++ dict->SetString("suggestionsUrl", + template_url->suggestions_url_ref().DisplayURL( + UIThreadSearchTermsData())); - dict->SetBoolKey("urlLocked", template_url->prepopulate_id() > 0); + dict->SetBoolean("urlLocked", template_url->prepopulate_id() > 0); GURL icon_url = template_url->favicon_url(); if (icon_url.is_valid()) @@ -325,12 +329,14 @@ void SearchEnginesHandler::HandleSearchE @@ -371,7 +371,7 @@ edit_controller_.reset(); } -@@ -358,6 +364,8 @@ bool SearchEnginesHandler::CheckFieldVal +@@ -361,6 +367,8 @@ bool SearchEnginesHandler::CheckFieldVal is_valid = edit_controller_->IsKeywordValid(base::UTF8ToUTF16(field_value)); else if (field_name.compare(kQueryUrlField) == 0) is_valid = edit_controller_->IsURLValid(field_value); @@ -380,11 +380,15 @@ else NOTREACHED(); -@@ -379,14 +387,17 @@ void SearchEnginesHandler::HandleSearchE - const std::string& search_engine = args[0].GetString(); - const std::string& keyword = args[1].GetString(); - const std::string& query_url = args[2].GetString(); -+ const std::string& suggestions_url = args[3].GetString(); +@@ -382,17 +390,21 @@ void SearchEnginesHandler::HandleSearchE + std::string search_engine; + std::string keyword; + std::string query_url; ++ std::string suggestions_url; + CHECK(args->GetString(0, &search_engine)); + CHECK(args->GetString(1, &keyword)); + CHECK(args->GetString(2, &query_url)); ++ CHECK(args->GetString(3, &suggestions_url)); // Recheck validity. It's possible to get here with invalid input if e.g. the // user calls the right JS functions directly from the web inspector. @@ -400,9 +404,9 @@ } } ---- a/chrome/browser/ui/webui/settings/search_engines_handler.h -+++ b/chrome/browser/ui/webui/settings/search_engines_handler.h -@@ -45,7 +45,8 @@ class SearchEnginesHandler : public Sett +--- chrome/browser/ui/webui/settings/search_engines_handler.h.orig ++++ chrome/browser/ui/webui/settings/search_engines_handler.h +@@ -50,7 +50,8 @@ class SearchEnginesHandler : public Sett void OnEditedKeyword(TemplateURL* template_url, const std::u16string& title, const std::u16string& keyword, @@ -412,9 +416,9 @@ // SettingsPageUIHandler implementation. void RegisterMessages() override; -@@ -77,8 +78,8 @@ class SearchEnginesHandler : public Sett +@@ -82,8 +83,8 @@ class SearchEnginesHandler : public Sett // to WebUI. Called from WebUI. - void HandleValidateSearchEngineInput(base::Value::ConstListView args); + void HandleValidateSearchEngineInput(const base::ListValue* args); - // Checks whether the given user input field (searchEngine, keyword, queryUrl) - // is populated with a valid value. @@ -423,9 +427,9 @@ bool CheckFieldValidity(const std::string& field_name, const std::string& field_value); ---- a/components/search_engines/template_url_service.cc -+++ b/components/search_engines/template_url_service.cc -@@ -643,7 +643,8 @@ void TemplateURLService::IncrementUsageC +--- components/search_engines/template_url_service.cc.orig ++++ components/search_engines/template_url_service.cc +@@ -641,7 +641,8 @@ void TemplateURLService::IncrementUsageC void TemplateURLService::ResetTemplateURL(TemplateURL* url, const std::u16string& title, const std::u16string& keyword, @@ -435,7 +439,7 @@ DCHECK(!IsCreatedByExtension(url)); DCHECK(!keyword.empty()); DCHECK(!search_url.empty()); -@@ -658,6 +659,7 @@ void TemplateURLService::ResetTemplateUR +@@ -656,6 +657,7 @@ void TemplateURLService::ResetTemplateUR data.safe_for_autoreplace = false; data.last_modified = clock_->Now(); data.is_active = TemplateURLData::ActiveStatus::kTrue; @@ -443,8 +447,8 @@ Update(url, TemplateURL(data)); } ---- a/components/search_engines/template_url_service.h -+++ b/components/search_engines/template_url_service.h +--- components/search_engines/template_url_service.h.orig ++++ components/search_engines/template_url_service.h @@ -253,7 +253,8 @@ class TemplateURLService : public WebDat void ResetTemplateURL(TemplateURL* url, const std::u16string& title, diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-ungoogled-flag-headers.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-ungoogled-flag-headers.patch @@ -1,6 +1,6 @@ ---- a/chrome/browser/about_flags.cc -+++ b/chrome/browser/about_flags.cc -@@ -2865,7 +2865,13 @@ constexpr FeatureEntry::FeatureVariation +--- chrome/browser/about_flags.cc.orig ++++ chrome/browser/about_flags.cc +@@ -2728,7 +2728,13 @@ const FeatureEntry::FeatureVariation kWi // calculate and verify checksum. // // When adding a new choice, add it to the end of the list. @@ -15,7 +15,7 @@ // //tools/flags/generate_unexpire_flags.py. #include "build/chromeos_buildflags.h" --- /dev/null -+++ b/chrome/browser/bromite_flag_choices.h ++++ chrome/browser/bromite_flag_choices.h @@ -0,0 +1,7 @@ +// Copyright (c) 2020 The ungoogled-chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -25,7 +25,7 @@ +#define CHROME_BROWSER_BROMITE_FLAG_CHOICES_H_ +#endif // CHROME_BROWSER_BROMITE_FLAG_CHOICES_H_ --- /dev/null -+++ b/chrome/browser/bromite_flag_entries.h ++++ chrome/browser/bromite_flag_entries.h @@ -0,0 +1,7 @@ +// Copyright (c) 2020 The ungoogled-chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -35,7 +35,7 @@ +#define CHROME_BROWSER_BROMITE_FLAG_ENTRIES_H_ +#endif // CHROME_BROWSER_BROMITE_FLAG_ENTRIES_H_ --- /dev/null -+++ b/chrome/browser/ungoogled_flag_choices.h ++++ chrome/browser/ungoogled_flag_choices.h @@ -0,0 +1,7 @@ +// Copyright (c) 2020 The ungoogled-chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -45,7 +45,7 @@ +#define CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_ +#endif // CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_ --- /dev/null -+++ b/chrome/browser/ungoogled_flag_entries.h ++++ chrome/browser/ungoogled_flag_entries.h @@ -0,0 +1,7 @@ +// Copyright (c) 2020 The ungoogled-chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -55,7 +55,7 @@ +#define CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ +#endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ --- /dev/null -+++ b/chrome/browser/ungoogled_platform_flag_choices.h ++++ chrome/browser/ungoogled_platform_flag_choices.h @@ -0,0 +1,7 @@ +// Copyright (c) 2020 The ungoogled-chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -65,7 +65,7 @@ +#define CHROME_BROWSER_UNGOOGLED_PLATFORM_FLAG_CHOICES_H_ +#endif // CHROME_BROWSER_UNGOOGLED_PLATFORM_FLAG_CHOICES_H_ --- /dev/null -+++ b/chrome/browser/ungoogled_platform_flag_entries.h ++++ chrome/browser/ungoogled_platform_flag_entries.h @@ -0,0 +1,7 @@ +// Copyright (c) 2020 The ungoogled-chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/disable-dial-repeating-discovery.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/disable-dial-repeating-discovery.patch @@ -1,25 +1,25 @@ # Disables the dial registry's repeating discovery timer # This caused unnecessary SSDP network spam ---- a/chrome/browser/media/router/discovery/dial/dial_registry.cc -+++ b/chrome/browser/media/router/discovery/dial/dial_registry.cc -@@ -150,10 +150,6 @@ void DialRegistry::StartPeriodicDiscover - return; +--- chrome/browser/media/router/discovery/dial/dial_registry.cc.orig ++++ chrome/browser/media/router/discovery/dial/dial_registry.cc +@@ -190,10 +190,6 @@ void DialRegistry::StartPeriodicDiscover dial_ = CreateDialService(); + dial_->AddObserver(this); - DoDiscovery(); - repeating_timer_ = std::make_unique<base::RepeatingTimer>(); - repeating_timer_->Start(FROM_HERE, refresh_interval_delta_, this, - &DialRegistry::DoDiscovery); - // Always send the current device list with the next discovery request. This - // may not be necessary, but is done to match previous behavior. - ++registry_generation_; -@@ -170,8 +166,6 @@ void DialRegistry::StopPeriodicDiscovery + } + + void DialRegistry::DoDiscovery() { +@@ -207,8 +203,6 @@ void DialRegistry::StopPeriodicDiscovery if (!dial_) return; - repeating_timer_->Stop(); - repeating_timer_.reset(); + dial_->RemoveObserver(this); ClearDialService(); } - diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/disable-download-quarantine.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/disable-download-quarantine.patch @@ -1,18 +1,18 @@ # Disables file download quarantining ---- a/components/download/internal/common/base_file.cc -+++ b/components/download/internal/common/base_file.cc -@@ -22,7 +22,6 @@ +--- components/download/internal/common/base_file.cc.orig ++++ components/download/internal/common/base_file.cc +@@ -23,7 +23,6 @@ #include "components/download/public/common/download_interrupt_reasons_utils.h" #include "components/download/public/common/download_item.h" #include "components/download/public/common/download_stats.h" -#include "components/services/quarantine/quarantine.h" #include "crypto/secure_hash.h" - #if BUILDFLAG(IS_ANDROID) -@@ -525,102 +524,6 @@ DownloadInterruptReason BaseFile::Publis + #if defined(OS_WIN) +@@ -535,105 +534,6 @@ DownloadInterruptReason BaseFile::Publis } - #endif // BUILDFLAG(IS_ANDROID) + #endif // defined(OS_ANDROID) -namespace { - @@ -102,24 +102,27 @@ - -void BaseFile::OnQuarantineServiceError(const GURL& source_url, - const GURL& referrer_url) { --#if BUILDFLAG(IS_WIN) -- OnFileQuarantined(/*connection_error=*/true, -- quarantine::SetInternetZoneIdentifierDirectly( -- full_path_, source_url, referrer_url)); --#else // !BUILDFLAG(IS_WIN) +-#if defined(OS_WIN) +- if (base::FeatureList::IsEnabled(quarantine::kOutOfProcessQuarantine)) { +- OnFileQuarantined(/*connection_error=*/true, +- quarantine::SetInternetZoneIdentifierDirectly( +- full_path_, source_url, referrer_url)); +- return; +- } +-#endif // defined(OS_WIN) +- - CHECK(false) << "In-process quarantine service should not have failed."; --#endif // !BUILDFLAG(IS_WIN) -} void BaseFile::AnnotateWithSourceInformation( const std::string& client_guid, -@@ -628,32 +531,8 @@ void BaseFile::AnnotateWithSourceInforma +@@ -641,32 +541,8 @@ void BaseFile::AnnotateWithSourceInforma const GURL& referrer_url, mojo::PendingRemote<quarantine::mojom::Quarantine> remote_quarantine, OnAnnotationDoneCallback on_annotation_done_callback) { - GURL authority_url = GetEffectiveAuthorityURL(source_url, referrer_url); - if (!remote_quarantine) { --#if BUILDFLAG(IS_WIN) +-#if defined(OS_WIN) - quarantine::mojom::QuarantineFileResult result = - quarantine::SetInternetZoneIdentifierDirectly(full_path_, authority_url, - referrer_url); @@ -148,8 +151,8 @@ } } // namespace download ---- a/content/browser/BUILD.gn -+++ b/content/browser/BUILD.gn +--- content/browser/BUILD.gn.orig ++++ content/browser/BUILD.gn @@ -82,7 +82,6 @@ source_set("browser") { "//components/permissions:permissions_common", "//components/power_scheduler", @@ -158,17 +161,17 @@ "//components/services/storage", "//components/services/storage:filesystem_proxy_factory", "//components/services/storage/dom_storage:local_storage_proto", ---- a/content/browser/file_system_access/safe_move_helper.cc -+++ b/content/browser/file_system_access/safe_move_helper.cc -@@ -13,7 +13,6 @@ +--- content/browser/file_system_access/safe_move_helper.cc.orig ++++ content/browser/file_system_access/safe_move_helper.cc +@@ -12,7 +12,6 @@ + #include "base/task/thread_pool.h" #include "base/threading/sequenced_task_runner_handle.h" #include "build/build_config.h" - #include "build/chromeos_buildflags.h" -#include "components/services/quarantine/quarantine.h" #include "content/browser/file_system_access/file_system_access_error.h" #include "content/public/browser/content_browser_client.h" #include "content/public/common/content_client.h" -@@ -194,20 +193,8 @@ void SafeMoveHelper::DidAfterWriteCheck( +@@ -193,20 +192,8 @@ void SafeMoveHelper::DidAfterWriteCheck( // not exist anymore. In case of error, the source file URL will point to a // valid filesystem location. base::OnceCallback<void(base::File::Error)> result_callback; @@ -187,9 +190,9 @@ weak_factory_.GetWeakPtr()); - } manager_->DoFileSystemOperation( - FROM_HERE, &storage::FileSystemOperationRunner::Move, - std::move(result_callback), source_url(), dest_url(), options_, -@@ -223,7 +210,6 @@ void SafeMoveHelper::DidFileSkipQuaranti + FROM_HERE, &storage::FileSystemOperationRunner::MoveFileLocal, + std::move(result_callback), source_url(), dest_url(), option_); +@@ -220,7 +207,6 @@ void SafeMoveHelper::DidFileSkipQuaranti void SafeMoveHelper::DidFileDoQuarantine( const storage::FileSystemURL& target_url, const GURL& referrer_url, @@ -197,7 +200,7 @@ base::File::Error result) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); -@@ -254,37 +240,9 @@ void SafeMoveHelper::DidFileDoQuarantine +@@ -251,37 +237,9 @@ void SafeMoveHelper::DidFileDoQuarantine referrer_url.is_valid() && referrer_url.SchemeIsHTTPOrHTTPS() ? referrer_url : GURL(); @@ -215,7 +218,7 @@ - std::move(quarantine_remote)), - quarantine::mojom::QuarantineFileResult::ANNOTATION_FAILED)); - } else { --#if BUILDFLAG(IS_WIN) +-#if defined(OS_WIN) - base::ThreadPool::PostTaskAndReplyWithResult( - FROM_HERE, {base::MayBlock()}, - base::BindOnce(&quarantine::SetInternetZoneIdentifierDirectly, @@ -235,8 +238,8 @@ quarantine::mojom::QuarantineFileResult result) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); ---- a/content/browser/file_system_access/safe_move_helper.h -+++ b/content/browser/file_system_access/safe_move_helper.h +--- content/browser/file_system_access/safe_move_helper.h.orig ++++ content/browser/file_system_access/safe_move_helper.h @@ -58,10 +58,8 @@ class CONTENT_EXPORT SafeMoveHelper { void DidFileDoQuarantine( const storage::FileSystemURL& target_url, @@ -248,13 +251,13 @@ quarantine::mojom::QuarantineFileResult result); void ComputeHashForSourceFile(HashCallback callback); ---- a/content/browser/renderer_host/pepper/pepper_file_io_host.cc -+++ b/content/browser/renderer_host/pepper/pepper_file_io_host.cc +--- content/browser/renderer_host/pepper/pepper_file_io_host.cc.orig ++++ content/browser/renderer_host/pepper/pepper_file_io_host.cc @@ -456,7 +456,7 @@ void PepperFileIOHost::OnLocalFileOpened ppapi::host::ReplyMessageContext reply_context, const base::FilePath& path, base::File::Error error_code) { --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) +#if 0 // Quarantining a file before its contents are available is only supported on // Windows and Linux. @@ -263,15 +266,15 @@ #endif } --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) +#if 0 void PepperFileIOHost::OnLocalFileQuarantined( ppapi::host::ReplyMessageContext reply_context, const base::FilePath& path, ---- a/content/browser/renderer_host/pepper/pepper_file_io_host.h -+++ b/content/browser/renderer_host/pepper/pepper_file_io_host.h +--- content/browser/renderer_host/pepper/pepper_file_io_host.h.orig ++++ content/browser/renderer_host/pepper/pepper_file_io_host.h @@ -13,7 +13,6 @@ - #include "base/memory/raw_ptr.h" + #include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" -#include "components/services/quarantine/public/mojom/quarantine.mojom.h" diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/disable-formatting-in-omnibox.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/disable-formatting-in-omnibox.patch @@ -1,8 +1,8 @@ # Disables omission of URL elements in Omnibox ---- a/components/url_formatter/url_formatter.cc -+++ b/components/url_formatter/url_formatter.cc -@@ -492,14 +492,14 @@ bool HasTwoViewSourceSchemes(base::Strin +--- components/url_formatter/url_formatter.cc.orig ++++ components/url_formatter/url_formatter.cc +@@ -463,14 +463,14 @@ ComponentResult IDNToUnicodeOneComponent } // namespace const FormatUrlType kFormatUrlOmitNothing = 0; diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/disable-intranet-redirect-detector.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/disable-intranet-redirect-detector.patch @@ -1,8 +1,8 @@ # Disables the intranet redirect detector. It generates extra DNS requests and the functionality using this is disabled # See this page for more information: https://mikewest.org/2012/02/chrome-connects-to-three-random-domains-at-startup ---- a/chrome/browser/intranet_redirect_detector.cc -+++ b/chrome/browser/intranet_redirect_detector.cc +--- chrome/browser/intranet_redirect_detector.cc.orig ++++ chrome/browser/intranet_redirect_detector.cc @@ -119,9 +119,7 @@ void IntranetRedirectDetector::FinishSle simple_loaders_.clear(); resulting_origins_.clear(); diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/disable-remote-optimization-guide.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/disable-remote-optimization-guide.patch @@ -1,11 +0,0 @@ ---- a/components/optimization_guide/core/optimization_guide_features.cc -+++ b/components/optimization_guide/core/optimization_guide_features.cc -@@ -77,7 +77,7 @@ const base::Feature kOptimizationHintsFi - - // Enables fetching from a remote Optimization Guide Service. - const base::Feature kRemoteOptimizationGuideFetching{ -- "OptimizationHintsFetching", base::FEATURE_ENABLED_BY_DEFAULT}; -+ "OptimizationHintsFetching", base::FEATURE_DISABLED_BY_DEFAULT}; - - const base::Feature kRemoteOptimizationGuideFetchingAnonymousDataConsent { - "OptimizationHintsFetchingAnonymousDataConsent", diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/disable-webgl-renderer-info.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/disable-webgl-renderer-info.patch @@ -1,9 +1,9 @@ # Return blank values for WebGLDebugRendererInfo to remove a potential data # leak while preventing potential website breakage ---- a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc -+++ b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc -@@ -3630,8 +3630,7 @@ ScriptValue WebGLRenderingContextBase::g +--- third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc.orig ++++ third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc +@@ -3595,8 +3595,7 @@ ScriptValue WebGLRenderingContextBase::g pname, IdentifiabilityBenignStringToken( String(ContextGL()->GetString(GL_RENDERER)))); } @@ -13,7 +13,7 @@ } SynthesizeGLError( GL_INVALID_ENUM, "getParameter", -@@ -3645,8 +3644,7 @@ ScriptValue WebGLRenderingContextBase::g +@@ -3610,8 +3609,7 @@ ScriptValue WebGLRenderingContextBase::g pname, IdentifiabilityBenignStringToken( String(ContextGL()->GetString(GL_VENDOR)))); } diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/enable-default-prefetch-privacy-changes.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/enable-default-prefetch-privacy-changes.patch @@ -1,8 +1,8 @@ # Enable chrome://flags/#prefetch-privacy-changes by default ---- a/third_party/blink/common/features.cc -+++ b/third_party/blink/common/features.cc -@@ -468,7 +468,7 @@ const base::Feature kComputePressure{"Co +--- third_party/blink/common/features.cc.orig ++++ third_party/blink/common/features.cc +@@ -416,7 +416,7 @@ const base::Feature kComputePressure{"Co // Prefetch request properties are updated to be privacy-preserving. See // crbug.com/988956. const base::Feature kPrefetchPrivacyChanges{"PrefetchPrivacyChanges", diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/enable-menu-on-reload-button.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/enable-menu-on-reload-button.patch @@ -1,8 +1,8 @@ # Add ability to always open dev context menu on reload button. ---- a/chrome/browser/ui/views/toolbar/reload_button.cc -+++ b/chrome/browser/ui/views/toolbar/reload_button.cc -@@ -83,7 +83,7 @@ bool ReloadButton::GetMenuEnabled() cons +--- chrome/browser/ui/views/toolbar/reload_button.cc.orig ++++ chrome/browser/ui/views/toolbar/reload_button.cc +@@ -84,7 +84,7 @@ bool ReloadButton::GetMenuEnabled() cons } void ReloadButton::SetMenuEnabled(bool enable) { 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 @@ -1,8 +1,8 @@ # Add more URL schemes allowed for saving ---- a/chrome/browser/ui/browser_commands.cc -+++ b/chrome/browser/ui/browser_commands.cc -@@ -443,11 +443,6 @@ int GetContentRestrictions(const Browser +--- chrome/browser/ui/browser_commands.cc.orig ++++ chrome/browser/ui/browser_commands.cc +@@ -440,11 +440,6 @@ int GetContentRestrictions(const Browser CoreTabHelper* core_tab_helper = CoreTabHelper::FromWebContents(current_tab); content_restrictions = core_tab_helper->content_restrictions(); @@ -14,8 +14,8 @@ } return content_restrictions; } -@@ -1371,8 +1366,7 @@ bool CanSavePage(const Browser* browser) - DownloadPrefs::DownloadRestriction::ALL_FILES) { +@@ -1342,8 +1337,7 @@ bool CanSavePage(const Browser* browser) + prefs::kAllowFileSelectionDialogs)) { return false; } - return !browser->is_type_devtools() && @@ -24,8 +24,8 @@ } void Print(Browser* browser) { ---- a/components/offline_pages/core/offline_page_model.cc -+++ b/components/offline_pages/core/offline_page_model.cc +--- components/offline_pages/core/offline_page_model.cc.orig ++++ components/offline_pages/core/offline_page_model.cc @@ -22,7 +22,7 @@ OfflinePageModel::SavePageParams::~SaveP // static @@ -35,9 +35,9 @@ } OfflinePageModel::OfflinePageModel() = default; ---- a/content/common/url_schemes.cc -+++ b/content/common/url_schemes.cc -@@ -23,13 +23,22 @@ namespace { +--- content/common/url_schemes.cc.orig ++++ content/common/url_schemes.cc +@@ -23,6 +23,9 @@ namespace { bool g_registered_url_schemes = false; const char* const kDefaultSavableSchemes[] = { @@ -47,7 +47,8 @@ url::kHttpScheme, url::kHttpsScheme, url::kFileScheme, - url::kFileSystemScheme, +@@ -30,7 +33,13 @@ const char* const kDefaultSavableSchemes + url::kFtpScheme, kChromeDevToolsScheme, kChromeUIScheme, - url::kDataScheme @@ -61,9 +62,9 @@ }; // These lists are lazily initialized below and are leaked on shutdown to ---- a/content/public/common/url_utils.cc -+++ b/content/public/common/url_utils.cc -@@ -27,11 +27,7 @@ bool HasWebUIScheme(const GURL& url) { +--- content/public/common/url_utils.cc.orig ++++ content/public/common/url_utils.cc +@@ -26,11 +26,7 @@ bool HasWebUIScheme(const GURL& url) { } bool IsSavableURL(const GURL& url) { diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/enable-paste-and-go-new-tab-button.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/enable-paste-and-go-new-tab-button.patch @@ -1,19 +1,19 @@ ---- a/chrome/browser/ui/views/tabs/new_tab_button.cc -+++ b/chrome/browser/ui/views/tabs/new_tab_button.cc -@@ -59,10 +59,8 @@ NewTabButton::NewTabButton(TabStrip* tab +--- chrome/browser/ui/views/tabs/new_tab_button.cc.orig ++++ chrome/browser/ui/views/tabs/new_tab_button.cc +@@ -58,10 +58,8 @@ NewTabButton::NewTabButton(TabStrip* tab SetAnimateOnStateChange(true); // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +-#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || defined(OS_BSD) SetTriggerableEventFlags(GetTriggerableEventFlags() | ui::EF_MIDDLE_MOUSE_BUTTON); -#endif ink_drop_container_ = AddChildView(std::make_unique<views::InkDropContainerView>()); ---- a/chrome/browser/ui/views/tabs/tab_strip.cc -+++ b/chrome/browser/ui/views/tabs/tab_strip.cc -@@ -2315,8 +2315,6 @@ void TabStrip::NewTabButtonPressed(const +--- chrome/browser/ui/views/tabs/tab_strip.cc.orig ++++ chrome/browser/ui/views/tabs/tab_strip.cc +@@ -2680,8 +2680,6 @@ void TabStrip::NewTabButtonPressed(const const ui::MouseEvent& mouse = static_cast<const ui::MouseEvent&>(event); if (mouse.IsOnlyMiddleMouseButton()) { @@ -22,7 +22,7 @@ ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread(); CHECK(clipboard); std::u16string clipboard_text; -@@ -2324,7 +2322,6 @@ void TabStrip::NewTabButtonPressed(const +@@ -2689,7 +2687,6 @@ void TabStrip::NewTabButtonPressed(const /* data_dst = */ nullptr, &clipboard_text); if (!clipboard_text.empty()) controller_->CreateNewTabWithLocation(clipboard_text); diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/fix-building-without-mdns-and-service-discovery.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/fix-building-without-mdns-and-service-discovery.patch @@ -1,7 +1,7 @@ # Fix building with enable_service_discovery=false and enable_mds=false ---- a/chrome/browser/media/router/discovery/mdns/dns_sd_device_lister.cc -+++ b/chrome/browser/media/router/discovery/mdns/dns_sd_device_lister.cc +--- chrome/browser/media/router/discovery/mdns/dns_sd_device_lister.cc.orig ++++ chrome/browser/media/router/discovery/mdns/dns_sd_device_lister.cc @@ -40,37 +40,22 @@ DnsSdDeviceLister::DnsSdDeviceLister( DnsSdDeviceLister::~DnsSdDeviceLister() {} diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/fix-distilled-icons.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/fix-distilled-icons.patch @@ -1,5 +1,5 @@ ---- a/components/dom_distiller/core/css/distilledpage.css -+++ b/components/dom_distiller/core/css/distilledpage.css +--- components/dom_distiller/core/css/distilledpage.css.orig ++++ components/dom_distiller/core/css/distilledpage.css @@ -28,6 +28,11 @@ box-sizing: border-box; } diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/keep-expired-flags.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/keep-expired-flags.patch @@ -1,5 +1,5 @@ ---- a/components/flags_ui/flags_state.cc -+++ b/components/flags_ui/flags_state.cc +--- components/flags_ui/flags_state.cc.orig ++++ components/flags_ui/flags_state.cc @@ -22,6 +22,7 @@ #include "base/values.h" #include "build/build_config.h" @@ -8,7 +8,7 @@ #include "components/flags_ui/feature_entry.h" #include "components/flags_ui/flags_storage.h" #include "components/flags_ui/flags_ui_switches.h" -@@ -555,14 +556,18 @@ void FlagsState::GetFlagFeatureEntries( +@@ -577,14 +578,18 @@ void FlagsState::GetFlagFeatureEntries( int current_platform = GetCurrentPlatform(); for (const FeatureEntry& entry : feature_entries_) { @@ -28,7 +28,7 @@ base::Value supported_platforms(base::Value::Type::LIST); AddOsStrings(entry.supported_platforms, &supported_platforms); -@@ -881,6 +886,7 @@ bool FlagsState::IsSupportedFeature(cons +@@ -901,6 +906,7 @@ bool FlagsState::IsSupportedFeature(cons if (!entry.InternalNameMatches(name)) continue; if (delegate_ && delegate_->ShouldExcludeFlag(storage, entry)) diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/prepopulated-search-engines.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/prepopulated-search-engines.patch @@ -6,9 +6,9 @@ # Only snyc the prepoulated search engines when initializing the database. # Prevents search engines from being overridden in future updates. # ---- a/components/search_engines/template_url_prepopulate_data.cc -+++ b/components/search_engines/template_url_prepopulate_data.cc -@@ -1331,6 +1331,9 @@ std::vector<std::unique_ptr<TemplateURLD +--- components/search_engines/template_url_prepopulate_data.cc.orig ++++ components/search_engines/template_url_prepopulate_data.cc +@@ -1325,6 +1325,9 @@ std::vector<std::unique_ptr<TemplateURLD std::vector<std::unique_ptr<TemplateURLData>> t_urls; for (size_t i = 0; i < num_engines; ++i) t_urls.push_back(TemplateURLDataFromPrepopulatedEngine(*engines[i])); @@ -18,8 +18,8 @@ return t_urls; } ---- a/components/search_engines/util.cc -+++ b/components/search_engines/util.cc +--- components/search_engines/util.cc.orig ++++ components/search_engines/util.cc @@ -396,7 +396,7 @@ void GetSearchProvidersUsingLoadedEngine const int prepopulate_resource_keyword_version = diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/remove-disable-setuid-sandbox-as-bad-flag.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/remove-disable-setuid-sandbox-as-bad-flag.patch @@ -1,12 +1,12 @@ # Remove the "--disable-setuid-sandbox" command line flag as a bad flag ---- a/chrome/browser/ui/startup/bad_flags_prompt.cc -+++ b/chrome/browser/ui/startup/bad_flags_prompt.cc -@@ -59,7 +59,6 @@ static const char* kBadFlags[] = { +--- chrome/browser/ui/startup/bad_flags_prompt.cc.orig ++++ chrome/browser/ui/startup/bad_flags_prompt.cc +@@ -61,7 +61,6 @@ static const char* kBadFlags[] = { // These flags disable sandbox-related security. sandbox::policy::switches::kDisableGpuSandbox, sandbox::policy::switches::kDisableSeccompFilterSandbox, - sandbox::policy::switches::kDisableSetuidSandbox, sandbox::policy::switches::kNoSandbox, - #if BUILDFLAG(IS_WIN) + #if defined(OS_WIN) sandbox::policy::switches::kAllowThirdPartyModules, diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/remove-uneeded-ui.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/remove-uneeded-ui.patch @@ -18,8 +18,8 @@ # unneeded elements from the profile menu # the 'Learn more' link on crashed tabs ---- a/chrome/browser/resources/extensions/item_list.html -+++ b/chrome/browser/resources/extensions/item_list.html +--- chrome/browser/resources/extensions/item_list.html.orig ++++ chrome/browser/resources/extensions/item_list.html @@ -80,13 +80,6 @@ <div id="container"> <managed-footnote hidden="[[filter]]"></managed-footnote> @@ -34,9 +34,9 @@ <div id="no-search-results" class="empty-list-message" hidden$="[[!shouldShowEmptySearchMessage_( shownAppsCount_, shownExtensionsCount_, apps, extensions)]]"> ---- a/chrome/browser/resources/extensions/sidebar.html -+++ b/chrome/browser/resources/extensions/sidebar.html -@@ -76,12 +76,3 @@ +--- chrome/browser/resources/extensions/sidebar.html.orig ++++ chrome/browser/resources/extensions/sidebar.html +@@ -69,12 +69,3 @@ <paper-ripple></paper-ripple> </a> </iron-selector> @@ -49,9 +49,9 @@ - <paper-ripple></paper-ripple> - </a> -</div> ---- a/chrome/browser/resources/history/side_bar.html -+++ b/chrome/browser/resources/history/side_bar.html -@@ -120,13 +120,6 @@ +--- chrome/browser/resources/history/side_bar.html.orig ++++ chrome/browser/resources/history/side_bar.html +@@ -128,13 +128,6 @@ $i18n{historyMenuItem} <paper-ripple></paper-ripple> </a> @@ -62,11 +62,11 @@ - $i18n{openTabsMenuItem} - <paper-ripple></paper-ripple> - </a> + <div class="separator"></div> <a role="menuitem" id="clear-browsing-data" class="cr-nav-menu-item" - href="chrome://settings/clearBrowserData" ---- a/chrome/browser/resources/ntp4/incognito_tab.html -+++ b/chrome/browser/resources/ntp4/incognito_tab.html +--- chrome/browser/resources/ntp4/incognito_tab.html.orig ++++ chrome/browser/resources/ntp4/incognito_tab.html @@ -24,8 +24,6 @@ document.querySelector('#incognitothemec <h1>$i18n{incognitoTabHeading}</h1> <p id="subtitle"> @@ -76,8 +76,8 @@ </p> <div id="bulletpoints-wrapper"> <div class="bulletpoints first">$i18nRaw{incognitoTabFeatures}</div> ---- a/chrome/browser/resources/settings/a11y_page/a11y_page.html -+++ b/chrome/browser/resources/settings/a11y_page/a11y_page.html +--- chrome/browser/resources/settings/a11y_page/a11y_page.html.orig ++++ chrome/browser/resources/settings/a11y_page/a11y_page.html @@ -21,7 +21,7 @@ external$="[[captionSettingsOpensExternally_]]"> </cr-link-row> @@ -88,9 +88,9 @@ label="$i18n{captionsTitle}" on-click="onCaptionsClick_" @@ -51,10 +51,6 @@ - label="$i18n{accessibleImageLabelsTitle}" sub-label="$i18n{accessibleImageLabelsSubtitle}"> </settings-toggle-button> + </if> - <cr-link-row class="hr" label="$i18n{moreFeaturesLink}" - on-click="onMoreFeaturesLinkClick_" sub-label="$i18n{a11yWebStore}" - external> @@ -98,8 +98,8 @@ </div> <if expr="not chromeos"> <template is="dom-if" if="[[!captionSettingsOpensExternally_]]"> ---- a/chrome/browser/resources/settings/about_page/about_page.html -+++ b/chrome/browser/resources/settings/about_page/about_page.html +--- chrome/browser/resources/settings/about_page/about_page.html.orig ++++ chrome/browser/resources/settings/about_page/about_page.html @@ -131,8 +131,6 @@ </div> </template> @@ -109,8 +109,8 @@ <if expr="_google_chrome"> <cr-link-row class="hr" id="reportIssue" on-click="onReportIssueTap_" hidden="[[!prefs.feedback_allowed.value]]" ---- a/chrome/browser/resources/settings/appearance_page/appearance_page.html -+++ b/chrome/browser/resources/settings/appearance_page/appearance_page.html +--- chrome/browser/resources/settings/appearance_page/appearance_page.html.orig ++++ chrome/browser/resources/settings/appearance_page/appearance_page.html @@ -22,11 +22,11 @@ <settings-animated-pages id="pages" section="appearance" focus-config="[[focusConfig_]]"> @@ -124,20 +124,20 @@ + <div class="flex cr-padded-text"> + <div>$i18n{themes}</div><div class="secondary">[[themeSublabel_]]</div> + </div> - <if expr="not is_linux or chromeos_ash or chromeos_lacros"> + <if expr="not is_posix or chromeos or lacros"> <template is="dom-if" if="[[prefs.extensions.theme.id.value]]"> <div class="separator"></div> ---- a/chrome/browser/resources/settings/autofill_page/passwords_section.html -+++ b/chrome/browser/resources/settings/autofill_page/passwords_section.html -@@ -102,6 +102,7 @@ - label="$i18n{passwordsAutosigninLabel}" - sub-label="$i18n{passwordsAutosigninDescription}"> - </settings-toggle-button> +--- chrome/browser/resources/settings/autofill_page/passwords_section.html.orig ++++ chrome/browser/resources/settings/autofill_page/passwords_section.html +@@ -107,6 +107,7 @@ + label="$i18n{trustedVaultOptInLabel}" + sub-label="$i18n{trustedVaultOptInSubLabel}"> + </cr-link-row> +<if expr="false"> <div id="checkPasswordsBannerContainer" class="cr-row" hidden$="[[!shouldShowBanner_]]"> <picture> -@@ -156,6 +157,7 @@ +@@ -155,6 +156,7 @@ <!-- This div lays out the link correctly, relative to the text. --> <div class="cr-padded-text">$i18nRaw{managePasswordsLabel}</div> </div> @@ -145,60 +145,58 @@ <div class="cr-row first"> <h2 id="savedPasswordsHeading" class="flex"> $i18n{savedPasswordsHeading} ---- a/chrome/browser/resources/settings/autofill_page/payments_section.html -+++ b/chrome/browser/resources/settings/autofill_page/payments_section.html +--- chrome/browser/resources/settings/autofill_page/payments_section.html.orig ++++ chrome/browser/resources/settings/autofill_page/payments_section.html @@ -53,11 +53,6 @@ - </div> - </template> + </div> + </template> --<div id="manageLink" class="cr-row first"> -- <!-- This span lays out the link correctly, relative to the text. --> -- <div class="cr-padded-text">$i18nRaw{manageCreditCardsLabel}</div> --</div> +- <div id="manageLink" class="cr-row first"> +- <!-- This span lays out the link correctly, relative to the text. --> +- <div class="cr-padded-text">$i18nRaw{manageCreditCardsLabel}</div> +- </div> - - <div class="cr-row continuation"> - <h2 class="flex">$i18n{creditCards}</h2> - <cr-button id="addCreditCard" class="header-aligned-button" ---- a/chrome/browser/resources/settings/basic_page/basic_page.html -+++ b/chrome/browser/resources/settings/basic_page/basic_page.html -@@ -59,7 +59,7 @@ - prefs="{{prefs}}"> - </settings-privacy-guide-promo> - </settings-section> + <div class="cr-row continuation"> + <h2 class="flex">$i18n{creditCards}</h2> + <cr-button id="addCreditCard" class="header-aligned-button" +--- chrome/browser/resources/settings/basic_page/basic_page.html.orig ++++ chrome/browser/resources/settings/basic_page/basic_page.html +@@ -102,7 +102,7 @@ + <settings-privacy-review-promo></settings-privacy-review-promo> + </settings-section> + </template> - <template is="dom-if" if="[[showPage_(pageVisibility.safetyCheck)]]" + <template is="dom-if" if="[[false]]" restamp> <settings-section page-title="$i18n{safetyCheckSectionTitle}" section="safetyCheck" nest-under-section="privacy" ---- a/chrome/browser/resources/settings/privacy_page/personalization_options.html -+++ b/chrome/browser/resources/settings/privacy_page/personalization_options.html -@@ -13,7 +13,7 @@ - padding-inline-start: 0; +--- chrome/browser/resources/settings/privacy_page/personalization_options.html.orig ++++ chrome/browser/resources/settings/privacy_page/personalization_options.html +@@ -8,7 +8,7 @@ + border-top: none; } </style> --<if expr="not chromeos and not lacros"> +-<if expr="not chromeos"> +<if expr="false"> - <!-- Signout is not supported yet on lacros, https://crbug.com/1217645 --> <settings-toggle-button id="signinAllowedToggle" class="hr" -@@ -70,14 +70,6 @@ + hidden="[[!signinAvailable_]]" +@@ -51,12 +51,6 @@ </settings-toggle-button> </if><!-- not chromeos --> </if><!-- _google_chrome --> -- <template is="dom-if" if="[[showUrlCollectionToggle_()]]" restamp> -- <settings-toggle-button id="urlCollectionToggle" -- class="hr" -- pref="{{prefs.url_keyed_anonymized_data_collection.enabled}}" -- label="$i18n{urlKeyedAnonymizedDataCollection}" -- sub-label="$i18n{urlKeyedAnonymizedDataCollectionDesc}"> -- </settings-toggle-button> -- </template> +- <settings-toggle-button id="urlCollectionToggle" +- class="hr" +- pref="{{prefs.url_keyed_anonymized_data_collection.enabled}}" +- label="$i18n{urlKeyedAnonymizedDataCollection}" +- sub-label="$i18n{urlKeyedAnonymizedDataCollectionDesc}"> +- </settings-toggle-button> <if expr="_google_chrome"> <settings-toggle-button id="spellCheckControl" class="hr" ---- a/chrome/browser/resources/settings/privacy_page/security_page.html -+++ b/chrome/browser/resources/settings/privacy_page/security_page.html -@@ -107,10 +107,3 @@ +--- chrome/browser/resources/settings/privacy_page/security_page.html.orig ++++ chrome/browser/resources/settings/privacy_page/security_page.html +@@ -96,10 +96,3 @@ sub-label="$i18n{manageCertificatesDescription}" on-click="onManageCertificatesClick_"></cr-link-row> </if> @@ -209,8 +207,8 @@ - on-click="onAdvancedProtectionProgramLinkClick_" - external> - </cr-link-row> ---- a/chrome/browser/resources/settings/search_page/search_page.html -+++ b/chrome/browser/resources/settings/search_page/search_page.html +--- chrome/browser/resources/settings/search_page/search_page.html.orig ++++ chrome/browser/resources/settings/search_page/search_page.html @@ -12,10 +12,6 @@ <div class="cr-row first"> <div id="searchExplanation" class="flex cr-padded-text"> @@ -222,8 +220,19 @@ </div> <template is="dom-if" if="[[isDefaultSearchControlledByPolicy_( prefs.default_search_provider_data.template_url_data)]]"> ---- a/chrome/browser/resources/settings/settings_page/settings_subpage.html -+++ b/chrome/browser/resources/settings/settings_page/settings_subpage.html +--- chrome/browser/resources/settings/settings_menu/settings_menu.html.orig ++++ chrome/browser/resources/settings/settings_menu/settings_menu.html +@@ -111,7 +111,7 @@ + $i18n{autofillPageTitle} + <paper-ripple></paper-ripple> + </a> +- <template is="dom-if" if="[[!enableLandingPageRedesign_]]"> ++ <template is="dom-if" if="[[false]]"> + <a role="menuitem" href="/safetyCheck" + hidden="[[!pageVisibility.safetyCheck]]" + id="safetyCheck" +--- chrome/browser/resources/settings/settings_page/settings_subpage.html.orig ++++ chrome/browser/resources/settings/settings_page/settings_subpage.html @@ -72,7 +72,7 @@ </template> <h1 class="cr-title-text">[[pageTitle]]</h1> @@ -233,9 +242,9 @@ <cr-icon-button iron-icon="cr:help-outline" dir="ltr" aria-label="$i18n{learnMore}" on-click="onHelpClick_"> </cr-icon-button> ---- a/chrome/browser/ui/views/profiles/profile_menu_view.cc -+++ b/chrome/browser/ui/views/profiles/profile_menu_view.cc -@@ -175,6 +175,7 @@ void ProfileMenuView::BuildMenu() { +--- chrome/browser/ui/views/profiles/profile_menu_view.cc.orig ++++ chrome/browser/ui/views/profiles/profile_menu_view.cc +@@ -176,6 +176,7 @@ void ProfileMenuView::BuildMenu() { } gfx::ImageSkia ProfileMenuView::GetSyncIcon() const { @@ -243,7 +252,7 @@ Profile* profile = browser()->profile(); if (profile->IsOffTheRecord() || profile->IsGuestSession()) return gfx::ImageSkia(); -@@ -456,8 +457,7 @@ void ProfileMenuView::BuildIdentity() { +@@ -450,8 +451,7 @@ void ProfileMenuView::BuildIdentity() { menu_subtitle_); } else { menu_title_ = std::u16string(); @@ -253,19 +262,21 @@ SetProfileIdentityInfo( profile_name, background_color, edit_button_params, ui::ImageModel::FromImage( ---- a/chrome/browser/ui/views/sad_tab_view.cc -+++ b/chrome/browser/ui/views/sad_tab_view.cc -@@ -549,13 +549,6 @@ SadTabView::SadTabView(content::WebConte - auto* actions_container = - container->AddChildView(std::make_unique<views::FlexLayoutView>()); - actions_container->SetCrossAxisAlignment(views::LayoutAlignment::kCenter); -- auto* help_link = -- actions_container->AddChildView(std::make_unique<views::Link>( -- l10n_util::GetStringUTF16(GetHelpLinkTitle()))); +--- chrome/browser/ui/views/sad_tab_view.cc.orig ++++ chrome/browser/ui/views/sad_tab_view.cc +@@ -556,15 +556,9 @@ SadTabView::SadTabView(content::WebConte + CreateErrorCodeLabel(GetErrorCodeFormatString(), GetCrashedErrorCode()), + 2, 1.0, views::GridLayout::LEADING, views::GridLayout::LEADING); + +- auto help_link = std::make_unique<views::Link>( +- l10n_util::GetStringUTF16(GetHelpLinkTitle())); - help_link->SetCallback(base::BindRepeating( - &SadTab::PerformAction, base::Unretained(this), Action::HELP_LINK)); -- help_link->SetProperty(views::kTableVertAlignKey, -- views::LayoutAlignment::kCenter); - action_button_ = - actions_container->AddChildView(std::make_unique<views::MdTextButton>( - base::BindRepeating(&SadTabView::PerformAction, + layout->StartRowWithPadding(views::GridLayout::kFixedSize, column_set_id, + views::GridLayout::kFixedSize, + unrelated_vertical_spacing_large); +- layout->AddView(std::move(help_link), 1.0, 1.0, views::GridLayout::LEADING, +- views::GridLayout::CENTER); + auto action_button = std::make_unique<views::MdTextButton>( + base::BindRepeating(&SadTabView::PerformAction, base::Unretained(this), + Action::BUTTON),