diff --git a/build/bromite_patches_list.txt b/build/bromite_patches_list.txt index 6567a31b..4e8400a8 100644 --- a/build/bromite_patches_list.txt +++ b/build/bromite_patches_list.txt @@ -176,7 +176,6 @@ Add-lifetime-options-for-permissions.patch Disable-crash-reporting.patch Samsung-Note-9-SDK27-crazylinker-workaround.patch Disable-TLS-resumption.patch -Partition-DNS-requests-by-top-frame-NIK.patch Remove-mremap-from-seccomp-baseline-policy.patch Move-navigation-bar-to-bottom.patch Welcome-screen.patch @@ -202,13 +201,12 @@ Viewport-Protection.patch Override-Navigator-Language.patch Partition-blobs-by-top-frame-url.patch Remove-http-referrals-in-cross-origin-navigation.patch +Add-kill-switch-for-unsupported-clangd-flags.patch Fix-WebWorker-requestAnimationFrame.patch 00Enable-ThirdPartyStoragePartitioning-flag.patch 00Enable-CrossSiteFlagNetworkAnonymizationKey-flag.patch -00Experimental-user-scripts-support--fixup-.patch 00Remove-navigator-connection-info--fixup-.patch -00Experimental-user-scripts-support--fixup--2.patch 00OpenSearch--miscellaneous--fixup-.patch 00Eyeo-Adblock.patch 00Eyeo-Adblock-Remove-Privacy-Issues.patch @@ -244,4 +242,6 @@ Fix-WebWorker-requestAnimationFrame.patch 00ungoogled-chromium--no-special-hosts-d--win-fixup-.patch 00Client-hints-overrides--win-fixup-.patch 00Logcat-crash-reports-UI--win-fixup-.patch -00Fix-windows-build.patch \ No newline at end of file +00Fix-windows-build.patch +00ungoogled-chr-no-special-hosts-domains--add-fixup-.patch +00Disable-fetching-of-all-field-trials--add-fixup-.patch \ No newline at end of file diff --git a/build/patches/00Add-bookmark-import-export-actions--win-fixup-.patch b/build/patches/00Add-bookmark-import-export-actions--win-fixup-.patch index cfdc36d5..736b9ae8 100644 --- a/build/patches/00Add-bookmark-import-export-actions--win-fixup-.patch +++ b/build/patches/00Add-bookmark-import-export-actions--win-fixup-.patch @@ -25,7 +25,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -8972,11 +8972,13 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8940,11 +8940,13 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(net::features::kIsCleartextPermitted)}, #endif diff --git a/build/patches/00Add-flag-to-disable-IPv6-probes--win-fixup-.patch b/build/patches/00Add-flag-to-disable-IPv6-probes--win-fixup-.patch index 3601c4cb..c53a7a0b 100644 --- a/build/patches/00Add-flag-to-disable-IPv6-probes--win-fixup-.patch +++ b/build/patches/00Add-flag-to-disable-IPv6-probes--win-fixup-.patch @@ -6,17 +6,18 @@ Subject: Add flag to disable IPv6 probes (win fixup) chrome/browser/about_flags.cc | 2 +- components/subresource_filter/tools/BUILD.gn | 6 ------ components/url_formatter/spoof_checks/top_domains/BUILD.gn | 3 +-- + net/BUILD.gn | 1 + net/base/features.cc | 3 +++ net/base/features.h | 3 +++ net/dns/host_resolver_manager.cc | 2 +- services/network/public/cpp/features.cc | 4 ---- services/network/public/cpp/features.h | 2 -- - 8 files changed, 9 insertions(+), 16 deletions(-) + 9 files changed, 10 insertions(+), 16 deletions(-) diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -5935,7 +5935,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -5915,7 +5915,7 @@ const FeatureEntry kFeatureEntries[] = { {"ipv6-probing", flag_descriptions::kIPv6ProbingName, flag_descriptions::kIPv6ProbingDescription, kOsAll, @@ -68,6 +69,17 @@ diff --git a/components/url_formatter/spoof_checks/top_domains/BUILD.gn b/compon ] if (is_ios) { frameworks = [ "UIKit.framework" ] +diff --git a/net/BUILD.gn b/net/BUILD.gn +--- a/net/BUILD.gn ++++ b/net/BUILD.gn +@@ -1062,6 +1062,7 @@ component("net") { + "//build:chromeos_buildflags", + "//net/data/ssl/ev_roots:gen_ev_root_store_inc", + "//net/http:transport_security_state_generated_files", ++ "//components/network_session_configurator/common" + ] + + public_deps = [ diff --git a/net/base/features.cc b/net/base/features.cc --- a/net/base/features.cc +++ b/net/base/features.cc @@ -97,7 +109,7 @@ diff --git a/net/base/features.h b/net/base/features.h diff --git a/net/dns/host_resolver_manager.cc b/net/dns/host_resolver_manager.cc --- a/net/dns/host_resolver_manager.cc +++ b/net/dns/host_resolver_manager.cc -@@ -4099,7 +4099,7 @@ bool HostResolverManager::IsIPv6Reachable(const NetLogWithSource& net_log) { +@@ -4087,7 +4087,7 @@ bool HostResolverManager::IsIPv6Reachable(const NetLogWithSource& net_log) { (tick_clock_->NowTicks() - last_ipv6_probe_time_).InMilliseconds() > kIPv6ProbePeriodMs) { diff --git a/build/patches/00Add-flag-to-disable-external-intent-re--win-fixup-.patch b/build/patches/00Add-flag-to-disable-external-intent-re--win-fixup-.patch index f1930cf2..77e4306c 100644 --- a/build/patches/00Add-flag-to-disable-external-intent-re--win-fixup-.patch +++ b/build/patches/00Add-flag-to-disable-external-intent-re--win-fixup-.patch @@ -9,7 +9,7 @@ Subject: Add flag to disable external intent re (win fixup) diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -3548,9 +3548,11 @@ const FeatureEntry kFeatureEntries[] = { +@@ -3528,9 +3528,11 @@ const FeatureEntry kFeatureEntries[] = { {"ui-disable-partial-swap", flag_descriptions::kUiPartialSwapName, flag_descriptions::kUiPartialSwapDescription, kOsAll, SINGLE_DISABLE_VALUE_TYPE(switches::kUIDisablePartialSwap)}, diff --git a/build/patches/00Disable-fetching-of-all-field-trials--add-fixup-.patch b/build/patches/00Disable-fetching-of-all-field-trials--add-fixup-.patch new file mode 100644 index 00000000..92685e63 --- /dev/null +++ b/build/patches/00Disable-fetching-of-all-field-trials--add-fixup-.patch @@ -0,0 +1,67 @@ +From: Your Name +Date: Wed, 19 Oct 2022 13:25:14 +0000 +Subject: Disable fetching of all field trials (add fixup) + +--- + chrome/browser/net/system_network_context_manager.cc | 1 - + components/variations/net/BUILD.gn | 2 -- + content/browser/loader/url_loader_throttles.cc | 2 -- + content/renderer/variations_render_thread_observer.cc | 9 --------- + 4 files changed, 14 deletions(-) + +diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/browser/net/system_network_context_manager.cc +--- a/chrome/browser/net/system_network_context_manager.cc ++++ b/chrome/browser/net/system_network_context_manager.cc +@@ -703,7 +703,6 @@ void SystemNetworkContextManager::AddSSLConfigToNetworkContextParams( + + void SystemNetworkContextManager::ConfigureDefaultNetworkContextParams( + network::mojom::NetworkContextParams* network_context_params) { +- variations::UpdateCorsExemptHeaderForVariations(network_context_params); + + network_context_params->enable_brotli = true; + +diff --git a/components/variations/net/BUILD.gn b/components/variations/net/BUILD.gn +--- a/components/variations/net/BUILD.gn ++++ b/components/variations/net/BUILD.gn +@@ -33,8 +33,6 @@ static_library("net") { + # third_party/blink/public/common does not build on iOS + if (!is_ios) { + sources += [ +- "variations_url_loader_throttle.cc", +- "variations_url_loader_throttle.h", + ] + deps += [ + "//components/variations:variations_mojom", +diff --git a/content/browser/loader/url_loader_throttles.cc b/content/browser/loader/url_loader_throttles.cc +--- a/content/browser/loader/url_loader_throttles.cc ++++ b/content/browser/loader/url_loader_throttles.cc +@@ -43,8 +43,6 @@ CreateContentBrowserURLLoaderThrottles( + // TODO(crbug.com/1094303): Consider whether we want to use the WebContents to + // determine the value for variations::Owner. Alternatively, this is the + // browser side, and we might be fine with Owner::kUnknown. +- variations::VariationsURLLoaderThrottle::AppendThrottleIfNeeded( +- browser_context->GetVariationsClient(), &throttles); + + ClientHintsControllerDelegate* client_hint_delegate = + browser_context->GetClientHintsControllerDelegate(); +diff --git a/content/renderer/variations_render_thread_observer.cc b/content/renderer/variations_render_thread_observer.cc +--- a/content/renderer/variations_render_thread_observer.cc ++++ b/content/renderer/variations_render_thread_observer.cc +@@ -56,15 +56,6 @@ void VariationsRenderThreadObserver::AppendThrottleIfNeeded( + const url::Origin& top_frame_origin, + std::vector>* throttles) { + variations::OmniboxURLLoaderThrottle::AppendThrottleIfNeeded(throttles); +- +- variations::mojom::VariationsHeadersPtr variations_headers = +- GetVariationsData()->GetVariationsHeaders(); +- +- if (!variations_headers.is_null()) { +- throttles->push_back( +- std::make_unique( +- std::move(variations_headers), top_frame_origin)); +- } + } + + void VariationsRenderThreadObserver::RegisterMojoInterfaces( +-- +2.25.1 diff --git a/build/patches/00Disable-safe-browsing--win-fixup-.patch b/build/patches/00Disable-safe-browsing--win-fixup-.patch index 1b5e19c9..23cb44ce 100644 --- a/build/patches/00Disable-safe-browsing--win-fixup-.patch +++ b/build/patches/00Disable-safe-browsing--win-fixup-.patch @@ -9,7 +9,7 @@ Subject: Disable safe browsing (win fixup) chrome/browser/chrome_browser_main_win.cc | 6 - .../bubble/download_bubble_controller.cc | 2 + .../chrome_download_manager_delegate.cc | 4 +- - .../browser/download/download_item_model.cc | 2 + + .../browser/download/download_item_model.cc | 68 +------- .../analysis/content_analysis_delegate.cc | 163 +----------------- .../analysis/content_analysis_delegate.h | 7 - .../analysis/request_handler_base.cc | 15 -- @@ -48,7 +48,7 @@ Subject: Disable safe browsing (win fixup) .../browser/mojo_safe_browsing_impl.cc | 1 + .../core/common/safe_browsing_prefs.cc | 2 +- .../tracked_persistent_pref_store_factory.cc | 10 +- - 45 files changed, 48 insertions(+), 468 deletions(-) + 45 files changed, 48 insertions(+), 534 deletions(-) diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn @@ -182,7 +182,7 @@ diff --git a/chrome/browser/download/download_item_model.cc b/chrome/browser/dow safe_browsing::SafeBrowsingService* sb_service = g_browser_process->safe_browsing_service(); if (!sb_service) -@@ -911,6 +912,7 @@ void DownloadItemModel::ExecuteCommand(DownloadCommands* download_commands, +@@ -911,82 +912,17 @@ void DownloadItemModel::ExecuteCommand(DownloadCommands* download_commands, safe_browsing::DeepScanningRequest::DeepScanTrigger:: TRIGGER_APP_PROMPT, safe_browsing::DownloadCheckResult::UNKNOWN, std::move(settings)); @@ -190,6 +190,82 @@ diff --git a/chrome/browser/download/download_item_model.cc b/chrome/browser/dow break; } } + + DownloadItemModel::BubbleUIInfo + DownloadItemModel::GetBubbleUIInfoForTailoredWarning() const { +- download::DownloadDangerType danger_type = GetDangerType(); +- TailoredVerdict tailored_verdict = safe_browsing::DownloadProtectionService:: +- GetDownloadProtectionTailoredVerdict(download_); +- +- // Suspicious archives +- if (danger_type == download::DOWNLOAD_DANGER_TYPE_UNCOMMON_CONTENT && +- tailored_verdict.tailored_verdict_type() == +- TailoredVerdict::SUSPICIOUS_ARCHIVE) { +- return DownloadUIModel::BubbleUIInfo( +- l10n_util::GetStringUTF16( +- IDS_DOWNLOAD_BUBBLE_SUBPAGE_SUMMARY_SUSPICIOUS_ARCHIVE)) +- .AddIconAndColor(views::kInfoIcon, ui::kColorAlertMediumSeverity) +- .AddPrimaryButton(DownloadCommands::Command::DISCARD) +- .AddSubpageButton(l10n_util::GetStringUTF16(IDS_DOWNLOAD_BUBBLE_DELETE), +- DownloadCommands::Command::DISCARD, +- /*is_prominent=*/true) +- .AddSubpageButton( +- l10n_util::GetStringUTF16(IDS_DOWNLOAD_BUBBLE_CONTINUE), +- DownloadCommands::Command::KEEP, +- /*is_prominent=*/false); +- } +- +- // Cookie theft +- if (danger_type == +- download::DOWNLOAD_DANGER_TYPE_DANGEROUS_ACCOUNT_COMPROMISE && +- tailored_verdict.tailored_verdict_type() == +- TailoredVerdict::COOKIE_THEFT) { +- // TODO(crbug.com/1351925): Check the adjustments field and add the account +- // information in the subpage summary. +- return DownloadUIModel::BubbleUIInfo( +- l10n_util::GetStringUTF16( +- IDS_DOWNLOAD_BUBBLE_SUBPAGE_SUMMARY_COOKIE_THEFT)) +- .AddIconAndColor(vector_icons::kNotSecureWarningIcon, +- ui::kColorAlertHighSeverity) +- .AddPrimaryButton(DownloadCommands::Command::DISCARD) +- .AddSubpageButton(l10n_util::GetStringUTF16(IDS_DOWNLOAD_BUBBLE_DELETE), +- DownloadCommands::Command::DISCARD, +- /*is_prominent=*/true); +- } +- +- NOTREACHED(); + return DownloadUIModel::BubbleUIInfo(); + } + + bool DownloadItemModel::ShouldShowTailoredWarning() const { +- if (!IsBubbleV2Enabled() || +- !base::FeatureList::IsEnabled(safe_browsing::kDownloadTailoredWarnings)) { +- return false; +- } +- +- static const struct ValidCombination { +- download::DownloadDangerType danger_type; +- TailoredVerdict::TailoredVerdictType tailored_verdict_type; +- } kValidTailoredWarningCombinations[]{ +- {download::DOWNLOAD_DANGER_TYPE_UNCOMMON_CONTENT, +- TailoredVerdict::SUSPICIOUS_ARCHIVE}, +- {download::DOWNLOAD_DANGER_TYPE_DANGEROUS_ACCOUNT_COMPROMISE, +- TailoredVerdict::COOKIE_THEFT}}; +- +- download::DownloadDangerType danger_type = GetDangerType(); +- TailoredVerdict tailored_verdict = safe_browsing::DownloadProtectionService:: +- GetDownloadProtectionTailoredVerdict(download_); +- for (const auto& combination : kValidTailoredWarningCombinations) { +- if (danger_type == combination.danger_type && +- tailored_verdict.tailored_verdict_type() == +- combination.tailored_verdict_type) { +- return true; +- } +- } +- + return false; + } + diff --git a/chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc b/chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc --- a/chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc +++ b/chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc @@ -1356,7 +1432,7 @@ diff --git a/chrome/services/file_util/public/cpp/sandboxed_zip_analyzer.h b/chr diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -229,7 +229,6 @@ static_library("test_support") { +@@ -228,7 +228,6 @@ static_library("test_support") { "//chrome:strings", "//chrome/browser:browser_process", "//chrome/browser:test_support", @@ -1364,7 +1440,7 @@ diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn "//chrome/child", "//chrome/common:non_code_constants", "//chrome/common:test_support", -@@ -1243,7 +1242,6 @@ if (!is_android) { +@@ -1242,7 +1241,6 @@ if (!is_android) { "//chrome/browser/profiling_host:profiling_browsertests", "//chrome/browser/resource_coordinator:tab_manager_features", "//chrome/browser/resource_coordinator:tab_metrics_event_proto", @@ -1372,7 +1448,7 @@ diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn "//chrome/browser/segmentation_platform:test_utils", "//chrome/browser/sharing/proto", "//chrome/browser/ui/color:color_headers", -@@ -5749,9 +5747,6 @@ test("unit_tests") { +@@ -5748,9 +5746,6 @@ test("unit_tests") { "//chrome/browser/profile_resetter:profile_reset_report_proto", "//chrome/browser/profiling_host", "//chrome/browser/push_messaging:budget_proto", diff --git a/build/patches/00Enable-CrossSiteFlagNetworkAnonymizationKey-flag.patch b/build/patches/00Enable-CrossSiteFlagNetworkAnonymizationKey-flag.patch index d9c30fe2..0ce4952c 100644 --- a/build/patches/00Enable-CrossSiteFlagNetworkAnonymizationKey-flag.patch +++ b/build/patches/00Enable-CrossSiteFlagNetworkAnonymizationKey-flag.patch @@ -9,7 +9,7 @@ Subject: Enable CrossSiteFlagNetworkAnonymizationKey flag diff --git a/net/base/features.cc b/net/base/features.cc --- a/net/base/features.cc +++ b/net/base/features.cc -@@ -170,7 +170,7 @@ const base::Feature kEnableDoubleKeyNetworkAnonymizationKey{ +@@ -164,7 +164,7 @@ const base::Feature kEnableDoubleKeyNetworkAnonymizationKey{ const base::Feature kEnableCrossSiteFlagNetworkAnonymizationKey{ "EnableCrossSiteFlagNetworkAnonymizationKey", diff --git a/build/patches/00Enable-ThirdPartyStoragePartitioning-flag.patch b/build/patches/00Enable-ThirdPartyStoragePartitioning-flag.patch index d34b27aa..b1467ae8 100644 --- a/build/patches/00Enable-ThirdPartyStoragePartitioning-flag.patch +++ b/build/patches/00Enable-ThirdPartyStoragePartitioning-flag.patch @@ -9,7 +9,7 @@ Subject: Enable ThirdPartyStoragePartitioning flag diff --git a/net/base/features.cc b/net/base/features.cc --- a/net/base/features.cc +++ b/net/base/features.cc -@@ -364,7 +364,7 @@ const base::FeatureParam kStorageAccessAPIAutoDenyOutsideFPS{ +@@ -358,7 +358,7 @@ const base::FeatureParam kStorageAccessAPIAutoDenyOutsideFPS{ // Enables partitioning of third party storage (IndexedDB, CacheStorage, etc.) // by the top level site to reduce fingerprinting. const base::Feature kThirdPartyStoragePartitioning{ diff --git a/build/patches/00Experimental-user-scripts-support--fixup--2.patch b/build/patches/00Experimental-user-scripts-support--fixup--2.patch deleted file mode 100644 index cb9035f2..00000000 --- a/build/patches/00Experimental-user-scripts-support--fixup--2.patch +++ /dev/null @@ -1,84 +0,0 @@ -From: Your Name -Date: Wed, 28 Sep 2022 12:49:17 +0000 -Subject: Experimental user scripts support (fixup) 2 - ---- - .../user_scripts/renderer/script_context.cc | 26 +------------------ - .../user_scripts/renderer/user_script_set.cc | 12 ++++++--- - 2 files changed, 9 insertions(+), 29 deletions(-) - -diff --git a/components/user_scripts/renderer/script_context.cc b/components/user_scripts/renderer/script_context.cc ---- a/components/user_scripts/renderer/script_context.cc -+++ b/components/user_scripts/renderer/script_context.cc -@@ -167,36 +167,12 @@ GURL GetEffectiveDocumentURL( - return parent_url; - } - --using FrameToDocumentLoader = -- base::flat_map; -- --FrameToDocumentLoader& FrameDocumentLoaderMap() { -- static base::NoDestructor map; -- return *map; --} -- --blink::WebDocumentLoader* CurrentDocumentLoader( -- const blink::WebLocalFrame* frame) { -- auto& map = FrameDocumentLoaderMap(); -- auto it = map.find(frame); -- return it == map.end() ? frame->GetDocumentLoader() : it->second; --} -- - } // namespace - - // static - GURL ScriptContext::GetDocumentLoaderURLForFrame( - const blink::WebLocalFrame* frame) { -- // Normally we would use frame->document().url() to determine the document's -- // URL, but to decide whether to inject a content script, we use the URL from -- // the data source. This "quirk" helps prevents content scripts from -- // inadvertently adding DOM elements to the compose iframe in Gmail because -- // the compose iframe's dataSource URL is about:blank, but the document URL -- // changes to match the parent document after Gmail document.writes into -- // it to create the editor. -- // http://code.google.com/p/chromium/issues/detail?id=86742 -- blink::WebDocumentLoader* document_loader = CurrentDocumentLoader(frame); -- return document_loader ? GURL(document_loader->GetUrl()) : GURL(); -+ return GURL(frame->GetDocument().Url()); - } - - // static -diff --git a/components/user_scripts/renderer/user_script_set.cc b/components/user_scripts/renderer/user_script_set.cc ---- a/components/user_scripts/renderer/user_script_set.cc -+++ b/components/user_scripts/renderer/user_script_set.cc -@@ -218,6 +218,14 @@ std::unique_ptr UserScriptSet::GetInjectionForScript( - - blink::WebString UserScriptSet::GetJsSource(const UserScript::File& file, - bool emulate_greasemonkey) { -+ if (base::FeatureList::IsEnabled(features::kEnableLoggingUserScripts)) { -+ if (emulate_greasemonkey) { -+ LOG(INFO) << "UserScripts: Injecting w/greasemonkey " << file.url(); -+ } else { -+ LOG(INFO) << "UserScripts: Injecting " << file.url(); -+ } -+ } -+ - const GURL& url = file.url(); - auto iter = script_sources_.find(url); - if (iter != script_sources_.end()) { -@@ -233,13 +241,9 @@ blink::WebString UserScriptSet::GetJsSource(const UserScript::File& file, - std::string content = - base::StrCat({kUserScriptHead, script_content, kUserScriptTail}); - source = blink::WebString::FromUTF8(content); -- if (base::FeatureList::IsEnabled(features::kEnableLoggingUserScripts)) -- LOG(INFO) << "UserScripts: Injecting w/greasemonkey " << file.url(); - } else { - source = blink::WebString::FromUTF8(script_content.data(), - script_content.length()); -- if (base::FeatureList::IsEnabled(features::kEnableLoggingUserScripts)) -- LOG(INFO) << "UserScripts: Injecting " << file.url(); - } - script_sources_[url] = source; - return source; --- -2.25.1 diff --git a/build/patches/00Experimental-user-scripts-support--fixup-.patch b/build/patches/00Experimental-user-scripts-support--fixup-.patch deleted file mode 100644 index 0ecbcd48..00000000 --- a/build/patches/00Experimental-user-scripts-support--fixup-.patch +++ /dev/null @@ -1,69 +0,0 @@ -From: Your Name -Date: Mon, 12 Sep 2022 12:18:55 +0000 -Subject: Experimental user scripts support (fixup) - ---- - .../renderer/user_scripts_renderer_client.cc | 12 ++++++------ - .../renderer/user_scripts_renderer_client.h | 1 - - 2 files changed, 6 insertions(+), 7 deletions(-) - -diff --git a/components/user_scripts/renderer/user_scripts_renderer_client.cc b/components/user_scripts/renderer/user_scripts_renderer_client.cc ---- a/components/user_scripts/renderer/user_scripts_renderer_client.cc -+++ b/components/user_scripts/renderer/user_scripts_renderer_client.cc -@@ -62,15 +62,15 @@ void UserScriptsRendererClient::RenderFrameCreated( - enabled_ = params.allow_userscript; - if (!enabled_) return; - -- if (loaded_ == false) { -- loaded_ = true; -+ ExtensionFrameHelper* frame_helper = ExtensionFrameHelper::Get(render_frame); -+ if (!frame_helper) { - new user_scripts::ExtensionFrameHelper(render_frame); - dispatcher_->OnRenderFrameCreated(render_frame); - } - } - - void UserScriptsRendererClient::RunScriptsAtDocumentStart(content::RenderFrame* render_frame) { -- if (!enabled_ || !loaded_) return; -+ if (!enabled_) return; - - ExtensionFrameHelper* frame_helper = ExtensionFrameHelper::Get(render_frame); - if (!frame_helper) -@@ -81,7 +81,7 @@ void UserScriptsRendererClient::RunScriptsAtDocumentStart(content::RenderFrame* - } - - void UserScriptsRendererClient::RunScriptsAtDocumentEnd(content::RenderFrame* render_frame) { -- if (!enabled_ || !loaded_) return; -+ if (!enabled_) return; - - ExtensionFrameHelper* frame_helper = ExtensionFrameHelper::Get(render_frame); - if (!frame_helper) -@@ -92,7 +92,7 @@ void UserScriptsRendererClient::RunScriptsAtDocumentEnd(content::RenderFrame* re - } - - void UserScriptsRendererClient::RunScriptsAtDocumentIdle(content::RenderFrame* render_frame) { -- if (!enabled_ || !loaded_) return; -+ if (!enabled_) return; - - ExtensionFrameHelper* frame_helper = ExtensionFrameHelper::Get(render_frame); - if (!frame_helper) -@@ -102,4 +102,4 @@ void UserScriptsRendererClient::RunScriptsAtDocumentIdle(content::RenderFrame* r - // |frame_helper| and |render_frame| might be dead by now. - } - --} -\ No newline at end of file -+} -diff --git a/components/user_scripts/renderer/user_scripts_renderer_client.h b/components/user_scripts/renderer/user_scripts_renderer_client.h ---- a/components/user_scripts/renderer/user_scripts_renderer_client.h -+++ b/components/user_scripts/renderer/user_scripts_renderer_client.h -@@ -29,7 +29,6 @@ class UserScriptsRendererClient { - private: - std::unique_ptr dispatcher_; - bool enabled_ = false; -- bool loaded_ = false; - }; - - } --- -2.25.1 diff --git a/build/patches/00Experimental-user-scripts-support--win-fixup-.patch b/build/patches/00Experimental-user-scripts-support--win-fixup-.patch index d9c34ded..9920e7ca 100644 --- a/build/patches/00Experimental-user-scripts-support--win-fixup-.patch +++ b/build/patches/00Experimental-user-scripts-support--win-fixup-.patch @@ -42,7 +42,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -7577,9 +7577,11 @@ const FeatureEntry kFeatureEntries[] = { +@@ -7557,9 +7557,11 @@ const FeatureEntry kFeatureEntries[] = { chromeos::features::kClipboardHistoryNudgeSessionReset)}, #endif // BUILDFLAG(IS_CHROMEOS_ASH) diff --git a/build/patches/00Eyeo-Adblock--win-fixup-.patch b/build/patches/00Eyeo-Adblock--win-fixup-.patch index 5b95a7c5..4947a409 100644 --- a/build/patches/00Eyeo-Adblock--win-fixup-.patch +++ b/build/patches/00Eyeo-Adblock--win-fixup-.patch @@ -3,8 +3,9 @@ Date: Thu, 13 Oct 2022 10:24:51 +0000 Subject: Eyeo Adblock (win fixup) --- - chrome/browser/resources/settings/adblock_page/adblock_page.ts | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + .../browser/resources/settings/adblock_page/adblock_page.ts | 2 +- + chrome/test/BUILD.gn | 4 ---- + 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/chrome/browser/resources/settings/adblock_page/adblock_page.ts b/chrome/browser/resources/settings/adblock_page/adblock_page.ts --- a/chrome/browser/resources/settings/adblock_page/adblock_page.ts @@ -18,5 +19,19 @@ diff --git a/chrome/browser/resources/settings/adblock_page/adblock_page.ts b/ch import 'chrome://resources/polymer/v3_0/iron-collapse/iron-collapse.js'; import 'chrome://resources/polymer/v3_0/iron-flex-layout/iron-flex-layout-classes.js'; import 'chrome://resources/polymer/v3_0/iron-icon/iron-icon.js'; +diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn +--- a/chrome/test/BUILD.gn ++++ b/chrome/test/BUILD.gn +@@ -2350,10 +2350,6 @@ if (!is_android) { + "v8/wasm_trap_handler_browsertest.cc", + ] + +- if (eyeo_intercept_debug_url) { +- sources += [ "../browser/adblock/adblock_debug_url_browsertest.cc" ] +- } +- + if (is_chrome_branded) { + sources += [ "../browser/ui/views/side_panel/lens/lens_side_panel_coordinator_browsertest.cc" ] + } -- 2.25.1 diff --git a/build/patches/00Eyeo-Adblock-Remove-Privacy-Issues.patch b/build/patches/00Eyeo-Adblock-Remove-Privacy-Issues.patch index 614de649..886a25c6 100644 --- a/build/patches/00Eyeo-Adblock-Remove-Privacy-Issues.patch +++ b/build/patches/00Eyeo-Adblock-Remove-Privacy-Issues.patch @@ -3,20 +3,20 @@ Date: Thu, 29 Sep 2022 11:27:35 +0000 Subject: Eyeo Adblock Remove --- - .../android/java/res/xml/main_preferences.xml | 2 +- + .../android/java/res/xml/main_preferences.xml | 11 +- chrome/browser/BUILD.gn | 2 - .../adblock/adblock_content_browser_client.cc | 23 - .../adblock_telemetry_service_factory.cc | 91 - .../adblock_telemetry_service_factory.h | 50 - .../adblock/subscription_updater_factory.cc | 2 +- ...hrome_browser_main_extra_parts_profiles.cc | 2 - + chrome/test/BUILD.gn | 1 - components/adblock/android/BUILD.gn | 2 +- .../layout/adblock_filter_lists_list_item.xml | 10 + ...ences.xml => eyeo_adblock_preferences.xml} | 0 .../settings/AdblockFilterListsAdapter.java | 3 + .../settings/AdblockSettingsFragment.java | 2 +- - components/adblock/content/common/BUILD.gn | 7 - - .../common/adblock_url_loader_factory.cc | 22 +- + components/adblock/content/common/BUILD.gn | 14 - .../adblock_url_loader_factory_for_test.cc | 194 - .../adblock_url_loader_factory_for_test.h | 73 - components/adblock/core/BUILD.gn | 49 - @@ -48,7 +48,7 @@ Subject: Eyeo Adblock Remove components/resources/adblocking/BUILD.gn | 25 +- .../snippets/dist/isolated-first.jst | 62 + .../snippets/dist/isolated-first.source.jst | 3126 +++++++++++++++++ - 45 files changed, 3270 insertions(+), 1302 deletions(-) + 45 files changed, 3259 insertions(+), 1308 deletions(-) delete mode 100644 chrome/browser/adblock/adblock_telemetry_service_factory.cc delete mode 100644 chrome/browser/adblock/adblock_telemetry_service_factory.h rename components/adblock/android/java/res/xml/{adblock_preferences.xml => eyeo_adblock_preferences.xml} (100%) @@ -65,7 +65,28 @@ Subject: Eyeo Adblock Remove diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/java/res/xml/main_preferences.xml --- a/chrome/android/java/res/xml/main_preferences.xml +++ b/chrome/android/java/res/xml/main_preferences.xml -@@ -90,7 +90,7 @@ found in the LICENSE file. +@@ -1,11 +1,4 @@ + +-<<<<<<< HEAD +- +-======= + + +->>>>>>> 619c30d2d529e... Squashed commits +- + +@@ -90,7 +81,7 @@ found in the LICENSE file. android:title="@string/prefs_accessibility"/> . + +-import("//components/adblock/features.gni") +- + config("adblock_content_common_config") { + defines = [] +- +- if (eyeo_intercept_debug_url) { +- print("WARNING! Enabled intercepting eyeo debug url \"adblock.test.data\"") +- defines += [ "EYEO_INTERCEPT_DEBUG_URL=1" ] +- } + } + + source_set("common_impl") { +@@ -35,13 +28,6 @@ source_set("common_impl") { "adblock_url_loader_factory.h", ] @@ -382,88 +430,6 @@ diff --git a/components/adblock/content/common/BUILD.gn b/components/adblock/con deps = [ "//components/adblock/core", "//third_party/blink/public/common:headers", -diff --git a/components/adblock/content/common/adblock_url_loader_factory.cc b/components/adblock/content/common/adblock_url_loader_factory.cc ---- a/components/adblock/content/common/adblock_url_loader_factory.cc -+++ b/components/adblock/content/common/adblock_url_loader_factory.cc -@@ -60,13 +60,13 @@ class AdblockURLLoaderFactory::InProgressRequest - ::network::mojom::EarlyHintsPtr early_hints) override; - void OnReceiveResponse( - ::network::mojom::URLResponseHeadPtr head, -- ::mojo::ScopedDataPipeConsumerHandle body, -- absl::optional cached_metadata) override; -+ ::mojo::ScopedDataPipeConsumerHandle body) override; - void OnReceiveRedirect(const ::net::RedirectInfo& redirect_info, - ::network::mojom::URLResponseHeadPtr head) override; - void OnUploadProgress(int64_t current_position, - int64_t total_size, - OnUploadProgressCallback callback) override; -+ void OnReceiveCachedMetadata(::mojo_base::BigBuffer data) override; - void OnTransferSizeUpdated(int32_t transfer_size_diff) override; - void OnComplete(const ::network::URLLoaderCompletionStatus& status) override; - -@@ -94,7 +94,6 @@ class AdblockURLLoaderFactory::InProgressRequest - void OnProcessHeadersResult( - ::network::mojom::URLResponseHeadPtr head, - ::mojo::ScopedDataPipeConsumerHandle body, -- absl::optional cached_metadata, - adblock::mojom::FilterMatchResult result, - network::mojom::ParsedHeadersPtr parsed_headers); - void OnRequestError(int error_code); -@@ -187,15 +186,13 @@ void AdblockURLLoaderFactory::InProgressRequest::OnReceiveEarlyHints( - - void AdblockURLLoaderFactory::InProgressRequest::OnReceiveResponse( - network::mojom::URLResponseHeadPtr head, -- mojo::ScopedDataPipeConsumerHandle body, -- absl::optional cached_metadata) { -+ mojo::ScopedDataPipeConsumerHandle body) { - if (net::IsLocalhost(request_url_) || (!request_url_.SchemeIsHTTPOrHTTPS() && - !request_url_.SchemeIsWSOrWSS())) { - VLOG(1) - << "[eyeo] Ignoring URL (local url or unsupported scheme), allowing " - "load."; -- target_client_->OnReceiveResponse(std::move(head), std::move(body), -- std::move(cached_metadata)); -+ target_client_->OnReceiveResponse(std::move(head), std::move(body)); - return; - } - -@@ -206,13 +203,12 @@ void AdblockURLLoaderFactory::InProgressRequest::OnReceiveResponse( - request_url_, factory_->frame_tree_node_id_, headers, user_agent_string_, - base::BindOnce(&InProgressRequest::OnProcessHeadersResult, - weak_factory_.GetWeakPtr(), std::move(head), -- std::move(body), std::move(cached_metadata))); -+ std::move(body))); - } - - void AdblockURLLoaderFactory::InProgressRequest::OnProcessHeadersResult( - ::network::mojom::URLResponseHeadPtr head, - ::mojo::ScopedDataPipeConsumerHandle body, -- absl::optional cached_metadata, - adblock::mojom::FilterMatchResult result, - network::mojom::ParsedHeadersPtr parsed_headers) { - if (result == adblock::mojom::FilterMatchResult::kBlockRule) { -@@ -227,8 +223,7 @@ void AdblockURLLoaderFactory::InProgressRequest::OnProcessHeadersResult( - head->parsed_headers = std::move(parsed_headers); - } - -- target_client_->OnReceiveResponse(std::move(head), std::move(body), -- std::move(cached_metadata)); -+ target_client_->OnReceiveResponse(std::move(head), std::move(body)); - client_receiver_.Resume(); - } - -@@ -274,6 +269,11 @@ void AdblockURLLoaderFactory::InProgressRequest::OnUploadProgress( - std::move(callback)); - } - -+void AdblockURLLoaderFactory::InProgressRequest::OnReceiveCachedMetadata( -+ mojo_base::BigBuffer data) { -+ target_client_->OnReceiveCachedMetadata(std::move(data)); -+} -+ - void AdblockURLLoaderFactory::InProgressRequest::OnTransferSizeUpdated( - int32_t transfer_size_diff) { - target_client_->OnTransferSizeUpdated(transfer_size_diff); diff --git a/components/adblock/content/common/adblock_url_loader_factory_for_test.cc b/components/adblock/content/common/adblock_url_loader_factory_for_test.cc deleted file mode 100644 --- a/components/adblock/content/common/adblock_url_loader_factory_for_test.cc diff --git a/build/patches/00Fix-windows-build.patch b/build/patches/00Fix-windows-build.patch index 8f46a9f0..a3353769 100644 --- a/build/patches/00Fix-windows-build.patch +++ b/build/patches/00Fix-windows-build.patch @@ -3,9 +3,29 @@ Date: Thu, 13 Oct 2022 10:34:52 +0000 Subject: Fix windows build --- - chrome/browser/devtools/devtools_window.cc | 1 + - 1 file changed, 1 insertion(+) + chrome/browser/browser_process_platform_part_win.cc | 3 +++ + chrome/browser/devtools/devtools_window.cc | 1 + + 2 files changed, 4 insertions(+) +diff --git a/chrome/browser/browser_process_platform_part_win.cc b/chrome/browser/browser_process_platform_part_win.cc +--- a/chrome/browser/browser_process_platform_part_win.cc ++++ b/chrome/browser/browser_process_platform_part_win.cc +@@ -5,12 +5,15 @@ + #include "chrome/browser/browser_process_platform_part_win.h" + + #include "chrome/browser/active_use_util.h" ++#include "chrome/install_static/buildflags.h" + + BrowserProcessPlatformPart::BrowserProcessPlatformPart() = default; + BrowserProcessPlatformPart::~BrowserProcessPlatformPart() = default; + + void BrowserProcessPlatformPart::PlatformSpecificCommandLineProcessing( + const base::CommandLine& command_line) { ++#if BUILDFLAG(USE_GOOGLE_UPDATE_INTEGRATION) + if (!did_run_updater_ && ShouldRecordActiveUse(command_line)) + did_run_updater_.emplace(); ++#endif + } diff --git a/chrome/browser/devtools/devtools_window.cc b/chrome/browser/devtools/devtools_window.cc --- a/chrome/browser/devtools/devtools_window.cc +++ b/chrome/browser/devtools/devtools_window.cc diff --git a/build/patches/00Remove-signin-and-sync-integrations--win-fixup-.patch b/build/patches/00Remove-signin-and-sync-integrations--win-fixup-.patch index 5891881d..2cbc52ff 100644 --- a/build/patches/00Remove-signin-and-sync-integrations--win-fixup-.patch +++ b/build/patches/00Remove-signin-and-sync-integrations--win-fixup-.patch @@ -11,13 +11,15 @@ Subject: Remove signin and sync integrations (win fixup) .../startup/startup_browser_creator_impl.cc | 4 +- .../profile_customization_bubble_view.cc | 1 - ...rofile_picker_signed_in_flow_controller.cc | 36 -- + .../signin/profile_customization_handler.cc | 2 + .../webui/signin/profile_customization_ui.cc | 3 +- + .../ui/webui/signin/profile_picker_handler.cc | 5 +- components/signin/public/android/BUILD.gn | 1 - .../identitymanager/IdentityManager.java | 21 +- .../identity_manager/identity_manager.cc | 472 ++---------------- .../identity_manager/identity_manager.h | 47 +- .../identity_manager_builder.cc | 3 + - 14 files changed, 43 insertions(+), 601 deletions(-) + 16 files changed, 47 insertions(+), 604 deletions(-) diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn @@ -284,6 +286,25 @@ diff --git a/chrome/browser/ui/views/profiles/profile_picker_signed_in_flow_cont } bool ProfilePickerSignedInFlowController::IsInitialized() const { +diff --git a/chrome/browser/ui/webui/signin/profile_customization_handler.cc b/chrome/browser/ui/webui/signin/profile_customization_handler.cc +--- a/chrome/browser/ui/webui/signin/profile_customization_handler.cc ++++ b/chrome/browser/ui/webui/signin/profile_customization_handler.cc +@@ -136,6 +136,7 @@ void ProfileCustomizationHandler::HandleDone(const base::Value::List& args) { + DCHECK(!profile_name.empty()); + GetProfileEntry()->SetLocalProfileName(profile_name, + /*is_default_name=*/false); ++#if BUILDFLAG(ENABLE_DICE_SUPPORT) + // Local profile is created at first as ephemeral and this is changed when + // customization is successfully completed. + const GURL& url = web_ui()->GetWebContents()->GetVisibleURL(); +@@ -146,6 +147,7 @@ void ProfileCustomizationHandler::HandleDone(const base::Value::List& args) { + GetProfileEntry()->SetIsEphemeral(false); + } + } ++#endif + + if (completion_callback_) + std::move(completion_callback_).Run(CustomizationResult::kDone); diff --git a/chrome/browser/ui/webui/signin/profile_customization_ui.cc b/chrome/browser/ui/webui/signin/profile_customization_ui.cc --- a/chrome/browser/ui/webui/signin/profile_customization_ui.cc +++ b/chrome/browser/ui/webui/signin/profile_customization_ui.cc @@ -300,6 +321,35 @@ diff --git a/chrome/browser/ui/webui/signin/profile_customization_ui.cc b/chrome if (url.query() == "debug") { // Not intended to be hooked to anything. The bubble will not initialize it // so we force it here. +diff --git a/chrome/browser/ui/webui/signin/profile_picker_handler.cc b/chrome/browser/ui/webui/signin/profile_picker_handler.cc +--- a/chrome/browser/ui/webui/signin/profile_picker_handler.cc ++++ b/chrome/browser/ui/webui/signin/profile_picker_handler.cc +@@ -943,6 +943,7 @@ void ProfilePickerHandler::HandleSelectNewAccount( + const base::Value::List& args) { + AllowJavascript(); + CHECK_EQ(1U, args.size()); ++#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(ENABLE_DICE_SUPPORT) + absl::optional profile_color = args[0].GetIfInt(); + #if BUILDFLAG(IS_CHROMEOS_LACROS) + SelectAccountLacrosInternal("", profile_color); +@@ -958,6 +959,7 @@ void ProfilePickerHandler::HandleSelectNewAccount( + #else + NOTERACHED(); + #endif ++#endif + } + + #if BUILDFLAG(IS_CHROMEOS_LACROS) +@@ -1050,9 +1052,6 @@ void ProfilePickerHandler::OnSwitchToProfileCompleteOpenCustomization( + BeginFirstWebContentsProfiling(browser, profile_picked_time_on_startup_); + } + +- browser->signin_view_controller()->ShowModalProfileCustomizationDialog( +- /*is_local_profile_creation=*/true); +- + RecordProfilePickerAction(ProfilePickerAction::kLaunchNewProfile); + ProfilePicker::Hide(); + } diff --git a/components/signin/public/android/BUILD.gn b/components/signin/public/android/BUILD.gn --- a/components/signin/public/android/BUILD.gn +++ b/components/signin/public/android/BUILD.gn diff --git a/build/patches/00Restore-Search-Ready-Omnibox-flag--win-fixup-.patch b/build/patches/00Restore-Search-Ready-Omnibox-flag--win-fixup-.patch index 243a20c3..14ba209f 100644 --- a/build/patches/00Restore-Search-Ready-Omnibox-flag--win-fixup-.patch +++ b/build/patches/00Restore-Search-Ready-Omnibox-flag--win-fixup-.patch @@ -9,7 +9,7 @@ Subject: Restore Search Ready Omnibox flag (win fixup) diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -9014,9 +9014,11 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8982,9 +8982,11 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kPervasiveSystemAccentColorDescription, kOsWin, SINGLE_VALUE_TYPE(switches::kPervasiveSystemAccentColor)}, #endif diff --git a/build/patches/00ungoogled-chr-no-special-hosts-domains--add-fixup-.patch b/build/patches/00ungoogled-chr-no-special-hosts-domains--add-fixup-.patch new file mode 100644 index 00000000..35867194 --- /dev/null +++ b/build/patches/00ungoogled-chr-no-special-hosts-domains--add-fixup-.patch @@ -0,0 +1,976 @@ +From: Your Name +Date: Wed, 19 Oct 2022 13:01:32 +0000 +Subject: ungoogled-chr no special hosts/domains (add fixup) + +--- + chrome/browser/BUILD.gn | 8 - + .../android/metrics/uma_session_stats.cc | 10 -- + chrome/browser/browser_process_impl.cc | 1 - + .../browser/chrome_content_browser_client.cc | 13 +- + chrome/browser/extensions/BUILD.gn | 1 - + .../log_sources/chrome_internal_log_source.cc | 5 - + chrome/browser/first_run/first_run.cc | 9 -- + chrome/browser/google/BUILD.gn | 2 +- + .../long_screenshots_tab_service.cc | 22 --- + .../metrics/chrome_metrics_service_client.cc | 2 +- + .../chrome_metrics_services_manager_client.cc | 5 +- + .../metrics/metrics_reporting_state.cc | 76 --------- + .../net/system_network_context_manager.cc | 1 - + .../modules/recipes/recipes_service.cc | 3 +- + .../one_google_bar_loader_impl.cc | 3 +- + .../new_tab_page/promos/promo_service.cc | 6 +- + .../page_load_metrics_initialize.cc | 2 - + ...hrome_browser_main_extra_parts_profiles.cc | 1 - + .../ui_thread_search_terms_data.cc | 4 - + chrome/browser/ui/BUILD.gn | 1 - + .../ui/webui/new_tab_page/new_tab_page_ui.cc | 5 - + .../webui/settings/reset_settings_handler.cc | 1 - + .../upgrade_detector/upgrade_detector_impl.cc | 2 +- + chrome/common/BUILD.gn | 2 - + .../url_loader_throttle_provider_impl.cc | 7 - + chrome/test/BUILD.gn | 1 - + components/google/core/common/google_util.cc | 150 +----------------- + components/google/core/common/google_util.h | 14 +- + .../search_engines/search_terms_data.cc | 4 +- + components/search_provider_logos/BUILD.gn | 2 - + .../logo_service_impl.cc | 16 +- + components/url_matcher/url_util.cc | 83 ---------- + 32 files changed, 20 insertions(+), 442 deletions(-) + +diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn +--- a/chrome/browser/BUILD.gn ++++ b/chrome/browser/BUILD.gn +@@ -1014,10 +1014,6 @@ static_library("browser") { + "page_load_metrics/observers/foreground_duration_ukm_observer.h", + "page_load_metrics/observers/formfill_page_load_metrics_observer.cc", + "page_load_metrics/observers/formfill_page_load_metrics_observer.h", +- "page_load_metrics/observers/from_gws_page_load_metrics_observer.cc", +- "page_load_metrics/observers/from_gws_page_load_metrics_observer.h", +- "page_load_metrics/observers/gws_page_load_metrics_observer.cc", +- "page_load_metrics/observers/gws_page_load_metrics_observer.h", + "page_load_metrics/observers/histogram_suffixes.cc", + "page_load_metrics/observers/histogram_suffixes.h", + "page_load_metrics/observers/https_engagement_metrics/https_engagement_page_load_metrics_observer.cc", +@@ -1923,7 +1919,6 @@ static_library("browser") { + allow_circular_includes_from = [ + "//chrome/browser/devtools", + "//chrome/browser/favicon", +- "//chrome/browser/google", + "//chrome/browser/profiling_host", + + # TODO(crbug.com/1335199): break this dep when favicon is in its own target +@@ -1942,7 +1937,6 @@ static_library("browser") { + + public_deps = [ + "//base", +- "//chrome/browser/google", + "//chrome/common", + "//chrome/common:buildflags", + "//chrome/common:constants", +@@ -7631,8 +7625,6 @@ static_library("browser") { + "supervised_user/supervised_user_constants.h", + "supervised_user/supervised_user_denylist.cc", + "supervised_user/supervised_user_denylist.h", +- "supervised_user/supervised_user_google_auth_navigation_throttle.cc", +- "supervised_user/supervised_user_google_auth_navigation_throttle.h", + "supervised_user/supervised_user_interstitial.cc", + "supervised_user/supervised_user_interstitial.h", + "supervised_user/supervised_user_metrics_service.cc", +diff --git a/chrome/browser/android/metrics/uma_session_stats.cc b/chrome/browser/android/metrics/uma_session_stats.cc +--- a/chrome/browser/android/metrics/uma_session_stats.cc ++++ b/chrome/browser/android/metrics/uma_session_stats.cc +@@ -208,16 +208,6 @@ static void JNI_UmaSessionStats_ChangeMetricsReportingConsent( + JNIEnv*, + jboolean consent) { + UpdateMetricsPrefsOnPermissionChange(consent); +- +- // This function ensures a consent file in the data directory is either +- // created, or deleted, depending on consent. Starting up metrics services +- // will ensure that the consent file contains the ClientID. The ID is passed +- // to the renderer for crash reporting when things go wrong. +- GoogleUpdateSettings::CollectStatsConsentTaskRunner()->PostTask( +- FROM_HERE, +- base::BindOnce( +- base::IgnoreResult(GoogleUpdateSettings::SetCollectStatsConsent), +- consent)); + } + + // Initialize the local consent bool variable to false. Used only for testing. +diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc +--- a/chrome/browser/browser_process_impl.cc ++++ b/chrome/browser/browser_process_impl.cc +@@ -1061,7 +1061,6 @@ BrowserProcessImpl::component_updater() { + std::make_unique(); + + std::string brand; +- google_brand::GetBrand(&brand); + component_updater_ = component_updater::ComponentUpdateServiceFactory( + component_updater::MakeChromeComponentUpdaterConfigurator( + base::CommandLine::ForCurrentProcess(), +diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc +--- a/chrome/browser/chrome_content_browser_client.cc ++++ b/chrome/browser/chrome_content_browser_client.cc +@@ -2646,7 +2646,6 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches( + switches::kForcePNaClSubzero, + #endif + switches::kForceUIDirection, +- switches::kIgnoreGooglePortNumbers, + switches::kJavaScriptHarmony, + switches::kEnableExperimentalWebAssemblyFeatures, + embedder_support::kOriginTrialDisabledFeatures, +@@ -4550,12 +4549,6 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation( + &throttles); + #endif + +-#if BUILDFLAG(ENABLE_SUPERVISED_USERS) +- MaybeAddThrottle( +- SupervisedUserGoogleAuthNavigationThrottle::MaybeCreate(handle), +- &throttles); +-#endif +- + if (auto* throttle_manager = + subresource_filter::ContentSubresourceFilterThrottleManager:: + FromNavigationHandle(*handle)) { +@@ -5051,11 +5044,11 @@ ChromeContentBrowserClient::CreateURLLoaderThrottles( + profile->GetPrefs()->GetInteger(prefs::kForceYouTubeRestrict), + profile->GetPrefs()->GetString(prefs::kAllowedDomainsForApps), + false /*-> allow_userscript, don't care */}; +- result.push_back(std::make_unique( + #if BUILDFLAG(IS_ANDROID) +- client_data_header, is_tab_large_enough, ++ if (is_tab_large_enough) { ++ // do nothing, prevents "error: variable 'is_tab_large_enough' set but not used" ++ } + #endif +- std::move(dynamic_params))); + + { + auto* factory = +diff --git a/chrome/browser/extensions/BUILD.gn b/chrome/browser/extensions/BUILD.gn +--- a/chrome/browser/extensions/BUILD.gn ++++ b/chrome/browser/extensions/BUILD.gn +@@ -786,7 +786,6 @@ static_library("extensions") { + "//chrome/browser/devtools", + "//chrome/browser/favicon", + "//chrome/browser/first_party_sets", +- "//chrome/browser/google", + "//chrome/browser/image_decoder", + "//chrome/browser/media/router", + "//chrome/browser/media/router:media_router_feature", +diff --git a/chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc b/chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc +--- a/chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc ++++ b/chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc +@@ -104,7 +104,6 @@ constexpr char kOsVersionTag[] = "OS VERSION"; + #if BUILDFLAG(IS_WIN) + constexpr char kUsbKeyboardDetected[] = "usb_keyboard_detected"; + constexpr char kIsEnrolledToDomain[] = "enrolled_to_domain"; +-constexpr char kInstallerBrandCode[] = "installer_brand_code"; + #if BUILDFLAG(GOOGLE_CHROME_BRANDING) + constexpr char kUpdateErrorCode[] = "update_error_code"; + constexpr char kUpdateHresult[] = "update_hresult"; +@@ -528,10 +527,6 @@ void ChromeInternalLogSource::PopulateEnrolledToDomain( + + void ChromeInternalLogSource::PopulateInstallerBrandCode( + SystemLogsResponse* response) { +- std::string brand; +- google_brand::GetBrand(&brand); +- response->emplace(kInstallerBrandCode, +- brand.empty() ? "Unknown brand code" : brand); + } + + void ChromeInternalLogSource::PopulateLastUpdateState( +diff --git a/chrome/browser/first_run/first_run.cc b/chrome/browser/first_run/first_run.cc +--- a/chrome/browser/first_run/first_run.cc ++++ b/chrome/browser/first_run/first_run.cc +@@ -284,15 +284,6 @@ void SetupInitialPrefsFromInstallPrefs( + + // -- Platform-specific functions -- + +-#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) && \ +- !BUILDFLAG(IS_FUCHSIA) +-bool IsOrganicFirstRun() { +- std::string brand; +- google_brand::GetBrand(&brand); +- return google_brand::IsOrganicFirstRun(brand); +-} +-#endif +- + FirstRunState DetermineFirstRunState(bool has_sentinel, + bool force_first_run, + bool no_first_run) { +diff --git a/chrome/browser/google/BUILD.gn b/chrome/browser/google/BUILD.gn +--- a/chrome/browser/google/BUILD.gn ++++ b/chrome/browser/google/BUILD.gn +@@ -5,7 +5,7 @@ + import("//build/config/chrome_build.gni") + import("//build/config/chromeos/ui_mode.gni") + +-source_set("google") { ++source_set("google_UNUSED") { + sources = [ + "google_brand.cc", + "google_brand.h", +diff --git a/chrome/browser/long_screenshots/long_screenshots_tab_service.cc b/chrome/browser/long_screenshots/long_screenshots_tab_service.cc +--- a/chrome/browser/long_screenshots/long_screenshots_tab_service.cc ++++ b/chrome/browser/long_screenshots/long_screenshots_tab_service.cc +@@ -35,13 +35,11 @@ constexpr size_t kMaxPerCaptureSizeBytes = 50 * 1000L * 1000L; // 50 MB. + // Host/regex pattern for Google AMP Cache URLs. + // See https://developers.google.com/amp/cache/overview#amp-cache-url-format + // for a definition of the format of AMP Cache URLs. +-const char kGoogleAmpCacheHost[] = "cdn.ampproject.org"; + const char kGoogleAmpCachePathPattern[] = "/[a-z]/(s/)?(.*)"; + + // Regex pattern for the path of Google AMP Viewer URLs. + const char kGoogleAmpViewerPathPattern[] = "/amp/(s/)?(.*)"; + +-const char kGoogleNewsHost[] = "news.google.com"; + const char kGoogleNewsPathPattern[] = "/articles/(.*)"; + + } // namespace +@@ -229,26 +227,6 @@ bool LongScreenshotsTabService::IsAmpUrl(const GURL& url) { + return false; + } + +- // Check for "*.cdn.ampproject.org" URLs. +- if (url.DomainIs(kGoogleAmpCacheHost) && +- re2::RE2::FullMatch(url.path(), google_amp_cache_path_regex_)) { +- return true; +- } +- +- // Check for "www.google.TLD/amp/" URLs. +- if (google_util::IsGoogleDomainUrl( +- url, google_util::DISALLOW_SUBDOMAIN, +- google_util::DISALLOW_NON_STANDARD_PORTS) && +- re2::RE2::FullMatch(url.path(), google_amp_viewer_path_regex_)) { +- return true; +- } +- +- // Check for "news.google.com/articles/*". +- if (url.DomainIs(kGoogleNewsHost) && +- re2::RE2::FullMatch(url.path(), google_news_path_regex_)) { +- return true; +- } +- + return false; + } + +diff --git a/chrome/browser/metrics/chrome_metrics_service_client.cc b/chrome/browser/metrics/chrome_metrics_service_client.cc +--- a/chrome/browser/metrics/chrome_metrics_service_client.cc ++++ b/chrome/browser/metrics/chrome_metrics_service_client.cc +@@ -571,7 +571,7 @@ ChromeMetricsServiceClient::GetNetworkTimeTracker() { + } + + bool ChromeMetricsServiceClient::GetBrand(std::string* brand_code) { +- return google_brand::GetBrand(brand_code); ++ return false; + } + + metrics::SystemProfileProto::Channel ChromeMetricsServiceClient::GetChannel() { +diff --git a/chrome/browser/metrics/chrome_metrics_services_manager_client.cc b/chrome/browser/metrics/chrome_metrics_services_manager_client.cc +--- a/chrome/browser/metrics/chrome_metrics_services_manager_client.cc ++++ b/chrome/browser/metrics/chrome_metrics_services_manager_client.cc +@@ -99,9 +99,6 @@ void PostStoreMetricsClientInfo(const metrics::ClientInfo& client_info) { + // This must happen on the same sequence as the tasks to enable/disable + // metrics reporting. Otherwise, this may run while disabling metrics + // reporting if the user quickly enables and disables metrics reporting. +- GoogleUpdateSettings::CollectStatsConsentTaskRunner()->PostTask( +- FROM_HERE, base::BindOnce(&GoogleUpdateSettings::StoreMetricsClientInfo, +- client_info)); + } + + #if BUILDFLAG(IS_ANDROID) +@@ -311,7 +308,7 @@ ChromeMetricsServicesManagerClient::GetMetricsStateManager() { + local_state_, enabled_state_provider_.get(), GetRegistryBackupKey(), + user_data_dir, startup_visibility, + base::BindRepeating(&PostStoreMetricsClientInfo), +- base::BindRepeating(&GoogleUpdateSettings::LoadMetricsClientInfo), ++ metrics::MetricsStateManager::LoadClientInfoCallback(), + client_id); + } + return metrics_state_manager_.get(); +diff --git a/chrome/browser/metrics/metrics_reporting_state.cc b/chrome/browser/metrics/metrics_reporting_state.cc +--- a/chrome/browser/metrics/metrics_reporting_state.cc ++++ b/chrome/browser/metrics/metrics_reporting_state.cc +@@ -35,71 +35,6 @@ + #include "components/policy/core/common/features.h" + #endif // BUILDFLAG(IS_ANDROID) + +-namespace { +- +-enum MetricsReportingChangeHistogramValue { +- METRICS_REPORTING_ERROR, +- METRICS_REPORTING_DISABLED, +- METRICS_REPORTING_ENABLED, +- METRICS_REPORTING_MAX +-}; +- +-void RecordMetricsReportingHistogramValue( +- MetricsReportingChangeHistogramValue value) { +- UMA_HISTOGRAM_ENUMERATION( +- "UMA.MetricsReporting.Toggle", value, METRICS_REPORTING_MAX); +-} +- +-// Tries to set metrics reporting status to |enabled| and returns whatever is +-// the result of the update. +-bool SetGoogleUpdateSettings(bool enabled) { +- GoogleUpdateSettings::SetCollectStatsConsent(enabled); +- bool updated_pref = GoogleUpdateSettings::GetCollectStatsConsent(); +- if (enabled != updated_pref) +- DVLOG(1) << "Unable to set metrics reporting status to " << enabled; +- +- return updated_pref; +-} +- +-// Does the necessary changes for MetricsReportingEnabled changes which needs +-// to be done in the main thread. +-// As arguments this function gets: +-// |to_update_pref| which indicates what the desired update should be, +-// |callback_fn| is the callback function to be called in the end, +-// |called_from| is from where the call was made, +-// |updated_pref| is the result of attempted update. +-// Update considers to be successful if |to_update_pref| and |updated_pref| are +-// the same. +-void SetMetricsReporting(bool to_update_pref, +- OnMetricsReportingCallbackType callback_fn, +- ChangeMetricsReportingStateCalledFrom called_from, +- bool updated_pref) { +- g_browser_process->local_state()->SetBoolean( +- metrics::prefs::kMetricsReportingEnabled, updated_pref); +- +-#if BUILDFLAG(IS_CHROMEOS_ASH) +- metrics::structured::NeutrinoDevicesLogWithClientId( +- g_browser_process->local_state()->GetString( +- metrics::prefs::kMetricsClientID), +- metrics::structured::NeutrinoDevicesLocation::kSetMetricsReporting); +-#endif // BUILDFLAG(IS_CHROMEOS_ASH) +- UpdateMetricsPrefsOnPermissionChange(updated_pref, called_from); +- +- // Uses the current state of whether reporting is enabled to enable services. +- g_browser_process->GetMetricsServicesManager()->UpdateUploadPermissions(true); +- +- if (to_update_pref == updated_pref) { +- RecordMetricsReportingHistogramValue(updated_pref ? +- METRICS_REPORTING_ENABLED : METRICS_REPORTING_DISABLED); +- } else { +- RecordMetricsReportingHistogramValue(METRICS_REPORTING_ERROR); +- } +- if (!callback_fn.is_null()) +- std::move(callback_fn).Run(updated_pref); +-} +- +-} // namespace +- + void ChangeMetricsReportingState( + bool enabled, + ChangeMetricsReportingStateCalledFrom called_from) { +@@ -140,11 +75,6 @@ void ChangeMetricsReportingStateWithReply( + metrics::structured::NeutrinoDevicesLocation:: + kChangeMetricsReportingStateWithReply); + #endif // BUILDFLAG(IS_CHROMEOS_ASH) +- base::PostTaskAndReplyWithResult( +- GoogleUpdateSettings::CollectStatsConsentTaskRunner(), FROM_HERE, +- base::BindOnce(&SetGoogleUpdateSettings, enabled), +- base::BindOnce(&SetMetricsReporting, enabled, std::move(callback_fn), +- called_from)); + } + + void UpdateMetricsPrefsOnPermissionChange( +@@ -215,12 +145,6 @@ void ApplyMetricsReportingPolicy() { + return; + } + #endif // BUILDFLAG(IS_ANDROID) +- +- GoogleUpdateSettings::CollectStatsConsentTaskRunner()->PostTask( +- FROM_HERE, +- base::BindOnce( +- base::IgnoreResult(&GoogleUpdateSettings::SetCollectStatsConsent), +- ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled())); + } + + bool IsMetricsReportingPolicyManaged() { +diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/browser/net/system_network_context_manager.cc +--- a/chrome/browser/net/system_network_context_manager.cc ++++ b/chrome/browser/net/system_network_context_manager.cc +@@ -704,7 +704,6 @@ void SystemNetworkContextManager::AddSSLConfigToNetworkContextParams( + void SystemNetworkContextManager::ConfigureDefaultNetworkContextParams( + network::mojom::NetworkContextParams* network_context_params) { + variations::UpdateCorsExemptHeaderForVariations(network_context_params); +- GoogleURLLoaderThrottle::UpdateCorsExemptHeader(network_context_params); + + network_context_params->enable_brotli = true; + +diff --git a/chrome/browser/new_tab_page/modules/recipes/recipes_service.cc b/chrome/browser/new_tab_page/modules/recipes/recipes_service.cc +--- a/chrome/browser/new_tab_page/modules/recipes/recipes_service.cc ++++ b/chrome/browser/new_tab_page/modules/recipes/recipes_service.cc +@@ -52,9 +52,10 @@ const char* GetExperimentGroupParam() { + } + + GURL GetApiUrl(const std::string& application_locale) { ++ if ((true)) return GURL(); + GURL google_base_url = google_util::CommandLineGoogleBaseURL(); + if (!google_base_url.is_valid()) { +- google_base_url = GURL(google_util::kGoogleHomepageURL); ++ google_base_url = GURL(); + } + auto url = net::AppendQueryParameter(google_base_url.Resolve(kPath), "hl", + application_locale); +diff --git 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 +--- 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 +@@ -313,10 +313,11 @@ bool OneGoogleBarLoaderImpl::SetAdditionalQueryParams( + } + + GURL OneGoogleBarLoaderImpl::GetApiUrl() const { ++ if ((true)) return GURL(); + GURL api_url; + GURL google_base_url = google_util::CommandLineGoogleBaseURL(); + if (!google_base_url.is_valid()) { +- google_base_url = GURL(google_util::kGoogleHomepageURL); ++ google_base_url = GURL(); + } + + api_url = google_base_url.Resolve(kNewTabOgbApiPath); +diff --git a/chrome/browser/new_tab_page/promos/promo_service.cc b/chrome/browser/new_tab_page/promos/promo_service.cc +--- a/chrome/browser/new_tab_page/promos/promo_service.cc ++++ b/chrome/browser/new_tab_page/promos/promo_service.cc +@@ -80,11 +80,7 @@ bool CanBlockPromos() { + } + + GURL GetGoogleBaseUrl() { +- GURL google_base_url = google_util::CommandLineGoogleBaseURL(); +- if (!google_base_url.is_valid()) { +- google_base_url = GURL(google_util::kGoogleHomepageURL); +- } +- return google_base_url; ++ return GURL(); + } + + GURL GetApiUrl() { +diff --git a/chrome/browser/page_load_metrics/page_load_metrics_initialize.cc b/chrome/browser/page_load_metrics/page_load_metrics_initialize.cc +--- a/chrome/browser/page_load_metrics/page_load_metrics_initialize.cc ++++ b/chrome/browser/page_load_metrics/page_load_metrics_initialize.cc +@@ -130,8 +130,6 @@ void PageLoadMetricsEmbedder::RegisterEmbedderObservers( + tracker->AddObserver(std::make_unique()); + tracker->AddObserver(std::make_unique()); + tracker->AddObserver(std::make_unique()); +- tracker->AddObserver(std::make_unique()); +- tracker->AddObserver(std::make_unique()); + tracker->AddObserver(std::make_unique()); + tracker->AddObserver( + std::make_unique()); +diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc +--- a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc ++++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc +@@ -418,7 +418,6 @@ void ChromeBrowserMainExtraPartsProfiles:: + #if !BUILDFLAG(IS_ANDROID) + GlobalErrorServiceFactory::GetInstance(); + #endif +- GoogleSearchDomainMixingMetricsEmitterFactory::GetInstance(); + HistoryServiceFactory::GetInstance(); + HistoryUiFaviconRequestHandlerFactory::GetInstance(); + HostContentSettingsMapFactory::GetInstance(); +diff --git a/chrome/browser/search_engines/ui_thread_search_terms_data.cc b/chrome/browser/search_engines/ui_thread_search_terms_data.cc +--- a/chrome/browser/search_engines/ui_thread_search_terms_data.cc ++++ b/chrome/browser/search_engines/ui_thread_search_terms_data.cc +@@ -33,10 +33,6 @@ UIThreadSearchTermsData::UIThreadSearchTermsData() { + std::string UIThreadSearchTermsData::GoogleBaseURLValue() const { + DCHECK(!BrowserThread::IsThreadInitialized(BrowserThread::UI) || + BrowserThread::CurrentlyOn(BrowserThread::UI)); +- GURL base_url(google_util::CommandLineGoogleBaseURL()); +- if (base_url.is_valid()) +- return base_url.spec(); +- + return SearchTermsData::GoogleBaseURLValue(); + } + +diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn +--- a/chrome/browser/ui/BUILD.gn ++++ b/chrome/browser/ui/BUILD.gn +@@ -404,7 +404,6 @@ static_library("ui") { + "//chrome/browser/breadcrumbs", + "//chrome/browser/devtools", + "//chrome/browser/favicon", +- "//chrome/browser/google", + "//chrome/browser/image_decoder", + "//chrome/browser/media:mojo_bindings", + "//chrome/browser/media/router:media_router_feature", +diff --git a/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc b/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc +--- a/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc ++++ b/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc +@@ -489,11 +489,6 @@ content::WebUIDataSource* CreateNewTabPageUiHtmlSource(Profile* profile) { + // chrome-untrusted://new-tab-page for other external content and resources. + // NOTE: Use caution when overriding content security policies as that cean + // lead to subtle security bugs such as https://crbug.com/1251541. +- source->OverrideContentSecurityPolicy( +- network::mojom::CSPDirectiveName::ChildSrc, +- base::StringPrintf("child-src https: %s %s;", +- google_util::CommandLineGoogleBaseURL().spec().c_str(), +- chrome::kChromeUIUntrustedNewTabPageUrl)); + + return source; + } +diff --git a/chrome/browser/ui/webui/settings/reset_settings_handler.cc b/chrome/browser/ui/webui/settings/reset_settings_handler.cc +--- a/chrome/browser/ui/webui/settings/reset_settings_handler.cc ++++ b/chrome/browser/ui/webui/settings/reset_settings_handler.cc +@@ -87,7 +87,6 @@ bool ResetSettingsHandler::ShouldShowResetProfileBanner(Profile* profile) { + + ResetSettingsHandler::ResetSettingsHandler(Profile* profile) + : profile_(profile) { +- google_brand::GetBrand(&brandcode_); + } + + ResetSettingsHandler::~ResetSettingsHandler() {} +diff --git a/chrome/browser/upgrade_detector/upgrade_detector_impl.cc b/chrome/browser/upgrade_detector/upgrade_detector_impl.cc +--- a/chrome/browser/upgrade_detector/upgrade_detector_impl.cc ++++ b/chrome/browser/upgrade_detector/upgrade_detector_impl.cc +@@ -215,7 +215,7 @@ void UpgradeDetectorImpl::StartOutdatedBuildDetector() { + // an outdated build is being simulated by command line switches. + if (!simulating_outdated_) { + std::string brand; +- if (google_brand::GetBrand(&brand) && !google_brand::IsOrganic(brand)) ++ if ((true)) + return; + + #if BUILDFLAG(IS_WIN) +diff --git a/chrome/common/BUILD.gn b/chrome/common/BUILD.gn +--- a/chrome/common/BUILD.gn ++++ b/chrome/common/BUILD.gn +@@ -133,8 +133,6 @@ static_library("common_lib") { + "content_restriction.h", + "crash_keys.cc", + "crash_keys.h", +- "google_url_loader_throttle.cc", +- "google_url_loader_throttle.h", + "logging_chrome.cc", + "logging_chrome.h", + "media/cdm_registration.cc", +diff --git a/chrome/renderer/url_loader_throttle_provider_impl.cc b/chrome/renderer/url_loader_throttle_provider_impl.cc +--- a/chrome/renderer/url_loader_throttle_provider_impl.cc ++++ b/chrome/renderer/url_loader_throttle_provider_impl.cc +@@ -178,13 +178,6 @@ URLLoaderThrottleProviderImpl::CreateThrottles( + } + #endif + +- throttles.emplace_back(std::make_unique( +-#if BUILDFLAG(IS_ANDROID) +- client_data_header, +- /* is_tab_large_enough= */ false, +-#endif +- ChromeRenderThreadObserver::GetDynamicParams())); +- + #if BUILDFLAG(IS_CHROMEOS_ASH) + throttles.emplace_back(std::make_unique( + chrome_content_renderer_client_->GetChromeObserver() +diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn +--- a/chrome/test/BUILD.gn ++++ b/chrome/test/BUILD.gn +@@ -5724,7 +5724,6 @@ test("unit_tests") { + "//chrome/browser/favicon", + "//chrome/browser/feature_guide/notifications:unit_tests", + "//chrome/browser/first_party_sets", +- "//chrome/browser/google:unit_tests", + "//chrome/browser/media/router", + "//chrome/browser/media/router:media_router_feature", + "//chrome/browser/media/router:unittests", +diff --git a/components/google/core/common/google_util.cc b/components/google/core/common/google_util.cc +--- a/components/google/core/common/google_util.cc ++++ b/components/google/core/common/google_util.cc +@@ -29,7 +29,7 @@ namespace google_util { + + // Global functions ----------------------------------------------------------- + +-const char kGoogleHomepageURL[] = "https://www.google.com/"; ++const char kGoogleHomepageURL_Checked[] = "https://www.google.com/"; + + std::string GetGoogleLocale(const std::string& application_locale) { + // Google does not recognize "nb" for Norwegian Bokmal; it uses "no". +@@ -38,8 +38,7 @@ std::string GetGoogleLocale(const std::string& application_locale) { + + GURL AppendGoogleLocaleParam(const GURL& url, + const std::string& application_locale) { +- return net::AppendQueryParameter(url, "hl", +- GetGoogleLocale(application_locale)); ++ return url; + } + + std::string GetGoogleCountryCode(const GURL& google_homepage_url) { +@@ -83,155 +82,12 @@ bool IsYoutubeDomainUrl(const GURL& url, SubdomainPermission subdomain_permissio + } + + bool IsGoogleAssociatedDomainUrl(const GURL& url) { // disabled on Bromite +- if ((true)) +- return false; +- +- // Some domains don't have international TLD extensions, so testing for them +- // is very straightforward. +- static const char* kSuffixesToSetHeadersFor[] = { +- ".android.com", +- ".doubleclick.com", +- ".doubleclick.net", +- ".ggpht.com", +- ".googleadservices.com", +- ".googleapis.com", +- ".googlesyndication.com", +- ".googleusercontent.com", +- ".googlevideo.com", +- ".gstatic.com", +- ".litepages.googlezip.net", +- ".ytimg.com", +- }; +- const std::string host = url.host(); +- for (size_t i = 0; i < std::size(kSuffixesToSetHeadersFor); ++i) { +- if (base::EndsWith(host, kSuffixesToSetHeadersFor[i], +- base::CompareCase::INSENSITIVE_ASCII)) { +- return true; +- } +- } +- +- // Exact hostnames in lowercase to set headers for. +- static const char* kHostsToSetHeadersFor[] = { +- "googleweblight.com", +- }; +- for (size_t i = 0; i < std::size(kHostsToSetHeadersFor); ++i) { +- if (base::EqualsCaseInsensitiveASCII(host, kHostsToSetHeadersFor[i])) +- return true; +- } +- + return false; + } + +-const std::vector& GetGoogleRegistrableDomains() { +- static base::NoDestructor> +- kGoogleRegisterableDomains([]() { +- std::vector domains; +- +- std::vector tlds{GOOGLE_TLD_LIST}; +- for (const std::string& tld : tlds) { +- std::string domain = "google." + tld; +- +- // The Google TLD list might contain domains that are not considered +- // to be registrable domains by net::registry_controlled_domains. +- if (GetDomainAndRegistry(domain, +- net::registry_controlled_domains:: +- INCLUDE_PRIVATE_REGISTRIES) != domain) { +- continue; +- } +- +- domains.push_back(domain); +- } +- +- return domains; +- }()); +- +- return *kGoogleRegisterableDomains; +-} +- + GURL AppendToAsyncQueryParam(const GURL& url, + const std::string& key, + const std::string& value) { +- const std::string param_name = "async"; +- const std::string key_value = key + ":" + value; +- bool replaced = false; +- const std::string input = url.query(); +- url::Component cursor(0, input.size()); +- std::string output; +- url::Component key_range, value_range; +- while (url::ExtractQueryKeyValue(input.data(), &cursor, &key_range, +- &value_range)) { +- const base::StringPiece input_key(input.data() + key_range.begin, +- key_range.len); +- std::string key_value_pair(input, key_range.begin, +- value_range.end() - key_range.begin); +- if (!replaced && input_key == param_name) { +- // Check |replaced| as only the first match should be replaced. +- replaced = true; +- key_value_pair += "," + key_value; +- } +- if (!output.empty()) { +- output += "&"; +- } +- +- output += key_value_pair; +- } +- if (!replaced) { +- if (!output.empty()) { +- output += "&"; +- } +- +- output += (param_name + "=" + key_value); +- } +- GURL::Replacements replacements; +- replacements.SetQueryStr(output); +- return url.ReplaceComponents(replacements); ++ return url; + } +- +-GoogleSearchMode GoogleSearchModeFromUrl(const GURL& url) { +- static_assert(GoogleSearchMode::kMaxValue == GoogleSearchMode::kFlights, +- "This function should be updated if new values are added to " +- "GoogleSearchMode"); +- +- base::StringPiece query_str = url.query_piece(); +- url::Component query(0, static_cast(url.query_piece().length())); +- url::Component key, value; +- GoogleSearchMode mode = GoogleSearchMode::kUnspecified; +- while (url::ExtractQueryKeyValue(query_str.data(), &query, &key, &value)) { +- base::StringPiece key_str = query_str.substr(key.begin, key.len); +- if (key_str != "tbm") { +- continue; +- } +- if (mode != GoogleSearchMode::kUnspecified) { +- // There is more than one tbm parameter, which is not expected. Return +- // kUnknown to signify the result can't be trusted. +- return GoogleSearchMode::kUnknown; +- } +- base::StringPiece value_str = query_str.substr(value.begin, value.len); +- if (value_str == "isch") { +- mode = GoogleSearchMode::kImages; +- } else if (value_str == "web") { +- mode = GoogleSearchMode::kWeb; +- } else if (value_str == "nws") { +- mode = GoogleSearchMode::kNews; +- } else if (value_str == "shop") { +- mode = GoogleSearchMode::kShopping; +- } else if (value_str == "vid") { +- mode = GoogleSearchMode::kVideos; +- } else if (value_str == "bks") { +- mode = GoogleSearchMode::kBooks; +- } else if (value_str == "flm") { +- mode = GoogleSearchMode::kFlights; +- } else if (value_str == "lcl") { +- mode = GoogleSearchMode::kLocal; +- } else { +- mode = GoogleSearchMode::kUnknown; +- } +- } +- if (mode == GoogleSearchMode::kUnspecified) { +- // No tbm query parameter means this is the Web mode. +- mode = GoogleSearchMode::kWeb; +- } +- return mode; +-} +- + } // namespace google_util +diff --git a/components/google/core/common/google_util.h b/components/google/core/common/google_util.h +--- a/components/google/core/common/google_util.h ++++ b/components/google/core/common/google_util.h +@@ -40,7 +40,7 @@ enum class GoogleSearchMode { + kMaxValue = kFlights, + }; + +-extern const char kGoogleHomepageURL[]; ++extern const char kGoogleHomepageURL_Checked[]; + + // True iff |str| contains a "q=" or "as_q=" query parameter with a non-empty + // value. |str| should be a query or a hash fragment, without the ? or # (as +@@ -133,14 +133,6 @@ bool IsYoutubeDomainUrl(const GURL& url, + // True if |url| is hosted by Google. + bool IsGoogleAssociatedDomainUrl(const GURL& url); + +-// Returns the list of all Google's registerable domains, i.e. domains named +-// google. owned by Google. +-// TODO(msramek): This is currently only used to ensure the deletion of Google +-// service workers on signout. Remove this once we have other options to do it, +-// such as service workers discovering that signin cookies are missing and +-// unregistering themselves. +-const std::vector& GetGoogleRegistrableDomains(); +- + // Appends the provided |key| and |value| pair to the "async" query param list, + // according to the format used by the Google servers: + // +@@ -154,10 +146,6 @@ GURL AppendToAsyncQueryParam(const GURL& url, + const std::string& key, + const std::string& value); + +-// Returns Google Search mode used by the user. This corresponds to the tab +-// (e.g. web result, image results, video results, etc.) the user is on. This +-// information is extracted from the "tbm" query parameter on the Search URL. +-GoogleSearchMode GoogleSearchModeFromUrl(const GURL& url); + + } // namespace google_util + +diff --git a/components/search_engines/search_terms_data.cc b/components/search_engines/search_terms_data.cc +--- a/components/search_engines/search_terms_data.cc ++++ b/components/search_engines/search_terms_data.cc +@@ -107,7 +107,7 @@ SearchTermsData::SearchTermsData() = default; + SearchTermsData::~SearchTermsData() = default; + + std::string SearchTermsData::GoogleBaseURLValue() const { +- return google_util::kGoogleHomepageURL; ++ return google_util::kGoogleHomepageURL_Checked; + } + + std::string SearchTermsData::GoogleBaseSearchByImageURLValue() const { +@@ -119,7 +119,7 @@ std::string SearchTermsData::GoogleBaseSearchByImageURLValue() const { + } + #endif // !BUILDFLAG(IS_IOS) && !BUILDFLAG(IS_ANDROID) + +- return google_util::kGoogleHomepageURL + kGoogleHomepageURLPath; ++ return google_util::kGoogleHomepageURL_Checked + kGoogleHomepageURLPath; + } + + std::string SearchTermsData::GoogleBaseSuggestURLValue() const { +diff --git a/components/search_provider_logos/BUILD.gn b/components/search_provider_logos/BUILD.gn +--- a/components/search_provider_logos/BUILD.gn ++++ b/components/search_provider_logos/BUILD.gn +@@ -6,8 +6,6 @@ static_library("search_provider_logos") { + sources = [ + "fixed_logo_api.cc", + "fixed_logo_api.h", +- "google_logo_api.cc", +- "google_logo_api.h", + "logo_cache.cc", + "logo_cache.h", + "logo_common.cc", +diff --git a/components/search_provider_logos/logo_service_impl.cc b/components/search_provider_logos/logo_service_impl.cc +--- a/components/search_provider_logos/logo_service_impl.cc ++++ b/components/search_provider_logos/logo_service_impl.cc +@@ -250,8 +250,7 @@ void LogoServiceImpl::GetLogo(LogoCallbacks callbacks, bool for_webui_ntp) { + + GURL base_url; + GURL doodle_url; +- const bool is_google = template_url->url_ref().HasGoogleBaseURLs( +- template_url_service_->search_terms_data()); ++ const bool is_google = false; + if (is_google) { + // TODO(treib): Put the Google doodle URL into prepopulated_engines.json. + base_url = +@@ -276,23 +275,12 @@ void LogoServiceImpl::GetLogo(LogoCallbacks callbacks, bool for_webui_ntp) { + clock_ = base::DefaultClock::GetInstance(); + } + +- const bool use_fixed_logo = !doodle_url.is_valid(); ++ const bool use_fixed_logo = true; + if (use_fixed_logo) { + SetServerAPI( + logo_url, + base::BindRepeating(&search_provider_logos::ParseFixedLogoResponse), + base::BindRepeating(&search_provider_logos::UseFixedLogoUrl)); +- } else { +- // We encode the type of doodle (regular or gray) in the URL so that the +- // logo cache gets cleared when that value changes. +- GURL prefilled_url = AppendPreliminaryParamsToDoodleURL( +- want_gray_logo_getter_.Run(), for_webui_ntp, doodle_url); +- SetServerAPI( +- prefilled_url, +- base::BindRepeating(&search_provider_logos::ParseDoodleLogoResponse, +- base_url), +- base::BindRepeating( +- &search_provider_logos::AppendFingerprintParamToDoodleURL)); + } + + DCHECK(!logo_url_.is_empty()); +diff --git a/components/url_matcher/url_util.cc b/components/url_matcher/url_util.cc +--- a/components/url_matcher/url_util.cc ++++ b/components/url_matcher/url_util.cc +@@ -37,30 +37,18 @@ namespace { + // Host/regex pattern for Google AMP Cache URLs. + // See https://developers.google.com/amp/cache/overview#amp-cache-url-format + // for a definition of the format of AMP Cache URLs. +-const char kGoogleAmpCacheHost[] = "cdn.ampproject.org"; + const char kGoogleAmpCachePathPattern[] = "/[a-z]/(s/)?(.*)"; + + // Regex pattern for the path of Google AMP Viewer URLs. + const char kGoogleAmpViewerPathPattern[] = "/amp/(s/)?(.*)"; + + // Host, path prefix, and query regex pattern for Google web cache URLs. +-const char kGoogleWebCacheHost[] = "webcache.googleusercontent.com"; +-const char kGoogleWebCachePathPrefix[] = "/search"; + const char kGoogleWebCacheQueryPattern[] = + "cache:(.{12}:)?(https?://)?([^ :]*)( [^:]*)?"; + +-const char kGoogleTranslateSubdomain[] = "translate."; +-const char kAlternateGoogleTranslateHost[] = "translate.googleusercontent.com"; +- + // Maximum filters allowed. Filters over this index are ignored. + const size_t kMaxFiltersAllowed = 1000; + +-// Returns a full URL using either "http" or "https" as the scheme. +-GURL BuildURL(bool is_https, const std::string& host_and_path) { +- std::string scheme = is_https ? url::kHttpsScheme : url::kHttpScheme; +- return GURL(scheme + "://" + host_and_path); +-} +- + void ProcessQueryToConditions( + url_matcher::URLMatcherConditionFactory* condition_factory, + const std::string& query, +@@ -118,77 +106,6 @@ class EmbeddedURLExtractor { + + // Implements url_filter::GetEmbeddedURL(). + GURL GetEmbeddedURL(const GURL& url) { +- // Check for "*.cdn.ampproject.org" URLs. +- if (url.DomainIs(kGoogleAmpCacheHost)) { +- std::string s; +- std::string embedded; +- if (re2::RE2::FullMatch(url.path(), google_amp_cache_path_regex_, &s, +- &embedded)) { +- if (url.has_query()) +- embedded += "?" + url.query(); +- return BuildURL(!s.empty(), embedded); +- } +- } +- +- // Check for "www.google.TLD/amp/" URLs. +- if (google_util::IsGoogleDomainUrl( +- url, google_util::DISALLOW_SUBDOMAIN, +- google_util::DISALLOW_NON_STANDARD_PORTS)) { +- std::string s; +- std::string embedded; +- if (re2::RE2::FullMatch(url.path(), google_amp_viewer_path_regex_, &s, +- &embedded)) { +- // The embedded URL may be percent-encoded. Undo that. +- embedded = base::UnescapeBinaryURLComponent(embedded); +- return BuildURL(!s.empty(), embedded); +- } +- } +- +- // Check for Google web cache URLs +- // ("webcache.googleusercontent.com/search?q=cache:..."). +- std::string query; +- if (url.host_piece() == kGoogleWebCacheHost && +- base::StartsWith(url.path_piece(), kGoogleWebCachePathPrefix) && +- net::GetValueForKeyInQuery(url, "q", &query)) { +- std::string fingerprint; +- std::string scheme; +- std::string embedded; +- if (re2::RE2::FullMatch(query, google_web_cache_query_regex_, +- &fingerprint, &scheme, &embedded)) { +- return BuildURL(scheme == "https://", embedded); +- } +- } +- +- // Check for Google translate URLs ("translate.google.TLD/...?...&u=URL" or +- // "translate.googleusercontent.com/...?...&u=URL"). +- bool is_translate = false; +- if (base::StartsWith(url.host_piece(), kGoogleTranslateSubdomain)) { +- // Remove the "translate." prefix. +- GURL::Replacements replace; +- replace.SetHostStr( +- url.host_piece().substr(strlen(kGoogleTranslateSubdomain))); +- GURL trimmed = url.ReplaceComponents(replace); +- // Check that the remainder is a Google URL. Note: IsGoogleDomainUrl +- // checks for [www.]google.TLD, but we don't want the "www.", so +- // explicitly exclude that. +- // TODO(treib,pam): Instead of excluding "www." manually, teach +- // IsGoogleDomainUrl a mode that doesn't allow it. +- is_translate = google_util::IsGoogleDomainUrl( +- trimmed, google_util::DISALLOW_SUBDOMAIN, +- google_util::DISALLOW_NON_STANDARD_PORTS) && +- !base::StartsWith(trimmed.host_piece(), "www."); +- } +- bool is_alternate_translate = +- url.host_piece() == kAlternateGoogleTranslateHost; +- if (is_translate || is_alternate_translate) { +- std::string embedded; +- if (net::GetValueForKeyInQuery(url, "u", &embedded)) { +- // The embedded URL may or may not include a scheme. Fix it if +- // necessary. +- return url_formatter::FixupURL(embedded, /*desired_tld=*/std::string()); +- } +- } +- + return GURL(); + } + +-- +2.25.1 diff --git a/build/patches/Add-AllowUserCertificates-flag.patch b/build/patches/Add-AllowUserCertificates-flag.patch index 192c1fdd..0777dec3 100644 --- a/build/patches/Add-AllowUserCertificates-flag.patch +++ b/build/patches/Add-AllowUserCertificates-flag.patch @@ -51,7 +51,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/flags/Chrom diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -3615,7 +3615,11 @@ const FeatureEntry kFeatureEntries[] = { +@@ -3595,7 +3595,11 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kExtensionsOnChromeUrlsDescription, kOsAll, SINGLE_VALUE_TYPE(extensions::switches::kExtensionsOnChromeURLs)}, #endif // ENABLE_EXTENSIONS diff --git a/build/patches/Add-IsCleartextPermitted-flag.patch b/build/patches/Add-IsCleartextPermitted-flag.patch index 96d97ac9..3f015a3e 100644 --- a/build/patches/Add-IsCleartextPermitted-flag.patch +++ b/build/patches/Add-IsCleartextPermitted-flag.patch @@ -16,7 +16,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -8886,6 +8886,10 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8866,6 +8866,10 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kRequestDesktopSiteExceptionsName, flag_descriptions::kRequestDesktopSiteExceptionsDescription, kOsAndroid, FEATURE_VALUE_TYPE(features::kRequestDesktopSiteExceptions)}, diff --git a/build/patches/Add-a-proxy-configuration-page.patch b/build/patches/Add-a-proxy-configuration-page.patch index f24d94f6..b2c56394 100644 --- a/build/patches/Add-a-proxy-configuration-page.patch +++ b/build/patches/Add-a-proxy-configuration-page.patch @@ -136,12 +136,12 @@ diff --git a/chrome/browser/net/proxy_service_factory.cc b/chrome/browser/net/pr - return std::make_unique(profile_prefs, nullptr); + // Migrate from profile_prefs to local_state_prefs + if (local_state_prefs->GetBoolean("proxy_migrated") == false) { -+ const base::Value* dict = -+ profile_prefs->GetDictionary(proxy_config::prefs::kProxy); ++ const base::Value::Dict& dict = ++ profile_prefs->GetDict(proxy_config::prefs::kProxy); + + LOG(INFO) << "CreatePrefProxyConfigTrackerOfProfile: Migration from profile to local state"; + -+ const base::Value /*ProxyConfigDictionary*/ proxy_dict(dict->Clone()); ++ const base::Value /*ProxyConfigDictionary*/ proxy_dict(dict.Clone()); + local_state_prefs->Set(proxy_config::prefs::kProxy, proxy_dict); + + local_state_prefs->SetBoolean("proxy_migrated", true); @@ -930,9 +930,9 @@ new file mode 100644 + net::ProxyConfigWithAnnotation config; + auto availability = proxy_config_service_->GetLatestProxyConfig(&config); + -+ const base::Value* dict = -+ pref_service_->GetDictionary(proxy_config::prefs::kProxy); -+ ProxyConfigDictionary proxy_dict(dict->Clone()); ++ const PrefService::Preference* const pref = ++ pref_service_->FindPreference(proxy_config::prefs::kProxy); ++ ProxyConfigDictionary proxy_dict(pref->GetValue()->Clone()); + ProxyPrefs::ProxyMode mode; + if (!proxy_dict.GetMode(&mode) || mode == ProxyPrefs::MODE_SYSTEM) { + availability = net::ProxyConfigService::CONFIG_UNSET; diff --git a/build/patches/Add-flag-for-omnibox-autocomplete-filtering.patch b/build/patches/Add-flag-for-omnibox-autocomplete-filtering.patch index 2946ff57..ee5f90e1 100644 --- a/build/patches/Add-flag-for-omnibox-autocomplete-filtering.patch +++ b/build/patches/Add-flag-for-omnibox-autocomplete-filtering.patch @@ -40,7 +40,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc const FeatureEntry::FeatureParam kAdaptiveButton_AlwaysNone[] = { {"mode", "always-none"}}; const FeatureEntry::FeatureParam kAdaptiveButton_AlwaysNewTab[] = { -@@ -4289,7 +4305,11 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4269,7 +4285,11 @@ const FeatureEntry kFeatureEntries[] = { kOsMac | kOsLinux | kOsWin, FEATURE_VALUE_TYPE(features::kSystemNotifications)}, #endif // BUILDFLAG(ENABLE_SYSTEM_NOTIFICATIONS) && !BUILDFLAG(IS_CHROMEOS_ASH) diff --git a/build/patches/Add-flag-for-save-data-header.patch b/build/patches/Add-flag-for-save-data-header.patch index 693c062d..cd50aeb9 100644 --- a/build/patches/Add-flag-for-save-data-header.patch +++ b/build/patches/Add-flag-for-save-data-header.patch @@ -15,7 +15,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -4885,7 +4885,10 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4865,7 +4865,10 @@ const FeatureEntry kFeatureEntries[] = { {"force-text-direction", flag_descriptions::kForceTextDirectionName, flag_descriptions::kForceTextDirectionDescription, kOsAll, MULTI_VALUE_TYPE(kForceTextDirectionChoices)}, diff --git a/build/patches/Add-flag-to-disable-IPv6-probes.patch b/build/patches/Add-flag-to-disable-IPv6-probes.patch index 4e259a69..1d987250 100644 --- a/build/patches/Add-flag-to-disable-IPv6-probes.patch +++ b/build/patches/Add-flag-to-disable-IPv6-probes.patch @@ -17,7 +17,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -5874,6 +5874,10 @@ const FeatureEntry kFeatureEntries[] = { +@@ -5854,6 +5854,10 @@ const FeatureEntry kFeatureEntries[] = { {"enable-reader-mode-in-cct", flag_descriptions::kReaderModeInCCTName, flag_descriptions::kReaderModeInCCTDescription, kOsAndroid, FEATURE_VALUE_TYPE(chrome::android::kReaderModeInCCT)}, diff --git a/build/patches/Add-flag-to-disable-external-intent-requests.patch b/build/patches/Add-flag-to-disable-external-intent-requests.patch index 72db28af..a231f0d4 100644 --- a/build/patches/Add-flag-to-disable-external-intent-requests.patch +++ b/build/patches/Add-flag-to-disable-external-intent-requests.patch @@ -15,7 +15,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -3542,6 +3542,9 @@ const FeatureEntry kFeatureEntries[] = { +@@ -3522,6 +3522,9 @@ const FeatureEntry kFeatureEntries[] = { {"ui-disable-partial-swap", flag_descriptions::kUiPartialSwapName, flag_descriptions::kUiPartialSwapDescription, kOsAll, SINGLE_DISABLE_VALUE_TYPE(switches::kUIDisablePartialSwap)}, diff --git a/build/patches/Add-flag-to-disable-vibration.patch b/build/patches/Add-flag-to-disable-vibration.patch index 581b3b25..72584bc1 100644 --- a/build/patches/Add-flag-to-disable-vibration.patch +++ b/build/patches/Add-flag-to-disable-vibration.patch @@ -19,7 +19,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -7267,6 +7267,10 @@ const FeatureEntry kFeatureEntries[] = { +@@ -7247,6 +7247,10 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(features::kNewMacNotificationAPI)}, #endif diff --git a/build/patches/Add-kill-switch-for-unsupported-clangd-flags.patch b/build/patches/Add-kill-switch-for-unsupported-clangd-flags.patch new file mode 100644 index 00000000..8a011ccc --- /dev/null +++ b/build/patches/Add-kill-switch-for-unsupported-clangd-flags.patch @@ -0,0 +1,43 @@ +From: Your Name +Date: Thu, 20 Oct 2022 09:34:48 +0000 +Subject: Add kill switch for unsupported clangd flags + +Allows build with clangd by suppressing unsupported parameters + +Original License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html +License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html +--- + build/config/compiler/BUILD.gn | 5 +++++ + build_overrides/build.gni | 3 +++ + 2 files changed, 8 insertions(+) + +diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn +--- a/build/config/compiler/BUILD.gn ++++ b/build/config/compiler/BUILD.gn +@@ -1554,6 +1554,11 @@ config("default_warnings") { + # TODO(https://crbug.com/1363759): Evaluate and possibly enable. + cflags += [ "-Wno-deprecated-copy-with-user-provided-copy" ] + } ++ if (skip_clangd_unsupported_options) { ++ cflags -= [ ++ "-Wno-deprecated-builtins", ++ ] ++ } + } + } + } +diff --git a/build_overrides/build.gni b/build_overrides/build.gni +--- a/build_overrides/build.gni ++++ b/build_overrides/build.gni +@@ -42,6 +42,9 @@ declare_args() { + # Allows googletest to pretty-print various absl types. Disabled for nacl due + # to lack of toolchain support. + gtest_enable_absl_printers = !is_nacl ++ ++ # Allows clangd builds by suppressing unsupported parameters ++ skip_clangd_unsupported_options = false + } + + # Allows different projects to specify their own suppression/ignore lists for +-- +2.25.1 diff --git a/build/patches/Add-lifetime-options-for-permissions.patch b/build/patches/Add-lifetime-options-for-permissions.patch index 6c4ec101..c327a4cf 100644 --- a/build/patches/Add-lifetime-options-for-permissions.patch +++ b/build/patches/Add-lifetime-options-for-permissions.patch @@ -65,9 +65,6 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html components/content_settings/android/BUILD.gn | 1 + .../core/browser/content_settings_utils.cc | 29 +++++++ .../core/browser/content_settings_utils.h | 6 ++ - .../core/browser/host_content_settings_map.cc | 2 +- - .../core/common/content_settings.cc | 7 +- - .../core/common/content_settings.h | 4 +- .../common/content_settings_constraints.h | 11 +++ .../page_info/PageInfoController.java | 4 +- .../PermissionParamsListBuilder.java | 13 ++- @@ -90,7 +87,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html components/permissions/permission_request.h | 17 +++- .../permissions/permission_request_manager.cc | 37 ++++++--- .../permissions/permission_request_manager.h | 11 ++- - 38 files changed, 481 insertions(+), 60 deletions(-) + 35 files changed, 472 insertions(+), 56 deletions(-) diff --git a/chrome/browser/permissions/last_tab_standing_tracker.cc b/chrome/browser/permissions/last_tab_standing_tracker.cc --- a/chrome/browser/permissions/last_tab_standing_tracker.cc @@ -332,7 +329,7 @@ diff --git a/components/browser_ui/site_settings/android/website_preference_brid insertionFunc(env, static_cast(content_type), list, ConvertOriginToJavaString(env, origin), jembedder, - /*is_embargoed=*/false); -+ /*is_embargoed=*/false, static_cast(settings_it.session_model)); ++ /*is_embargoed=*/false, static_cast(settings_it.metadata.session_model)); } // Add any origins which have a default content setting value (thus skipped @@ -392,13 +389,13 @@ diff --git a/components/content_settings/core/browser/content_settings_utils.cc + +bool IsConstraintSessionExpiration(const ContentSettingPatternSource& source, + LifetimeMode lifetime_mode) { -+ if (source.session_model != content_settings::SessionModel::UserSession) ++ if (source.metadata.session_model != content_settings::SessionModel::UserSession) + return false; + + LifetimeMode type; -+ if (source.expiration == base::Time()) { ++ if (source.metadata.expiration == base::Time()) { + type = LifetimeMode::UntilBrowserClosed; -+ } else if (source.expiration == (base::Time() + base::Hours(1))) { ++ } else if (source.metadata.expiration == (base::Time() + base::Hours(1))) { + type = LifetimeMode::OnlyThisTime; + } else { + type = LifetimeMode::UntilOriginClosed; @@ -426,68 +423,6 @@ diff --git a/components/content_settings/core/browser/content_settings_utils.h b // Get a timestamp with week-precision. base::Time GetCoarseTime(base::Time time); -diff --git a/components/content_settings/core/browser/host_content_settings_map.cc b/components/content_settings/core/browser/host_content_settings_map.cc ---- a/components/content_settings/core/browser/host_content_settings_map.cc -+++ b/components/content_settings/core/browser/host_content_settings_map.cc -@@ -824,7 +824,7 @@ void HostContentSettingsMap::AddSettingsForOneType( - settings->emplace_back(rule.primary_pattern, rule.secondary_pattern, - std::move(value), - kProviderNamesSourceMap[provider_type].provider_name, -- incognito, rule.metadata); -+ incognito, rule.metadata, rule.session_model); - } - } - -diff --git a/components/content_settings/core/common/content_settings.cc b/components/content_settings/core/common/content_settings.cc ---- a/components/content_settings/core/common/content_settings.cc -+++ b/components/content_settings/core/common/content_settings.cc -@@ -159,13 +159,15 @@ ContentSettingPatternSource::ContentSettingPatternSource( - base::Value setting_value, - const std::string& source, - bool incognito, -- content_settings::RuleMetaData metadata) -+ content_settings::RuleMetaData metadata, -+ content_settings::SessionModel session_model) - : primary_pattern(primary_pattern), - secondary_pattern(secondary_pattern), - setting_value(std::move(setting_value)), - metadata(metadata), - source(source), -- incognito(incognito) {} -+ incognito(incognito), -+ session_model(session_model) {} - - ContentSettingPatternSource::ContentSettingPatternSource() : incognito(false) {} - -@@ -182,6 +184,7 @@ ContentSettingPatternSource& ContentSettingPatternSource::operator=( - metadata = other.metadata; - source = other.source; - incognito = other.incognito; -+ session_model = other.session_model; - return *this; - } - -diff --git a/components/content_settings/core/common/content_settings.h b/components/content_settings/core/common/content_settings.h ---- a/components/content_settings/core/common/content_settings.h -+++ b/components/content_settings/core/common/content_settings.h -@@ -50,7 +50,8 @@ struct ContentSettingPatternSource { - base::Value setting_value, - const std::string& source, - bool incognito, -- content_settings::RuleMetaData metadata = {}); -+ content_settings::RuleMetaData metadata = {}, -+ content_settings::SessionModel session_model = content_settings::SessionModel::Durable); - ContentSettingPatternSource(const ContentSettingPatternSource& other); - ContentSettingPatternSource(); - ContentSettingPatternSource& operator=( -@@ -65,6 +66,7 @@ struct ContentSettingPatternSource { - content_settings::RuleMetaData metadata; - std::string source; - bool incognito; -+ content_settings::SessionModel session_model; - }; - - typedef std::vector ContentSettingsForOneType; diff --git a/components/content_settings/core/common/content_settings_constraints.h b/components/content_settings/core/common/content_settings_constraints.h --- a/components/content_settings/core/common/content_settings_constraints.h +++ b/components/content_settings/core/common/content_settings_constraints.h @@ -623,7 +558,7 @@ diff --git a/components/page_info/page_info.cc b/components/page_info/page_info. permission_info.is_one_time = (info.metadata.session_model == content_settings::SessionModel::OneTime); + permission_info.is_user_session = -+ (info.session_model == content_settings::SessionModel::UserSession); ++ (info.metadata.session_model == content_settings::SessionModel::UserSession); if (info.primary_pattern == ContentSettingsPattern::Wildcard() && info.secondary_pattern == ContentSettingsPattern::Wildcard()) { diff --git a/build/patches/Add-site-engagement-flag.patch b/build/patches/Add-site-engagement-flag.patch index 4d7189da..53e9ccc3 100644 --- a/build/patches/Add-site-engagement-flag.patch +++ b/build/patches/Add-site-engagement-flag.patch @@ -29,7 +29,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc #include "components/shared_highlighting/core/common/shared_highlighting_features.h" #include "components/signin/core/browser/dice_account_reconcilor_delegate.h" #include "components/signin/public/base/signin_buildflags.h" -@@ -9002,6 +9003,11 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8970,6 +8971,11 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kSearchReadyOmniboxDescription, kOsAndroid, FEATURE_VALUE_TYPE(chrome::android::kSearchReadyOmniboxFeature)}, @@ -44,7 +44,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc --- a/chrome/browser/flag_descriptions.cc +++ b/chrome/browser/flag_descriptions.cc -@@ -3334,6 +3334,11 @@ const char kSkipServiceWorkerFetchHandlerDescription[] = +@@ -3325,6 +3325,11 @@ const char kSkipServiceWorkerFetchHandlerDescription[] = "Skips starting the service worker and run the fetch handler if the fetch " "handler is recognized as skippable."; @@ -59,7 +59,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h --- a/chrome/browser/flag_descriptions.h +++ b/chrome/browser/flag_descriptions.h -@@ -1894,6 +1894,9 @@ extern const char kReduceUserAgentMinorVersionDescription[]; +@@ -1888,6 +1888,9 @@ extern const char kReduceUserAgentMinorVersionDescription[]; extern const char kReduceUserAgentPlatformOsCpuName[]; extern const char kReduceUserAgentPlatformOsCpuDescription[]; diff --git a/build/patches/Add-webGL-site-setting.patch b/build/patches/Add-webGL-site-setting.patch index 5327f45a..ce14eaa3 100644 --- a/build/patches/Add-webGL-site-setting.patch +++ b/build/patches/Add-webGL-site-setting.patch @@ -258,7 +258,7 @@ diff --git a/components/content_settings/core/browser/content_settings_utils.cc diff --git a/components/content_settings/core/common/content_settings.cc b/components/content_settings/core/common/content_settings.cc --- a/components/content_settings/core/common/content_settings.cc +++ b/components/content_settings/core/common/content_settings.cc -@@ -208,7 +208,8 @@ bool RendererContentSettingRules::IsRendererContentSetting( +@@ -205,7 +205,8 @@ bool RendererContentSettingRules::IsRendererContentSetting( content_type == ContentSettingsType::AUTOPLAY || content_type == ContentSettingsType::MIXEDSCRIPT || content_type == ContentSettingsType::AUTO_DARK_WEB_CONTENT || @@ -268,7 +268,7 @@ diff --git a/components/content_settings/core/common/content_settings.cc b/compo } void RendererContentSettingRules::FilterRulesByOutermostMainFrameURL( -@@ -220,6 +221,7 @@ void RendererContentSettingRules::FilterRulesByOutermostMainFrameURL( +@@ -217,6 +218,7 @@ void RendererContentSettingRules::FilterRulesByOutermostMainFrameURL( FilterRulesForType(auto_dark_content_rules, outermost_main_frame_url); FilterRulesForType(timezone_override_rules, outermost_main_frame_url); FilterRulesForType(autoplay_rules, outermost_main_frame_url); @@ -279,7 +279,7 @@ diff --git a/components/content_settings/core/common/content_settings.cc b/compo diff --git a/components/content_settings/core/common/content_settings.h b/components/content_settings/core/common/content_settings.h --- a/components/content_settings/core/common/content_settings.h +++ b/components/content_settings/core/common/content_settings.h -@@ -98,6 +98,7 @@ struct RendererContentSettingRules { +@@ -96,6 +96,7 @@ struct RendererContentSettingRules { ContentSettingsForOneType auto_dark_content_rules; ContentSettingsForOneType timezone_override_rules; std::string timezone_override_value; diff --git a/build/patches/Add-webRTC-site-settings.patch b/build/patches/Add-webRTC-site-settings.patch index b50f1670..8ff8ae38 100644 --- a/build/patches/Add-webRTC-site-settings.patch +++ b/build/patches/Add-webRTC-site-settings.patch @@ -254,7 +254,7 @@ diff --git a/components/content_settings/core/browser/content_settings_utils.cc diff --git a/components/content_settings/core/common/content_settings.cc b/components/content_settings/core/common/content_settings.cc --- a/components/content_settings/core/common/content_settings.cc +++ b/components/content_settings/core/common/content_settings.cc -@@ -209,7 +209,8 @@ bool RendererContentSettingRules::IsRendererContentSetting( +@@ -206,7 +206,8 @@ bool RendererContentSettingRules::IsRendererContentSetting( content_type == ContentSettingsType::MIXEDSCRIPT || content_type == ContentSettingsType::AUTO_DARK_WEB_CONTENT || content_type == ContentSettingsType::TIMEZONE_OVERRIDE || @@ -264,7 +264,7 @@ diff --git a/components/content_settings/core/common/content_settings.cc b/compo } void RendererContentSettingRules::FilterRulesByOutermostMainFrameURL( -@@ -222,6 +223,7 @@ void RendererContentSettingRules::FilterRulesByOutermostMainFrameURL( +@@ -219,6 +220,7 @@ void RendererContentSettingRules::FilterRulesByOutermostMainFrameURL( FilterRulesForType(timezone_override_rules, outermost_main_frame_url); FilterRulesForType(autoplay_rules, outermost_main_frame_url); FilterRulesForType(webgl_rules, outermost_main_frame_url); @@ -275,7 +275,7 @@ diff --git a/components/content_settings/core/common/content_settings.cc b/compo diff --git a/components/content_settings/core/common/content_settings.h b/components/content_settings/core/common/content_settings.h --- a/components/content_settings/core/common/content_settings.h +++ b/components/content_settings/core/common/content_settings.h -@@ -99,6 +99,7 @@ struct RendererContentSettingRules { +@@ -97,6 +97,7 @@ struct RendererContentSettingRules { ContentSettingsForOneType timezone_override_rules; std::string timezone_override_value; ContentSettingsForOneType webgl_rules; diff --git a/build/patches/Disable-TLS-resumption.patch b/build/patches/Disable-TLS-resumption.patch index 51b4bd85..605a6db7 100644 --- a/build/patches/Disable-TLS-resumption.patch +++ b/build/patches/Disable-TLS-resumption.patch @@ -39,7 +39,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -4920,6 +4920,12 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4900,6 +4900,12 @@ const FeatureEntry kFeatureEntries[] = { {"enable-tls13-early-data", flag_descriptions::kEnableTLS13EarlyDataName, flag_descriptions::kEnableTLS13EarlyDataDescription, kOsAll, FEATURE_VALUE_TYPE(net::features::kEnableTLS13EarlyData)}, @@ -200,7 +200,7 @@ diff --git a/net/socket/ssl_client_socket_impl.cc b/net/socket/ssl_client_socket + LOG(INFO) << "SSL Log: " + << tag + << " host: " << host_and_port_.ToString() -+ << " NIK: " << ssl_config_.network_isolation_key.ToDebugString(); ++ << " NIK: " << ssl_config_.network_anonymization_key.ToDebugString(); + return; + } + @@ -214,7 +214,7 @@ diff --git a/net/socket/ssl_client_socket_impl.cc b/net/socket/ssl_client_socket + LOG(INFO) << "SSL Log: " + << tag + << " host: " << host_and_port_.ToString() -+ << " NIK: " << ssl_config_.network_isolation_key.ToDebugString() ++ << " NIK: " << ssl_config_.network_anonymization_key.ToDebugString() + << " sessionid: " << base::HexEncode(session_id, len) + << (ticklen > 0 ? " ticket:" + base::HexEncode(ticket, ticklen) : ""); +} diff --git a/build/patches/Disable-safe-browsing.patch b/build/patches/Disable-safe-browsing.patch index c6bae50b..dfcde7d0 100644 --- a/build/patches/Disable-safe-browsing.patch +++ b/build/patches/Disable-safe-browsing.patch @@ -53,6 +53,10 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../permission_revocation_request.cc | 6 ++ ...quiet_notification_permission_ui_config.cc | 4 +- chrome/browser/prefs/browser_prefs.cc | 3 + + chrome/browser/privacy_guide/android/BUILD.gn | 1 - + .../privacy_guide/PrivacyGuideFragment.java | 3 - + .../PrivacyGuidePagerAdapter.java | 8 +- + .../privacy_guide/StepDisplayHandlerImpl.java | 2 +- ...hrome_browser_main_extra_parts_profiles.cc | 4 +- chrome/browser/profiles/profile_impl.cc | 4 +- chrome/browser/safe_browsing/BUILD.gn | 4 +- @@ -91,7 +95,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../file_system_access_permission_context.h | 6 -- weblayer/BUILD.gn | 4 - weblayer/test/BUILD.gn | 1 - - 82 files changed, 210 insertions(+), 708 deletions(-) + 86 files changed, 212 insertions(+), 720 deletions(-) diff --git a/chrome/android/java/res/xml/google_services_preferences.xml b/chrome/android/java/res/xml/google_services_preferences.xml --- a/chrome/android/java/res/xml/google_services_preferences.xml @@ -2024,6 +2028,78 @@ diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browse safe_browsing::RegisterProfilePrefs(registry); SearchPrefetchService::RegisterProfilePrefs(registry); blocked_content::SafeBrowsingTriggeredPopupBlocker::RegisterProfilePrefs( +diff --git a/chrome/browser/privacy_guide/android/BUILD.gn b/chrome/browser/privacy_guide/android/BUILD.gn +--- a/chrome/browser/privacy_guide/android/BUILD.gn ++++ b/chrome/browser/privacy_guide/android/BUILD.gn +@@ -13,7 +13,6 @@ android_library("java") { + "java/src/org/chromium/chrome/browser/privacy_guide/PrivacyGuideExplanationItem.java", + "java/src/org/chromium/chrome/browser/privacy_guide/PrivacyGuideFragment.java", + "java/src/org/chromium/chrome/browser/privacy_guide/PrivacyGuidePagerAdapter.java", +- "java/src/org/chromium/chrome/browser/privacy_guide/SafeBrowsingFragment.java", + "java/src/org/chromium/chrome/browser/privacy_guide/StepDisplayHandler.java", + "java/src/org/chromium/chrome/browser/privacy_guide/StepDisplayHandlerImpl.java", + "java/src/org/chromium/chrome/browser/privacy_guide/SyncFragment.java", +diff --git a/chrome/browser/privacy_guide/android/java/src/org/chromium/chrome/browser/privacy_guide/PrivacyGuideFragment.java b/chrome/browser/privacy_guide/android/java/src/org/chromium/chrome/browser/privacy_guide/PrivacyGuideFragment.java +--- a/chrome/browser/privacy_guide/android/java/src/org/chromium/chrome/browser/privacy_guide/PrivacyGuideFragment.java ++++ b/chrome/browser/privacy_guide/android/java/src/org/chromium/chrome/browser/privacy_guide/PrivacyGuideFragment.java +@@ -122,9 +122,6 @@ public class PrivacyGuideFragment extends Fragment { + + @Override + public void onAttachFragment(@NonNull Fragment childFragment) { +- if (childFragment instanceof SafeBrowsingFragment) { +- ((SafeBrowsingFragment) childFragment).setBottomSheetController(mBottomSheetController); +- } + } + + @Override +diff --git a/chrome/browser/privacy_guide/android/java/src/org/chromium/chrome/browser/privacy_guide/PrivacyGuidePagerAdapter.java b/chrome/browser/privacy_guide/android/java/src/org/chromium/chrome/browser/privacy_guide/PrivacyGuidePagerAdapter.java +--- a/chrome/browser/privacy_guide/android/java/src/org/chromium/chrome/browser/privacy_guide/PrivacyGuidePagerAdapter.java ++++ b/chrome/browser/privacy_guide/android/java/src/org/chromium/chrome/browser/privacy_guide/PrivacyGuidePagerAdapter.java +@@ -21,12 +21,11 @@ public class PrivacyGuidePagerAdapter extends FragmentStateAdapter { + * The types of fragments supported. Each fragment corresponds to a step in the privacy guide. + */ + @Retention(RetentionPolicy.SOURCE) +- @IntDef({FragmentType.COOKIES, FragmentType.MSBB, FragmentType.SAFE_BROWSING, ++ @IntDef({FragmentType.COOKIES, FragmentType.MSBB, + FragmentType.SYNC}) + private @interface FragmentType { + int MSBB = 0; + int SYNC = 1; +- int SAFE_BROWSING = 2; + int COOKIES = 3; + } + +@@ -39,9 +38,6 @@ public class PrivacyGuidePagerAdapter extends FragmentStateAdapter { + if (displayHandler.shouldDisplaySync()) { + mFragmentTypeList.add(FragmentType.SYNC); + } +- if (displayHandler.shouldDisplaySafeBrowsing()) { +- mFragmentTypeList.add(FragmentType.SAFE_BROWSING); +- } + if (displayHandler.shouldDisplayCookies()) { + mFragmentTypeList.add(FragmentType.COOKIES); + } +@@ -56,8 +52,6 @@ public class PrivacyGuidePagerAdapter extends FragmentStateAdapter { + return new MSBBFragment(); + case FragmentType.SYNC: + return new SyncFragment(); +- case FragmentType.SAFE_BROWSING: +- return new SafeBrowsingFragment(); + case FragmentType.COOKIES: + return new CookiesFragment(); + } +diff --git a/chrome/browser/privacy_guide/android/java/src/org/chromium/chrome/browser/privacy_guide/StepDisplayHandlerImpl.java b/chrome/browser/privacy_guide/android/java/src/org/chromium/chrome/browser/privacy_guide/StepDisplayHandlerImpl.java +--- a/chrome/browser/privacy_guide/android/java/src/org/chromium/chrome/browser/privacy_guide/StepDisplayHandlerImpl.java ++++ b/chrome/browser/privacy_guide/android/java/src/org/chromium/chrome/browser/privacy_guide/StepDisplayHandlerImpl.java +@@ -19,7 +19,7 @@ class StepDisplayHandlerImpl implements StepDisplayHandler { + + @Override + public boolean shouldDisplaySafeBrowsing() { +- return SafeBrowsingBridge.getSafeBrowsingState() != SafeBrowsingState.NO_SAFE_BROWSING; ++ return false; + } + + @Override diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc --- a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc +++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc diff --git a/build/patches/Disable-some-signed-exchange-features.patch b/build/patches/Disable-some-signed-exchange-features.patch index 90bd490d..6c910149 100644 --- a/build/patches/Disable-some-signed-exchange-features.patch +++ b/build/patches/Disable-some-signed-exchange-features.patch @@ -21,7 +21,7 @@ diff --git a/content/public/common/content_features.cc b/content/public/common/c // https://www.chromestatus.com/feature/5745285984681984 const base::Feature kSignedHTTPExchange{"SignedHTTPExchange", - base::FEATURE_ENABLED_BY_DEFAULT}; -+ base::FEATURE_ENABLED_BY_DEFAULTFEATURE_DISABLED_BY_DEFAULT; ++ base::FEATURE_DISABLED_BY_DEFAULT}; // Delays RenderProcessHost shutdown by a few seconds to allow the subframe's // process to be potentially reused. This aims to reduce process churn in diff --git a/build/patches/Disable-text-fragments-by-default.patch b/build/patches/Disable-text-fragments-by-default.patch index 335b41a2..42ab78df 100644 --- a/build/patches/Disable-text-fragments-by-default.patch +++ b/build/patches/Disable-text-fragments-by-default.patch @@ -14,14 +14,15 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html chrome/browser/ui/prefs/prefs_tab_helper.cc | 2 +- content/child/runtime_features.cc | 1 + third_party/blink/common/features.cc | 4 ++++ + third_party/blink/public/common/features.h | 1 + third_party/blink/renderer/core/dom/document.cc | 5 +++++ - .../blink/renderer/platform/runtime_enabled_features.json5 | 5 +---- - 9 files changed, 29 insertions(+), 5 deletions(-) + .../blink/renderer/platform/runtime_enabled_features.json5 | 5 ++--- + 10 files changed, 31 insertions(+), 4 deletions(-) diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -6104,6 +6104,11 @@ const FeatureEntry kFeatureEntries[] = { +@@ -6084,6 +6084,11 @@ const FeatureEntry kFeatureEntries[] = { "")}, #endif @@ -94,7 +95,7 @@ diff --git a/content/child/runtime_features.cc b/content/child/runtime_features. features::kSharedArrayBufferOnDesktop}, {wf::EnableSharedAutofill, autofill::features::kAutofillSharedAutofill}, {wf::EnableSubresourceWebBundles, features::kSubresourceWebBundles}, -+ {wf::EnableTextFragmentAnchor, blink::features::kTextFragmentAnchor}, // will set the TextFragmentIdentifiers runtime feature ++ {wf::EnableTextFragmentIdentifiers, blink::features::kTextFragmentAnchor}, {wf::EnableTouchDragAndContextMenu, features::kTouchDragAndContextMenu}, {wf::EnableUserActivationSameOriginVisibility, features::kUserActivationSameOriginVisibility}, @@ -112,6 +113,17 @@ diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/fea // File handling icons. https://crbug.com/1218213 const base::Feature kFileHandlingIcons{"FileHandlingIcons", base::FEATURE_DISABLED_BY_DEFAULT}; +diff --git a/third_party/blink/public/common/features.h b/third_party/blink/public/common/features.h +--- a/third_party/blink/public/common/features.h ++++ b/third_party/blink/public/common/features.h +@@ -224,6 +224,7 @@ BLINK_COMMON_EXPORT extern const base::Feature kResourceLoadViaDataPipe; + BLINK_COMMON_EXPORT extern const base::Feature kServiceWorkerUpdateDelay; + BLINK_COMMON_EXPORT extern const base::Feature kStopInBackground; + BLINK_COMMON_EXPORT extern const base::Feature kDropInputEventsBeforeFirstPaint; ++BLINK_COMMON_EXPORT extern const base::Feature kTextFragmentAnchor; + BLINK_COMMON_EXPORT extern const base::Feature kFileHandlingIcons; + BLINK_COMMON_EXPORT extern const base::Feature kAllowSyncXHRInPageDismissal; + BLINK_COMMON_EXPORT extern const base::Feature kPrefetchPrivacyChanges; diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink/renderer/core/dom/document.cc --- a/third_party/blink/renderer/core/dom/document.cc +++ b/third_party/blink/renderer/core/dom/document.cc @@ -133,14 +145,15 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 -@@ -2545,10 +2545,7 @@ +@@ -2545,10 +2545,9 @@ }, { name: "TextFragmentIdentifiers", - origin_trial_feature_name: "TextFragmentIdentifiers", -- public: true, + public: true, - status: "stable", - base_feature: "TextFragmentAnchor", ++ status: "test", + origin_trial_feature_name: "TextFragmentIdentifiers" }, { diff --git a/build/patches/Enable-Certificate-Transparency.patch b/build/patches/Enable-Certificate-Transparency.patch index 799d9172..e7c2cb7a 100644 --- a/build/patches/Enable-Certificate-Transparency.patch +++ b/build/patches/Enable-Certificate-Transparency.patch @@ -22,7 +22,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -8884,6 +8884,11 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8852,6 +8852,11 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kWebMidiDescription, kOsAll, FEATURE_VALUE_TYPE(features::kWebMidi)}, #if BUILDFLAG(IS_ANDROID) @@ -49,7 +49,7 @@ diff --git a/chrome/browser/browser_features.cc b/chrome/browser/browser_feature diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc --- a/chrome/browser/flag_descriptions.cc +++ b/chrome/browser/flag_descriptions.cc -@@ -6666,6 +6666,10 @@ const char kAutofillCreditCardUploadDescription[] = +@@ -6657,6 +6657,10 @@ const char kAutofillCreditCardUploadDescription[] = #endif // defined(TOOLKIT_VIEWS) || BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) @@ -63,7 +63,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h --- a/chrome/browser/flag_descriptions.h +++ b/chrome/browser/flag_descriptions.h -@@ -3857,6 +3857,9 @@ extern const char kAutofillCreditCardUploadDescription[]; +@@ -3851,6 +3851,9 @@ extern const char kAutofillCreditCardUploadDescription[]; #endif // defined(TOOLKIT_VIEWS) || BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) diff --git a/build/patches/Enable-StrictOriginIsolation-and-SitePerProcess.patch b/build/patches/Enable-StrictOriginIsolation-and-SitePerProcess.patch index 6d59eb7e..394ae6c4 100644 --- a/build/patches/Enable-StrictOriginIsolation-and-SitePerProcess.patch +++ b/build/patches/Enable-StrictOriginIsolation-and-SitePerProcess.patch @@ -18,7 +18,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -4469,9 +4469,6 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4449,9 +4449,6 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kSiteIsolationForPasswordSitesDescription, kOsAndroid, FEATURE_VALUE_TYPE( site_isolation::features::kSiteIsolationForPasswordSites)}, diff --git a/build/patches/Enable-native-Android-autofill.patch b/build/patches/Enable-native-Android-autofill.patch index 4fcb8909..27c01526 100644 --- a/build/patches/Enable-native-Android-autofill.patch +++ b/build/patches/Enable-native-Android-autofill.patch @@ -484,7 +484,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co target->autofill_manager_->OnFormSubmitted(form, known_success, submission_source); + if (target->secondary_autofill_manager_) -+ target->secondary_autofill_manager_->OnFormSubmitted(form, known_success, source); ++ target->secondary_autofill_manager_->OnFormSubmitted(form, known_success, submission_source); }); } @@ -519,10 +519,10 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co target->autofill_manager_->OnAskForValuesToFill( form, field, bounding_box, query_id, autoselect_first_suggestion, form_element_was_clicked); -+ if (starget->econdary_autofill_manager_) ++ if (target->secondary_autofill_manager_) + target->secondary_autofill_manager_->OnAskForValuesToFill(form, field, bounding_box, query_id, + autoselect_first_suggestion, -+ touch_to_fill_eligible); ++ form_element_was_clicked); }); } @@ -538,8 +538,8 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co void ContentAutofillDriver::FocusNoLongerOnFormCallback( bool had_interacted_form) { autofill_manager_->OnFocusNoLongerOnForm(had_interacted_form); -+ if (target->secondary_autofill_manager_) -+ target->secondary_autofill_manager_->OnFocusNoLongerOnForm(had_interacted_form); ++ if (secondary_autofill_manager_) ++ secondary_autofill_manager_->OnFocusNoLongerOnForm(had_interacted_form); } void ContentAutofillDriver::FocusNoLongerOnForm(bool had_interacted_form) { diff --git a/build/patches/Enable-share-intent.patch b/build/patches/Enable-share-intent.patch index c6f31472..0b3e8780 100644 --- a/build/patches/Enable-share-intent.patch +++ b/build/patches/Enable-share-intent.patch @@ -311,7 +311,7 @@ new file mode 100644 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -6596,6 +6596,10 @@ const FeatureEntry kFeatureEntries[] = { +@@ -6576,6 +6576,10 @@ const FeatureEntry kFeatureEntries[] = { #endif // BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_ANDROID) diff --git a/build/patches/Experimental-user-scripts-support.patch b/build/patches/Experimental-user-scripts-support.patch index f6c7e499..984cb1db 100644 --- a/build/patches/Experimental-user-scripts-support.patch +++ b/build/patches/Experimental-user-scripts-support.patch @@ -81,7 +81,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../user_scripts/browser/user_script_loader.h | 169 ++++ .../browser/user_script_pref_info.cc | 34 + .../browser/user_script_pref_info.h | 72 ++ - .../user_scripts/browser/user_script_prefs.cc | 278 ++++++ + .../user_scripts/browser/user_script_prefs.cc | 270 ++++++ .../user_scripts/browser/user_script_prefs.h | 62 ++ .../browser/userscripts_browser_client.cc | 78 ++ .../browser/userscripts_browser_client.h | 62 ++ @@ -113,10 +113,10 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../user_scripts/renderer/injection_host.h | 41 + .../renderer/resources/greasemonkey_api.js | 82 ++ .../user_scripts_renderer_resources.grd | 14 + - .../user_scripts/renderer/script_context.cc | 215 +++++ + .../user_scripts/renderer/script_context.cc | 191 +++++ .../user_scripts/renderer/script_context.h | 68 ++ - .../user_scripts/renderer/script_injection.cc | 309 +++++++ - .../user_scripts/renderer/script_injection.h | 155 ++++ + .../user_scripts/renderer/script_injection.cc | 294 +++++++ + .../user_scripts/renderer/script_injection.h | 156 ++++ .../renderer/script_injection_manager.cc | 417 +++++++++ .../renderer/script_injection_manager.h | 101 +++ .../user_scripts/renderer/script_injector.h | 96 +++ @@ -124,19 +124,19 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../user_scripts/renderer/scripts_run_info.h | 69 ++ .../renderer/user_script_injector.cc | 227 +++++ .../renderer/user_script_injector.h | 86 ++ - .../user_scripts/renderer/user_script_set.cc | 262 ++++++ + .../user_scripts/renderer/user_script_set.cc | 266 ++++++ .../user_scripts/renderer/user_script_set.h | 101 +++ .../renderer/user_script_set_manager.cc | 77 ++ .../renderer/user_script_set_manager.h | 61 ++ .../renderer/user_scripts_dispatcher.cc | 36 + .../renderer/user_scripts_dispatcher.h | 49 ++ .../renderer/user_scripts_renderer_client.cc | 105 +++ - .../renderer/user_scripts_renderer_client.h | 37 + + .../renderer/user_scripts_renderer_client.h | 36 + .../renderer/web_ui_injection_host.cc | 40 + .../renderer/web_ui_injection_host.h | 27 + .../strings/userscripts_strings.grdp | 54 ++ tools/gritsettings/resource_ids.spec | 6 + - 109 files changed, 9493 insertions(+), 2 deletions(-) + 109 files changed, 9450 insertions(+), 2 deletions(-) create mode 100644 components/user_scripts/README.md create mode 100755 components/user_scripts/android/BUILD.gn create mode 100644 components/user_scripts/android/java/res/layout/accept_script_item.xml @@ -346,7 +346,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc #include "components/version_info/version_info.h" #include "components/viz/common/features.h" #include "components/viz/common/switches.h" -@@ -7558,6 +7559,10 @@ const FeatureEntry kFeatureEntries[] = { +@@ -7538,6 +7539,10 @@ const FeatureEntry kFeatureEntries[] = { chromeos::features::kClipboardHistoryNudgeSessionReset)}, #endif // BUILDFLAG(IS_CHROMEOS_ASH) @@ -2948,7 +2948,7 @@ new file mode 100755 + std::string temp(line.data() + index + prefix.length(), + line.length() - index - prefix.length()); + -+ if (temp.empty() || !base::IsUnicodeWhitespace(temp[0])) ++ if (temp.empty() || !base::IsAsciiWhitespace(temp[0])) + return false; + + base::TrimWhitespaceASCII(temp, base::TRIM_ALL, value); @@ -3856,7 +3856,7 @@ diff --git a/components/user_scripts/browser/user_script_prefs.cc b/components/u new file mode 100644 --- /dev/null +++ b/components/user_scripts/browser/user_script_prefs.cc -@@ -0,0 +1,278 @@ +@@ -0,0 +1,270 @@ +/* + This file is part of Bromite. + @@ -3938,7 +3938,7 @@ new file mode 100644 + const std::string id_; +}; + -+bool GetInt64FromPref(const base::DictionaryValue* dict, ++bool GetInt64FromPref(const base::Value* dict, + const std::string& key, + int64_t* value) { + DCHECK(dict); @@ -4044,12 +4044,9 @@ new file mode 100644 + + // remove script from prefs if no more present + std::vector all_scripts_to_remove; -+ const base::DictionaryValue* dict = -+ &base::Value::AsDictionaryValue(*prefs_->GetDictionary( -+ kUserScriptsList)); -+ for (base::DictionaryValue::Iterator script_it(*dict); !script_it.IsAtEnd(); -+ script_it.Advance()) { -+ const std::string& key = script_it.key(); ++ const base::Value::Dict& dict = prefs_->GetDict(kUserScriptsList).Clone(); ++ for (const auto script_it : dict) { ++ const std::string& key = script_it.first; + + if (std::find(all_scripts.begin(), all_scripts.end(), key) == all_scripts.end()) { + all_scripts_to_remove.push_back(key); @@ -4068,14 +4065,11 @@ new file mode 100644 +std::string UserScriptsPrefs::GetScriptsInfo() { + std::string json_string; + -+ const base::Value* dict = -+ prefs_->GetDictionary(kUserScriptsList); ++ const base::Value::Dict& dict = prefs_->GetDict(kUserScriptsList); + -+ if (dict) { -+ base::JSONWriter::WriteWithOptions( -+ *dict, base::JSONWriter::OPTIONS_PRETTY_PRINT, &json_string); -+ base::TrimWhitespaceASCII(json_string, base::TRIM_ALL, &json_string); -+ } ++ base::JSONWriter::WriteWithOptions( ++ dict, base::JSONWriter::OPTIONS_PRETTY_PRINT, &json_string); ++ base::TrimWhitespaceASCII(json_string, base::TRIM_ALL, &json_string); + + return json_string; +} @@ -4086,13 +4080,11 @@ new file mode 100644 + auto scriptInfo = std::make_unique( + script_id, "", base::Time::Now(), false); + -+ const base::Value* scripts = -+ prefs_->GetDictionary(kUserScriptsList); -+ if (!scripts) ++ const base::Value::Dict& scripts = prefs_->GetDict(kUserScriptsList); ++ if (scripts.empty()) + return scriptInfo; + -+ const base::DictionaryValue* script = static_cast( -+ scripts->FindDictKey(script_id)); ++ const base::Value* script = scripts.Find(script_id); + if (!script) + return scriptInfo; + @@ -7780,7 +7772,7 @@ diff --git a/components/user_scripts/renderer/script_context.cc b/components/use new file mode 100755 --- /dev/null +++ b/components/user_scripts/renderer/script_context.cc -@@ -0,0 +1,215 @@ +@@ -0,0 +1,191 @@ +// Copyright 2014 The 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. @@ -7950,36 +7942,12 @@ new file mode 100755 + return parent_url; +} + -+using FrameToDocumentLoader = -+ base::flat_map; -+ -+FrameToDocumentLoader& FrameDocumentLoaderMap() { -+ static base::NoDestructor map; -+ return *map; -+} -+ -+blink::WebDocumentLoader* CurrentDocumentLoader( -+ const blink::WebLocalFrame* frame) { -+ auto& map = FrameDocumentLoaderMap(); -+ auto it = map.find(frame); -+ return it == map.end() ? frame->GetDocumentLoader() : it->second; -+} -+ +} // namespace + +// static +GURL ScriptContext::GetDocumentLoaderURLForFrame( + const blink::WebLocalFrame* frame) { -+ // Normally we would use frame->document().url() to determine the document's -+ // URL, but to decide whether to inject a content script, we use the URL from -+ // the data source. This "quirk" helps prevents content scripts from -+ // inadvertently adding DOM elements to the compose iframe in Gmail because -+ // the compose iframe's dataSource URL is about:blank, but the document URL -+ // changes to match the parent document after Gmail document.writes into -+ // it to create the editor. -+ // http://code.google.com/p/chromium/issues/detail?id=86742 -+ blink::WebDocumentLoader* document_loader = CurrentDocumentLoader(frame); -+ return document_loader ? GURL(document_loader->GetUrl()) : GURL(); ++ return GURL(frame->GetDocument().Url()); +} + +// static @@ -8073,7 +8041,7 @@ diff --git a/components/user_scripts/renderer/script_injection.cc b/components/u new file mode 100755 --- /dev/null +++ b/components/user_scripts/renderer/script_injection.cc -@@ -0,0 +1,309 @@ +@@ -0,0 +1,294 @@ +// Copyright 2014 The 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. @@ -8325,30 +8293,15 @@ new file mode 100755 + base::BindOnce(&ScriptInjection::OnJsInjectionCompleted, + weak_ptr_factory_.GetWeakPtr()), + blink::BackForwardCacheAware::kPossiblyDisallow, -+ blink::mojom::PromiseResultOption::kDoNotWait); ++ blink::mojom::WantResultOption::kNoResult, blink::mojom::PromiseResultOption::kDoNotWait); + } + +void ScriptInjection::OnJsInjectionCompleted( -+ const blink::WebVector>& results, ++ absl::optional results, + base::TimeTicks start_time) { + DCHECK(!did_inject_js_); + -+ bool expects_results = injector_->ExpectsResults(); -+ if (expects_results) { -+ if (!results.empty() && !results[0].IsEmpty()) { -+ // Right now, we only support returning single results (per frame). -+ // It's safe to always use the main world context when converting -+ // here. V8ValueConverterImpl shouldn't actually care about the -+ // context scope, and it switches to v8::Object's creation context -+ // when encountered. -+ v8::Local context = -+ render_frame_->GetWebFrame()->MainWorldScriptContext(); -+ execution_result_ = -+ content::V8ValueConverter::Create()->FromV8Value(results[0], context); -+ } -+ if (!execution_result_.get()) -+ execution_result_ = std::make_unique(); -+ } ++ execution_result_ = std::move(results); + did_inject_js_ = true; + + // If |async_completion_callback_| is set, it means the script finished @@ -8387,7 +8340,7 @@ diff --git a/components/user_scripts/renderer/script_injection.h b/components/us new file mode 100755 --- /dev/null +++ b/components/user_scripts/renderer/script_injection.h -@@ -0,0 +1,155 @@ +@@ -0,0 +1,156 @@ +// Copyright 2014 The 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. @@ -8402,6 +8355,7 @@ new file mode 100755 + +#include "base/callback.h" +#include "base/memory/weak_ptr.h" ++#include "base/values.h" +#include "../common/user_script.h" +#include "injection_host.h" +#include "script_injector.h" @@ -8478,7 +8432,7 @@ new file mode 100755 + + // Called when JS injection for the given frame has been completed or + // cancelled. -+ void OnJsInjectionCompleted(const blink::WebVector>& results, ++ void OnJsInjectionCompleted(absl::optional results, + base::TimeTicks start_time); + + private: @@ -8529,7 +8483,7 @@ new file mode 100755 + bool log_activity_; + + // Results storage. -+ std::unique_ptr execution_result_; ++ absl::optional execution_result_; + + // The callback to run upon completing asynchronously. + CompletionCallback async_completion_callback_; @@ -9158,7 +9112,7 @@ new file mode 100755 + // |render_frame| contains the render frame, or null if the frame was + // invalidated. + virtual void OnInjectionComplete( -+ std::unique_ptr execution_result, ++ absl::optional execution_result, + UserScript::RunLocation run_location, + content::RenderFrame* render_frame) = 0; + @@ -9505,7 +9459,7 @@ new file mode 100755 +} + +void UserScriptInjector::OnInjectionComplete( -+ std::unique_ptr execution_result, ++ absl::optional execution_result, + UserScript::RunLocation run_location, + content::RenderFrame* render_frame) {} + @@ -9578,7 +9532,7 @@ new file mode 100755 + UserScript::RunLocation run_location, + std::set* injected_stylesheets, + size_t* num_injected_stylesheets) const override; -+ void OnInjectionComplete(std::unique_ptr execution_result, ++ void OnInjectionComplete(absl::optional execution_result, + UserScript::RunLocation run_location, + content::RenderFrame* render_frame) override; + void OnWillNotInject(InjectFailureReason reason, @@ -9609,7 +9563,7 @@ diff --git a/components/user_scripts/renderer/user_script_set.cc b/components/us new file mode 100755 --- /dev/null +++ b/components/user_scripts/renderer/user_script_set.cc -@@ -0,0 +1,262 @@ +@@ -0,0 +1,266 @@ +// Copyright 2014 The 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. @@ -9830,6 +9784,14 @@ new file mode 100755 + +blink::WebString UserScriptSet::GetJsSource(const UserScript::File& file, + bool emulate_greasemonkey) { ++ if (base::FeatureList::IsEnabled(features::kEnableLoggingUserScripts)) { ++ if (emulate_greasemonkey) { ++ LOG(INFO) << "UserScripts: Injecting w/greasemonkey " << file.url(); ++ } else { ++ LOG(INFO) << "UserScripts: Injecting " << file.url(); ++ } ++ } ++ + const GURL& url = file.url(); + auto iter = script_sources_.find(url); + if (iter != script_sources_.end()) { @@ -9845,13 +9807,9 @@ new file mode 100755 + std::string content = + base::StrCat({kUserScriptHead, script_content, kUserScriptTail}); + source = blink::WebString::FromUTF8(content); -+ if (base::FeatureList::IsEnabled(features::kEnableLoggingUserScripts)) -+ LOG(INFO) << "UserScripts: Injecting w/greasemonkey " << file.url(); + } else { + source = blink::WebString::FromUTF8(script_content.data(), + script_content.length()); -+ if (base::FeatureList::IsEnabled(features::kEnableLoggingUserScripts)) -+ LOG(INFO) << "UserScripts: Injecting " << file.url(); + } + script_sources_[url] = source; + return source; @@ -10292,15 +10250,15 @@ new file mode 100755 + enabled_ = params.allow_userscript; + if (!enabled_) return; + -+ if (loaded_ == false) { -+ loaded_ = true; ++ ExtensionFrameHelper* frame_helper = ExtensionFrameHelper::Get(render_frame); ++ if (!frame_helper) { + new user_scripts::ExtensionFrameHelper(render_frame); + dispatcher_->OnRenderFrameCreated(render_frame); + } +} + +void UserScriptsRendererClient::RunScriptsAtDocumentStart(content::RenderFrame* render_frame) { -+ if (!enabled_ || !loaded_) return; ++ if (!enabled_) return; + + ExtensionFrameHelper* frame_helper = ExtensionFrameHelper::Get(render_frame); + if (!frame_helper) @@ -10311,7 +10269,7 @@ new file mode 100755 +} + +void UserScriptsRendererClient::RunScriptsAtDocumentEnd(content::RenderFrame* render_frame) { -+ if (!enabled_ || !loaded_) return; ++ if (!enabled_) return; + + ExtensionFrameHelper* frame_helper = ExtensionFrameHelper::Get(render_frame); + if (!frame_helper) @@ -10322,7 +10280,7 @@ new file mode 100755 +} + +void UserScriptsRendererClient::RunScriptsAtDocumentIdle(content::RenderFrame* render_frame) { -+ if (!enabled_ || !loaded_) return; ++ if (!enabled_) return; + + ExtensionFrameHelper* frame_helper = ExtensionFrameHelper::Get(render_frame); + if (!frame_helper) @@ -10333,12 +10291,11 @@ new file mode 100755 +} + +} -\ No newline at end of file diff --git a/components/user_scripts/renderer/user_scripts_renderer_client.h b/components/user_scripts/renderer/user_scripts_renderer_client.h new file mode 100755 --- /dev/null +++ b/components/user_scripts/renderer/user_scripts_renderer_client.h -@@ -0,0 +1,37 @@ +@@ -0,0 +1,36 @@ +#ifndef USERSCRIPTS_RENDER_CLIENT_H_ +#define USERSCRIPTS_RENDER_CLIENT_H_ + @@ -10370,7 +10327,6 @@ new file mode 100755 + private: + std::unique_ptr dispatcher_; + bool enabled_ = false; -+ bool loaded_ = false; +}; + +} diff --git a/build/patches/Improve-plain-text-rendering-on-mobile.patch b/build/patches/Improve-plain-text-rendering-on-mobile.patch index c01da4ac..c55fbcf5 100644 --- a/build/patches/Improve-plain-text-rendering-on-mobile.patch +++ b/build/patches/Improve-plain-text-rendering-on-mobile.patch @@ -19,7 +19,7 @@ diff --git a/third_party/blink/renderer/core/html/parser/text_document_parser.cc + attributes.push_back(Attribute(html_names::kContentAttr, + "width=device-width, initial-scale=1.0, maximum-scale=1.0")); + AtomicHTMLToken viewport_meta(HTMLToken::kStartTag, -+ html_names::kMetaTag.LocalName(), attributes); ++ html_names::HTMLTag::kMeta, attributes); + TreeBuilder()->ConstructTree(&viewport_meta); + attributes.clear(); + diff --git a/build/patches/Move-navigation-bar-to-bottom.patch b/build/patches/Move-navigation-bar-to-bottom.patch index 1bc35c7f..6b208d81 100644 --- a/build/patches/Move-navigation-bar-to-bottom.patch +++ b/build/patches/Move-navigation-bar-to-bottom.patch @@ -1434,7 +1434,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ui/BottomContai diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -7226,6 +7226,11 @@ const FeatureEntry kFeatureEntries[] = { +@@ -7206,6 +7206,11 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kWindowsScrollingPersonalityDescription, kOsAll, FEATURE_VALUE_TYPE(features::kWindowsScrollingPersonality)}, diff --git a/build/patches/Partition-DNS-requests-by-top-frame-NIK.patch b/build/patches/Partition-DNS-requests-by-top-frame-NIK.patch deleted file mode 100644 index 95926461..00000000 --- a/build/patches/Partition-DNS-requests-by-top-frame-NIK.patch +++ /dev/null @@ -1,489 +0,0 @@ -From: uazo -Date: Wed, 23 Mar 2022 08:37:47 +0000 -Subject: Partition DNS requests by top-frame NIK - -Chromium does not provide isolation of DOH requests (see related issue). -This would easily allow DoH servers to reconstruct user navigation by device, -especially if TLS Resumption is enabled. -The patch fixes the problem by associating the DoH request to the top frame NIK, -but in any case separating it with an additional layer because it is marked as a DNS -request (IsDns in the NetworkIsolationKey). -The patch adds two new flags: -* kSplitDnsByNetworkIsolationKey, active by default -* kLogSplitDnsByNetworkIsolationKey which allows check functionality (via a "DNS:" filter in logcat) - -Once the split is active the number of open connections to the DoH server will increase -(which can be detected with apps like PCAPdroid) but the overhead seems manageable for -any type of upstream DoH server. - -See also: -* https://bugs.chromium.org/p/chromium/issues/detail?id=1082311 -* https://github.com/bromite/bromite/pull/1974 - -Original License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html -License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html ---- - chrome/browser/about_flags.cc | 12 ++++++++++++ - chrome/browser/flag_descriptions.cc | 9 +++++++++ - chrome/browser/flag_descriptions.h | 6 ++++++ - net/base/features.cc | 6 ++++++ - net/base/features.h | 6 ++++++ - net/base/isolation_info.cc | 24 +++++++++++++++++++++++- - net/base/isolation_info.h | 7 +++++++ - net/base/isolation_info.proto | 4 +++- - net/base/network_isolation_key.cc | 16 ++++++++++++++++ - net/base/network_isolation_key.h | 19 +++++++++++++++---- - net/dns/dns_transaction.cc | 23 +++++++++++++++++++---- - net/dns/dns_transaction.h | 4 +++- - net/dns/host_resolver_manager.cc | 20 ++++++++++++++++---- - net/socket/ssl_client_socket_impl.cc | 6 ++++++ - 14 files changed, 147 insertions(+), 15 deletions(-) - -diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc ---- a/chrome/browser/about_flags.cc -+++ b/chrome/browser/about_flags.cc -@@ -8270,6 +8270,18 @@ const FeatureEntry kFeatureEntries[] = { - kOsWin | kOsLinux | kOsLacros | kOsMac | kOsFuchsia, - FEATURE_VALUE_TYPE(kSigninInterceptBubbleV2)}, - #endif -+ {"dns-request-partitioning", -+ flag_descriptions::kSplitDnsByNetworkIsolationKeyName, -+ flag_descriptions::kSplitDnsByNetworkIsolationKeyDescription, -+ kOsWin | kOsLinux | kOsMac | kOsCrOS | kOsAndroid | kOsFuchsia, -+ FEATURE_VALUE_TYPE(net::features::kSplitDnsByNetworkIsolationKey)}, -+ -+ {"dns-request-partitioning-log", -+ flag_descriptions::kLogSplitDnsByNetworkIsolationKeyName, -+ flag_descriptions::kLogSplitDnsByNetworkIsolationKeyDescription, -+ kOsWin | kOsLinux | kOsMac | kOsCrOS | kOsAndroid | kOsFuchsia, -+ FEATURE_VALUE_TYPE(net::features::kLogSplitDnsByNetworkIsolationKey)}, -+ - {"http-cache-partitioning", - flag_descriptions::kSplitCacheByNetworkIsolationKeyName, - flag_descriptions::kSplitCacheByNetworkIsolationKeyDescription, -diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc ---- a/chrome/browser/flag_descriptions.cc -+++ b/chrome/browser/flag_descriptions.cc -@@ -2712,6 +2712,15 @@ const char kSmoothScrollingName[] = "Smooth Scrolling"; - const char kSmoothScrollingDescription[] = - "Animate smoothly when scrolling page content."; - -+const char kSplitDnsByNetworkIsolationKeyName[] = "DNS Requests Partitioning"; -+const char kSplitDnsByNetworkIsolationKeyDescription[] = -+ "Partition DNS requests by (top-level site) to " -+ "disallow DoH cross-site tracking."; -+ -+const char kLogSplitDnsByNetworkIsolationKeyName[] = "DNS Requests Partitioning logging"; -+const char kLogSplitDnsByNetworkIsolationKeyDescription[] = -+ "Log DNS requests and their effective partitioning"; -+ - const char kSplitCacheByNetworkIsolationKeyName[] = "HTTP Cache Partitioning"; - const char kSplitCacheByNetworkIsolationKeyDescription[] = - "Partitions the HTTP Cache by (top-level site, current-frame site) to " -diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h ---- a/chrome/browser/flag_descriptions.h -+++ b/chrome/browser/flag_descriptions.h -@@ -1531,6 +1531,12 @@ extern const char kSiteIsolationOptOutChoiceOptOut[]; - extern const char kSmoothScrollingName[]; - extern const char kSmoothScrollingDescription[]; - -+extern const char kSplitDnsByNetworkIsolationKeyName[]; -+extern const char kSplitDnsByNetworkIsolationKeyDescription[]; -+ -+extern const char kLogSplitDnsByNetworkIsolationKeyName[]; -+extern const char kLogSplitDnsByNetworkIsolationKeyDescription[]; -+ - extern const char kSplitCacheByNetworkIsolationKeyName[]; - extern const char kSplitCacheByNetworkIsolationKeyDescription[]; - -diff --git a/net/base/features.cc b/net/base/features.cc ---- a/net/base/features.cc -+++ b/net/base/features.cc -@@ -125,6 +125,12 @@ const base::Feature kIsCleartextPermitted{"IsCleartextPermitted", - const base::Feature kNetworkQualityEstimator{"NetworkQualityEstimator", - base::FEATURE_DISABLED_BY_DEFAULT}; - -+const base::Feature kSplitDnsByNetworkIsolationKey{"SplitDnsByNetworkIsolationKey", -+ base::FEATURE_ENABLED_BY_DEFAULT}; -+ -+const base::Feature kLogSplitDnsByNetworkIsolationKey{"LogSplitDnsByNetworkIsolationKey", -+ base::FEATURE_DISABLED_BY_DEFAULT}; -+ - const base::Feature kSplitCacheByIncludeCredentials{ - "SplitCacheByIncludeCredentials", base::FEATURE_DISABLED_BY_DEFAULT}; - -diff --git a/net/base/features.h b/net/base/features.h ---- a/net/base/features.h -+++ b/net/base/features.h -@@ -184,6 +184,12 @@ NET_EXPORT extern const base::Feature kEncryptedClientHello; - // quality estimator (NQE). - NET_EXPORT extern const base::Feature kNetworkQualityEstimator; - -+// Splits dns requests by the request's NetworkIsolationKey. -+NET_EXPORT extern const base::Feature kSplitDnsByNetworkIsolationKey; -+ -+// Log dns requests by request -+NET_EXPORT extern const base::Feature kLogSplitDnsByNetworkIsolationKey; -+ - // Splits cache entries by the request's includeCredentials. - NET_EXPORT extern const base::Feature kSplitCacheByIncludeCredentials; - -diff --git a/net/base/isolation_info.cc b/net/base/isolation_info.cc ---- a/net/base/isolation_info.cc -+++ b/net/base/isolation_info.cc -@@ -126,6 +126,23 @@ IsolationInfo IsolationInfo::CreateTransient() { - absl::nullopt /* party_context */); - } - -+IsolationInfo IsolationInfo::CreateTransientForDNS() { -+ IsolationInfo info = CreateTransient(); -+ info.network_isolation_key_ = -+ NetworkIsolationKey::CreateForDNS(info.network_isolation_key_); -+ info.is_dns_ = true; -+ return info; -+} -+ -+IsolationInfo IsolationInfo::CreateTransientForDNS( -+ const net::NetworkIsolationKey network_isolation_key) { -+ IsolationInfo info = CreateTransient(); -+ info.network_isolation_key_ = -+ NetworkIsolationKey::CreateForDNS(network_isolation_key); -+ info.is_dns_ = true; -+ return info; -+} -+ - absl::optional IsolationInfo::Deserialize( - const std::string& serialized) { - proto::IsolationInfo proto; -@@ -148,11 +165,14 @@ absl::optional IsolationInfo::Deserialize( - } - } - -- return IsolationInfo::CreateIfConsistent( -+ absl::optional info = IsolationInfo::CreateIfConsistent( - static_cast(proto.request_type()), - std::move(top_frame_origin), std::move(frame_origin), - SiteForCookies::FromUrl(GURL(proto.site_for_cookies())), - std::move(party_context), nullptr); -+ if (info && proto.has_is_for_dns()) -+ info->is_dns_ = proto.is_for_dns(); -+ return info; - } - - IsolationInfo IsolationInfo::CreateDoubleKey( -@@ -335,6 +355,8 @@ std::string IsolationInfo::Serialize() const { - } - } - -+ info.set_is_for_dns(is_dns_); -+ - return info.SerializeAsString(); - } - -diff --git a/net/base/isolation_info.h b/net/base/isolation_info.h ---- a/net/base/isolation_info.h -+++ b/net/base/isolation_info.h -@@ -236,6 +236,10 @@ class NET_EXPORT IsolationInfo { - // means both `frame_site_` and `top_frame_site_` are populated. - static bool IsFrameSiteEnabled(); - -+ static IsolationInfo CreateTransientForDNS(); -+ static IsolationInfo CreateTransientForDNS(net::NetworkIsolationKey network_isolation_key); -+ bool IsDns() { return is_dns_; } -+ - private: - IsolationInfo(RequestType request_type, - const absl::optional& top_frame_origin, -@@ -280,6 +284,9 @@ class NET_EXPORT IsolationInfo { - // excluded to make it easier to update on subframe redirects. - absl::optional> party_context_; - -+ // Mark isolation info for use in dns requests -+ bool is_dns_ = false; -+ - // Mojo serialization code needs to access internal party_context_ field. - friend struct mojo::StructTraits; -diff --git a/net/base/isolation_info.proto b/net/base/isolation_info.proto ---- a/net/base/isolation_info.proto -+++ b/net/base/isolation_info.proto -@@ -16,4 +16,6 @@ message IsolationInfo { - - message PartyContext { repeated string site = 1; } - optional PartyContext party_context = 5; --} -\ No newline at end of file -+ -+ optional bool is_for_dns = 6; -+} -diff --git a/net/base/network_isolation_key.cc b/net/base/network_isolation_key.cc ---- a/net/base/network_isolation_key.cc -+++ b/net/base/network_isolation_key.cc -@@ -65,6 +65,18 @@ NetworkIsolationKey& NetworkIsolationKey::operator=( - NetworkIsolationKey& NetworkIsolationKey::operator=( - NetworkIsolationKey&& network_isolation_key) = default; - -+/* static */ -+NetworkIsolationKey NetworkIsolationKey::CreateForDNS( -+ const NetworkIsolationKey& network_isolation_key) { -+ SchemefulSite top_frame_site; -+ if(network_isolation_key.top_frame_site_.has_value()) -+ top_frame_site = SchemefulSite(network_isolation_key.top_frame_site_.value()); -+ NetworkIsolationKey key(top_frame_site, top_frame_site); -+ key.nonce_ = network_isolation_key.nonce_; -+ key.is_dns_ = true; -+ return key; -+} -+ - NetworkIsolationKey NetworkIsolationKey::CreateTransient() { - SchemefulSite site_with_opaque_origin; - return NetworkIsolationKey(site_with_opaque_origin, site_with_opaque_origin); -@@ -99,6 +111,10 @@ std::string NetworkIsolationKey::ToDebugString() const { - return_string += " (with nonce " + nonce_->ToString() + ")"; - } - -+ if (is_dns_) { -+ return_string += " (dns)"; -+ } -+ - return return_string; - } - -diff --git a/net/base/network_isolation_key.h b/net/base/network_isolation_key.h ---- a/net/base/network_isolation_key.h -+++ b/net/base/network_isolation_key.h -@@ -79,8 +79,8 @@ class NET_EXPORT NetworkIsolationKey { - - // Compare keys for equality, true if all enabled fields are equal. - bool operator==(const NetworkIsolationKey& other) const { -- return std::tie(top_frame_site_, frame_site_, nonce_) == -- std::tie(other.top_frame_site_, other.frame_site_, other.nonce_); -+ return std::tie(top_frame_site_, frame_site_, nonce_, is_dns_) == -+ std::tie(other.top_frame_site_, other.frame_site_, other.nonce_, other.is_dns_); - } - - // Compare keys for inequality, true if any enabled field varies. -@@ -90,8 +90,8 @@ class NET_EXPORT NetworkIsolationKey { - - // Provide an ordering for keys based on all enabled fields. - bool operator<(const NetworkIsolationKey& other) const { -- return std::tie(top_frame_site_, frame_site_, nonce_) < -- std::tie(other.top_frame_site_, other.frame_site_, other.nonce_); -+ return std::tie(top_frame_site_, frame_site_, nonce_, is_dns_) < -+ std::tie(other.top_frame_site_, other.frame_site_, other.nonce_, other.is_dns_); - } - - // Returns the string representation of the key for use in string-keyed disk -@@ -153,6 +153,15 @@ class NET_EXPORT NetworkIsolationKey { - const base::Value& value, - NetworkIsolationKey* out_network_isolation_key); - -+ // Create a network isolation key for the dns subsystem -+ // only with top_frame_site of source, so subframes -+ // will use the same dns connection of the top frame -+ // different top frames will use different nik -+ static NetworkIsolationKey CreateForDNS(const NetworkIsolationKey& network_isolation_key); -+ -+ // Returns true if the nik is created for dns requests -+ bool IsDns() const { return is_dns_; } -+ - private: - // Whether this key has opaque origins or a nonce. - bool IsOpaque() const; -@@ -162,6 +171,8 @@ class NET_EXPORT NetworkIsolationKey { - static absl::optional SerializeSiteWithNonce( - const SchemefulSite& site); - -+ bool is_dns_ = false; -+ - // The origin/etld+1 of the top frame of the page making the request. - absl::optional top_frame_site_; - -diff --git a/net/dns/dns_transaction.cc b/net/dns/dns_transaction.cc ---- a/net/dns/dns_transaction.cc -+++ b/net/dns/dns_transaction.cc -@@ -38,6 +38,7 @@ - #include "net/base/backoff_entry.h" - #include "net/base/completion_once_callback.h" - #include "net/base/elements_upload_data_stream.h" -+#include "net/base/features.h" - #include "net/base/idempotency.h" - #include "net/base/io_buffer.h" - #include "net/base/ip_address.h" -@@ -448,6 +449,12 @@ class DnsHTTPAttempt : public DnsAttempt, public URLRequest::Delegate { - LOAD_MINIMAL_HEADERS | LOAD_BYPASS_PROXY); - request_->set_allow_credentials(false); - request_->set_isolation_info(isolation_info); -+ if (base::FeatureList::IsEnabled(net::features::kLogSplitDnsByNetworkIsolationKey)) { -+ LOG(INFO) << "DNS: Request " -+ << DnsDomainToString(query_->qname()).value_or("") -+ << " nik: " -+ << isolation_info.network_isolation_key().ToDebugString(); -+ } - } - - DnsHTTPAttempt(const DnsHTTPAttempt&) = delete; -@@ -1013,6 +1020,8 @@ class DnsOverHttpsProbeRunner : public DnsProbeRunner { - session_.get(), doh_server_index, formatted_probe_hostname_, - dns_protocol::kTypeA, nullptr /* opt_rdata */, - &probe_stats->probe_attempts, context_->url_request_context(), -+ base::FeatureList::IsEnabled(net::features::kSplitDnsByNetworkIsolationKey) ? -+ IsolationInfo::CreateTransientForDNS() : - context_->isolation_info(), RequestPriority::DEFAULT_PRIORITY); - - DnsAttempt* probe_attempt = probe_stats->probe_attempts.back().get(); -@@ -1105,7 +1114,8 @@ class DnsTransactionImpl : public DnsTransaction, - bool secure, - SecureDnsMode secure_dns_mode, - ResolveContext* resolve_context, -- bool fast_timeout) -+ bool fast_timeout, -+ const NetworkIsolationKey& network_isolation_key) - : session_(session), - hostname_(std::move(hostname)), - qtype_(qtype), -@@ -1114,7 +1124,8 @@ class DnsTransactionImpl : public DnsTransaction, - secure_dns_mode_(secure_dns_mode), - fast_timeout_(fast_timeout), - net_log_(net_log), -- resolve_context_(resolve_context->AsSafeRef()) { -+ resolve_context_(resolve_context->AsSafeRef()), -+ network_isolation_key_(network_isolation_key) { - DCHECK(session_.get()); - DCHECK(!hostname_.empty()); - DCHECK(!IsIPLiteral(hostname_)); -@@ -1354,6 +1365,8 @@ class DnsTransactionImpl : public DnsTransaction, - ConstructDnsHTTPAttempt( - session_.get(), doh_server_index, qnames_.front(), qtype_, opt_rdata_, - &attempts_, resolve_context_->url_request_context(), -+ base::FeatureList::IsEnabled(net::features::kSplitDnsByNetworkIsolationKey) ? -+ IsolationInfo::CreateTransientForDNS(network_isolation_key_) : - resolve_context_->isolation_info(), request_priority_); - ++attempts_count_; - int rv = attempts_.back()->Start(base::BindOnce( -@@ -1687,6 +1700,8 @@ class DnsTransactionImpl : public DnsTransaction, - base::SafeRef resolve_context_; - RequestPriority request_priority_ = DEFAULT_PRIORITY; - -+ const NetworkIsolationKey& network_isolation_key_; -+ - THREAD_CHECKER(thread_checker_); - }; - -@@ -1707,10 +1722,10 @@ class DnsTransactionFactoryImpl : public DnsTransactionFactory { - bool secure, - SecureDnsMode secure_dns_mode, - ResolveContext* resolve_context, -- bool fast_timeout) override { -+ bool fast_timeout, const NetworkIsolationKey& network_isolation_key) override { - return std::make_unique( - session_.get(), std::move(hostname), qtype, net_log, opt_rdata_.get(), -- secure, secure_dns_mode, resolve_context, fast_timeout); -+ secure, secure_dns_mode, resolve_context, fast_timeout, network_isolation_key); - } - - std::unique_ptr CreateDohProbeRunner( -diff --git a/net/dns/dns_transaction.h b/net/dns/dns_transaction.h ---- a/net/dns/dns_transaction.h -+++ b/net/dns/dns_transaction.h -@@ -16,6 +16,7 @@ - #include "base/time/time.h" - #include "net/base/request_priority.h" - #include "net/dns/opt_record_rdata.h" -+#include "net/base/network_isolation_key.h" - #include "net/dns/public/secure_dns_mode.h" - #include "net/dns/record_rdata.h" - #include "third_party/abseil-cpp/absl/types/optional.h" -@@ -116,7 +117,8 @@ class NET_EXPORT_PRIVATE DnsTransactionFactory { - bool secure, - SecureDnsMode secure_dns_mode, - ResolveContext* resolve_context, -- bool fast_timeout) = 0; -+ bool fast_timeout, -+ const NetworkIsolationKey& network_isolation_key) = 0; - - // Creates a runner to run the DoH probe sequence for all configured DoH - // resolvers. -diff --git a/net/dns/host_resolver_manager.cc b/net/dns/host_resolver_manager.cc ---- a/net/dns/host_resolver_manager.cc -+++ b/net/dns/host_resolver_manager.cc -@@ -1243,7 +1243,8 @@ class HostResolverManager::DnsTask : public base::SupportsWeakPtr { - const NetLogWithSource& job_net_log, - const base::TickClock* tick_clock, - bool fallback_available, -- const HostResolver::HttpsSvcbOptions& https_svcb_options) -+ const HostResolver::HttpsSvcbOptions& https_svcb_options, -+ const NetworkIsolationKey& network_isolation_key) - : client_(client), - host_(std::move(host)), - resolve_context_(resolve_context->AsSafeRef()), -@@ -1254,7 +1255,8 @@ class HostResolverManager::DnsTask : public base::SupportsWeakPtr { - tick_clock_(tick_clock), - task_start_time_(tick_clock_->NowTicks()), - fallback_available_(fallback_available), -- https_svcb_options_(https_svcb_options) { -+ https_svcb_options_(https_svcb_options), -+ network_isolation_key_(network_isolation_key) { - DCHECK(client_); - DCHECK(delegate_); - -@@ -1473,7 +1475,8 @@ class HostResolverManager::DnsTask : public base::SupportsWeakPtr { - std::move(transaction_hostname), - DnsQueryTypeToQtype(transaction_info.type), net_log_, secure_, - secure_dns_mode_, &*resolve_context_, -- fallback_available_ /* fast_timeout */); -+ fallback_available_ /* fast_timeout */, -+ network_isolation_key_); - transaction_info.transaction->SetRequestPriority(delegate_->priority()); - - auto transaction_info_it = -@@ -2076,6 +2079,8 @@ class HostResolverManager::DnsTask : public base::SupportsWeakPtr { - bool fallback_available_; - - const HostResolver::HttpsSvcbOptions https_svcb_options_; -+ -+ const NetworkIsolationKey network_isolation_key_; - }; - - //----------------------------------------------------------------------------- -@@ -2658,7 +2663,7 @@ class HostResolverManager::Job : public PrioritizedDispatcher::Job, - resolver_->dns_client_.get(), key_.host, key_.query_types, - &*key_.resolve_context, secure, key_.secure_dns_mode, this, net_log_, - tick_clock_, !tasks_.empty() /* fallback_available */, -- https_svcb_options_); -+ https_svcb_options_, key_.network_isolation_key); - dns_task_->StartNextTransaction(); - // Schedule a second transaction, if needed. DoH queries can bypass the - // dispatcher and start all of their transactions immediately. -@@ -2945,6 +2950,13 @@ class HostResolverManager::Job : public PrioritizedDispatcher::Job, - net_log_.EndEventWithNetErrorCode( - NetLogEventType::HOST_RESOLVER_MANAGER_JOB, results.error()); - -+ if (base::FeatureList::IsEnabled(net::features::kLogSplitDnsByNetworkIsolationKey)) { -+ LOG(INFO) << "DNS: CompleteRequests " -+ << GetHostname(key_.host) -+ << " key=" -+ << key_.network_isolation_key.ToDebugString(); -+ } -+ - // Handle all caching before completing requests as completing requests may - // start new requests that rely on cached results. - if (allow_cache) -diff --git a/net/socket/ssl_client_socket_impl.cc b/net/socket/ssl_client_socket_impl.cc ---- a/net/socket/ssl_client_socket_impl.cc -+++ b/net/socket/ssl_client_socket_impl.cc -@@ -393,6 +393,12 @@ SSLClientSocketImpl::SSLClientSocketImpl( - } - - void SSLClientSocketImpl::Log_ssl_session_data(const std::string& tag, SSL_SESSION* session) { -+ if (base::FeatureList::IsEnabled(net::features::kLogSplitDnsByNetworkIsolationKey) && -+ ssl_config_.network_isolation_key.IsDns()) { -+ LOG(INFO) << "DNS: Disconnected " -+ << host_and_port_.ToString() << " " -+ << ssl_config_.network_isolation_key.ToDebugString(); -+ } - if (session == NULL) { - LOG(INFO) << "SSL Log: " - << tag --- -2.25.1 diff --git a/build/patches/Re-introduce-modal-dialog-flag-to-close-all-tabs.patch b/build/patches/Re-introduce-modal-dialog-flag-to-close-all-tabs.patch index c7cc6413..3cf8cc66 100644 --- a/build/patches/Re-introduce-modal-dialog-flag-to-close-all-tabs.patch +++ b/build/patches/Re-introduce-modal-dialog-flag-to-close-all-tabs.patch @@ -132,7 +132,7 @@ diff --git a/chrome/android/features/tab_ui/junit/src/org/chromium/chrome/browse diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -9064,6 +9064,13 @@ const FeatureEntry kFeatureEntries[] = { +@@ -9032,6 +9032,13 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(features::kWaylandScreenCoordinatesEnabled)}, #endif @@ -149,7 +149,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc --- a/chrome/browser/flag_descriptions.cc +++ b/chrome/browser/flag_descriptions.cc -@@ -3534,6 +3534,11 @@ const char kEnableCbdSignOutDescription[] = +@@ -3525,6 +3525,11 @@ const char kEnableCbdSignOutDescription[] = "Enable additional affordance to sign out when clearing browsing data and " "ensure consistent behavior for all signed-in users."; diff --git a/build/patches/Remove-contextual-search-manager.patch b/build/patches/Remove-contextual-search-manager.patch index 75692c09..ebbfc2a0 100644 --- a/build/patches/Remove-contextual-search-manager.patch +++ b/build/patches/Remove-contextual-search-manager.patch @@ -24,7 +24,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../bottombar/OverlayPanelContent.java | 1 - .../compositor/layouts/LayoutManagerImpl.java | 4 +- .../customtabs/BaseCustomTabActivity.java | 2 +- - .../BaseCustomTabRootUiCoordinator.java | 5 +- + .../BaseCustomTabRootUiCoordinator.java | 8 +- .../browser/customtabs/CustomTabActivity.java | 6 -- .../modaldialog/ChromeTabModalPresenter.java | 12 +-- .../modaldialog/TabModalLifetimeHandler.java | 7 +- @@ -33,14 +33,14 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../tabbed_mode/TabbedRootUiCoordinator.java | 5 +- .../chrome/browser/ui/RootUiCoordinator.java | 27 +----- chrome/browser/BUILD.gn | 17 ---- - chrome/browser/about_flags.cc | 28 ------ + chrome/browser/about_flags.cc | 48 ---------- .../flags/android/chrome_feature_list.cc | 1 - ...nfiguration_policy_handler_list_factory.cc | 6 +- .../strings/android_chrome_strings.grd | 59 ------------- content/browser/browser_interface_binders.cc | 1 - third_party/blink/public/mojom/BUILD.gn | 2 +- third_party/blink/public/public_features.gni | 2 +- - 36 files changed, 17 insertions(+), 556 deletions(-) + 36 files changed, 17 insertions(+), 579 deletions(-) delete mode 100644 chrome/android/java/res/layout/contextual_search_caption_view.xml delete mode 100644 chrome/android/java/res/layout/contextual_search_card_icon_view.xml delete mode 100644 chrome/android/java/res/layout/contextual_search_context_view.xml @@ -731,6 +731,16 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/Base new OneshotSupplierImpl<>(), new OneshotSupplierImpl<>(), new OneshotSupplierImpl<>(), new OneshotSupplierImpl<>(), () -> null, browserControlsManager, windowAndroid, new DummyJankTracker(), +@@ -207,9 +206,6 @@ public class BaseCustomTabRootUiCoordinator extends RootUiCoordinator { + public void didFirstVisuallyNonEmptyPaint(Tab tab) { + BaseCustomTabActivity baseActivity = (BaseCustomTabActivity) mActivity; + assert baseActivity != null; +- baseActivity.getContextualSearchManagerSupplier() +- .get() +- .setCanHideAndroidBrowserControls(false); + } + }); + } diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java @@ -1075,7 +1085,34 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -3611,34 +3611,6 @@ const FeatureEntry kFeatureEntries[] = { +@@ -1902,26 +1902,6 @@ const FeatureEntry::FeatureVariation kRelatedSearchesAlternateUxVariations[] = { + nullptr}, + }; + +-const FeatureEntry::FeatureParam kContextualSearchSuppressShortViewWith300Dp[] = +- {{"contextual_search_minimum_page_height_dp", "300"}}; +-const FeatureEntry::FeatureParam kContextualSearchSuppressShortViewWith400Dp[] = +- {{"contextual_search_minimum_page_height_dp", "400"}}; +-const FeatureEntry::FeatureParam kContextualSearchSuppressShortViewWith500Dp[] = +- {{"contextual_search_minimum_page_height_dp", "500"}}; +-const FeatureEntry::FeatureParam kContextualSearchSuppressShortViewWith600Dp[] = +- {{"contextual_search_minimum_page_height_dp", "600"}}; +-const FeatureEntry::FeatureVariation +- kContextualSearchSuppressShortViewVariations[] = { +- {"(300 dp)", kContextualSearchSuppressShortViewWith300Dp, +- std::size(kContextualSearchSuppressShortViewWith300Dp), nullptr}, +- {"(400 dp)", kContextualSearchSuppressShortViewWith400Dp, +- std::size(kContextualSearchSuppressShortViewWith400Dp), nullptr}, +- {"(500 dp)", kContextualSearchSuppressShortViewWith500Dp, +- std::size(kContextualSearchSuppressShortViewWith500Dp), nullptr}, +- {"(600 dp)", kContextualSearchSuppressShortViewWith600Dp, +- std::size(kContextualSearchSuppressShortViewWith600Dp), nullptr}, +-}; +- + #endif // BUILDFLAG(IS_ANDROID) + + const FeatureEntry::FeatureParam kResamplingInputEventsLSQEnabled[] = { +@@ -3611,34 +3591,6 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kEnableOskResizesVisualViewportName, flag_descriptions::kEnableOskResizesVisualViewportDescription, kOsAndroid, FEATURE_VALUE_TYPE(chrome::android::kOSKResizesVisualViewport)}, diff --git a/build/patches/Remove-price-shopping-commerce-integrations.patch b/build/patches/Remove-price-shopping-commerce-integrations.patch index 3f9768e9..aee5e860 100644 --- a/build/patches/Remove-price-shopping-commerce-integrations.patch +++ b/build/patches/Remove-price-shopping-commerce-integrations.patch @@ -28,7 +28,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../bookmarks/BookmarkItemsAdapter.java | 23 --- .../browser/bookmarks/BookmarkManager.java | 11 -- .../BookmarkSaveFlowCoordinator.java | 37 +--- - .../bookmarks/BookmarkSaveFlowMediator.java | 45 +---- + .../bookmarks/BookmarkSaveFlowMediator.java | 68 +------ .../browser/bookmarks/BookmarkUtils.java | 12 +- .../init/ProcessInitializationHandler.java | 5 - .../chrome/browser/tab/TabHelpers.java | 9 - @@ -43,7 +43,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../CommerceSubscriptionsService.java | 36 +--- .../SubscriptionsManagerImpl.java | 26 +-- chrome/browser/persisted_state_db/BUILD.gn | 1 - - 39 files changed, 22 insertions(+), 953 deletions(-) + 39 files changed, 23 insertions(+), 975 deletions(-) diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn --- a/chrome/android/BUILD.gn @@ -1581,6 +1581,15 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm import org.chromium.components.bookmarks.BookmarkId; import org.chromium.components.feature_engagement.EventConstants; import org.chromium.components.power_bookmarks.PowerBookmarkMeta; +@@ -30,7 +27,7 @@ import java.util.List; + + /** Controls the bookmarks save-flow. */ + public class BookmarkSaveFlowMediator +- extends BookmarkModelObserver implements SubscriptionsManager.SubscriptionObserver { ++ extends BookmarkModelObserver { + private final Context mContext; + private final Runnable mCloseRunnable; + @@ -40,9 +37,6 @@ public class BookmarkSaveFlowMediator private BookmarkId mBookmarkId; private PowerBookmarkMeta mPowerBookmarkMeta; @@ -1591,7 +1600,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm private String mFolderName; /** -@@ -51,19 +45,15 @@ public class BookmarkSaveFlowMediator +@@ -51,22 +45,15 @@ public class BookmarkSaveFlowMediator * model. * @param context The {@link Context} associated with this mediator. * @param closeRunnable A {@link Runnable} which closes the bookmark save flow. @@ -1609,10 +1618,13 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm mCloseRunnable = closeRunnable; - - mSubscriptionsManager = subscriptionsManager; - if (mSubscriptionsManager != null) { - mSubscriptionsManager.addObserver(this); - } -@@ -101,9 +91,6 @@ public class BookmarkSaveFlowMediator +- if (mSubscriptionsManager != null) { +- mSubscriptionsManager.addObserver(this); +- } + } + + /** +@@ -101,9 +88,6 @@ public class BookmarkSaveFlowMediator mCloseRunnable.run(); }); @@ -1622,7 +1634,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm bindBookmarkProperties(mBookmarkId, mPowerBookmarkMeta, mWasBookmarkMoved); bindPowerBookmarkProperties(mBookmarkId, mPowerBookmarkMeta, fromExplicitTrackUi); } -@@ -129,39 +116,9 @@ public class BookmarkSaveFlowMediator +@@ -129,39 +113,9 @@ public class BookmarkSaveFlowMediator private void bindPowerBookmarkProperties( BookmarkId bookmarkId, @Nullable PowerBookmarkMeta meta, boolean fromExplicitTrackUi) { if (meta == null) return; @@ -1662,6 +1674,43 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm } void setPriceTrackingNotificationUiEnabled(boolean enabled) { +@@ -180,9 +134,6 @@ public class BookmarkSaveFlowMediator + + void destroy() { + mBookmarkModel.removeObserver(this); +- if (mSubscriptionsManager != null) { +- mSubscriptionsManager.removeObserver(this); +- } + + mBookmarkModel = null; + mPropertyModel = null; +@@ -203,10 +154,6 @@ public class BookmarkSaveFlowMediator + this::handleNotificationSwitchToggle); + } + +- void setSubscriptionForTesting(CommerceSubscription subscription) { +- mSubscription = subscription; +- } +- + // BookmarkModelObserver implementation + + @Override +@@ -218,15 +165,4 @@ public class BookmarkSaveFlowMediator + } + bindBookmarkProperties(mBookmarkId, mPowerBookmarkMeta, mWasBookmarkMoved); + } +- +- // SubscriptionsManager.SubscriptionObserver implementation +- @Override +- public void onSubscribe(List subscriptions) { +- setPriceTrackingToggleVisualsOnly(subscriptions.contains(mSubscription)); +- } +- +- @Override +- public void onUnsubscribe(List subscriptions) { +- setPriceTrackingToggleVisualsOnly(!subscriptions.contains(mSubscription)); +- } + } diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkUtils.java --- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkUtils.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkUtils.java diff --git a/build/patches/Remove-signin-and-sync-integrations.patch b/build/patches/Remove-signin-and-sync-integrations.patch index 483e8f57..79f35674 100644 --- a/build/patches/Remove-signin-and-sync-integrations.patch +++ b/build/patches/Remove-signin-and-sync-integrations.patch @@ -84,6 +84,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../browser/firstrun/MobileFreProgress.java | 4 +- .../router/discovery/access_code/BUILD.gn | 1 - .../browser/password_manager/android/BUILD.gn | 4 - + ...sswordManagerErrorMessageHelperBridge.java | 13 - .../PasswordManagerHelper.java | 121 +-------- ...swordSyncControllerDelegateBridgeImpl.java | 7 - chrome/browser/privacy/BUILD.gn | 1 - @@ -119,7 +120,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../ProfileOAuth2TokenServiceDelegate.java | 52 ---- .../net/HttpNegotiateAuthenticator.java | 88 +------ .../chromoting/base/OAuthTokenFetcher.java | 2 - - 100 files changed, 91 insertions(+), 2542 deletions(-) + 101 files changed, 91 insertions(+), 2555 deletions(-) diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn --- a/chrome/android/BUILD.gn @@ -3576,6 +3577,35 @@ diff --git a/chrome/browser/password_manager/android/BUILD.gn b/chrome/browser/p "//chrome/test/android:chrome_java_unit_test_support", "//components/browser_ui/settings/android:java", "//components/password_manager/core/browser:password_manager_java_enums", +diff --git a/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerErrorMessageHelperBridge.java b/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerErrorMessageHelperBridge.java +--- a/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerErrorMessageHelperBridge.java ++++ b/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerErrorMessageHelperBridge.java +@@ -16,7 +16,6 @@ import org.chromium.chrome.browser.preferences.ChromePreferenceKeys; + import org.chromium.chrome.browser.preferences.Pref; + import org.chromium.chrome.browser.preferences.SharedPreferencesManager; + import org.chromium.chrome.browser.profiles.Profile; +-import org.chromium.chrome.browser.signin.services.IdentityServicesProvider; + import org.chromium.components.prefs.PrefService; + import org.chromium.components.signin.AccountManagerFacadeProvider; + import org.chromium.components.signin.base.CoreAccountInfo; +@@ -81,17 +80,5 @@ public class PasswordManagerErrorMessageHelperBridge { + */ + @CalledByNative + static void startUpdateAccountCredentialsFlow(WindowAndroid windowAndroid) { +- Profile profile = Profile.getLastUsedRegularProfile(); +- final CoreAccountInfo primaryAccountInfo = +- IdentityServicesProvider.get().getIdentityManager(profile).getPrimaryAccountInfo( +- ConsentLevel.SIGNIN); +- // It's not possible to call updateCredentials without an account. +- assert primaryAccountInfo != null; +- final Activity activity = windowAndroid.getActivity().get(); +- AccountManagerFacadeProvider.getInstance().updateCredentials( +- CoreAccountInfo.getAndroidAccountFrom(primaryAccountInfo), activity, (success) -> { +- RecordHistogram.recordBooleanHistogram( +- "PasswordManager.UPMUpdateSignInCredentialsSucces", success); +- }); + } + } diff --git a/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerHelper.java b/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerHelper.java --- a/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerHelper.java +++ b/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerHelper.java diff --git a/build/patches/Restore-Search-Ready-Omnibox-flag.patch b/build/patches/Restore-Search-Ready-Omnibox-flag.patch index 4e55443b..6b6bb8c1 100644 --- a/build/patches/Restore-Search-Ready-Omnibox-flag.patch +++ b/build/patches/Restore-Search-Ready-Omnibox-flag.patch @@ -22,7 +22,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -8894,6 +8894,9 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8874,6 +8874,9 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kPervasiveSystemAccentColorDescription, kOsWin, SINGLE_VALUE_TYPE(switches::kPervasiveSystemAccentColor)}, #endif diff --git a/build/patches/Restore-Simplified-NTP-launch.patch b/build/patches/Restore-Simplified-NTP-launch.patch index 8df02747..764aa94b 100644 --- a/build/patches/Restore-Simplified-NTP-launch.patch +++ b/build/patches/Restore-Simplified-NTP-launch.patch @@ -317,7 +317,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/Sug diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -4851,6 +4851,9 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4831,6 +4831,9 @@ const FeatureEntry kFeatureEntries[] = { SINGLE_VALUE_TYPE_AND_VALUE( switches::kForceShowUpdateMenuItemCustomSummary, "Custom Summary")}, diff --git a/build/patches/Restore-offline-indicator-v2-flag.patch b/build/patches/Restore-offline-indicator-v2-flag.patch index d956e37d..fed82615 100644 --- a/build/patches/Restore-offline-indicator-v2-flag.patch +++ b/build/patches/Restore-offline-indicator-v2-flag.patch @@ -128,7 +128,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/Tab diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -4779,6 +4779,9 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4759,6 +4759,9 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kOfflinePagesLivePageSharingName, flag_descriptions::kOfflinePagesLivePageSharingDescription, kOsAndroid, FEATURE_VALUE_TYPE(offline_pages::kOfflinePagesLivePageSharingFeature)}, diff --git a/build/patches/Revert-Delete-block-external-form-redirects.patch b/build/patches/Revert-Delete-block-external-form-redirects.patch index b0a9594d..bb27f38b 100644 --- a/build/patches/Revert-Delete-block-external-form-redirects.patch +++ b/build/patches/Revert-Delete-block-external-form-redirects.patch @@ -28,7 +28,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc #include "components/translate/content/android/translate_message.h" #else // BUILDFLAG(IS_ANDROID) #include "chrome/browser/media/router/discovery/access_code/access_code_cast_sink_service.h" -@@ -7397,6 +7398,12 @@ const FeatureEntry kFeatureEntries[] = { +@@ -7377,6 +7378,12 @@ const FeatureEntry kFeatureEntries[] = { #endif // BUILDFLAG(ENABLE_PAINT_PREVIEW) && BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_ANDROID) @@ -162,7 +162,7 @@ diff --git a/components/external_intents/android/java/src/org/chromium/component + // not break the world. + if (isRedirectFromFormSubmit && !incomingIntentRedirect && !params.hasUserGesture() + && blockExternalFormRedirectsWithoutGesture()) { -+ if (DEBUG) { ++ if (debug()) { + Log.i(TAG, + "Incoming form intent attempting to redirect without " + + "user gesture"); diff --git a/build/patches/Revert-flags-remove-disable-pull-to-refresh-effect.patch b/build/patches/Revert-flags-remove-disable-pull-to-refresh-effect.patch index 89cbb4e9..21eea9d9 100644 --- a/build/patches/Revert-flags-remove-disable-pull-to-refresh-effect.patch +++ b/build/patches/Revert-flags-remove-disable-pull-to-refresh-effect.patch @@ -16,7 +16,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -4248,6 +4248,10 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4228,6 +4228,10 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kEnableVulkanDescription, kOsWin | kOsLinux | kOsAndroid, FEATURE_VALUE_TYPE(features::kVulkan)}, #if BUILDFLAG(IS_ANDROID) diff --git a/build/patches/Revert-flags-remove-num-raster-threads.patch b/build/patches/Revert-flags-remove-num-raster-threads.patch index 848cb840..7e7d8a9e 100644 --- a/build/patches/Revert-flags-remove-num-raster-threads.patch +++ b/build/patches/Revert-flags-remove-num-raster-threads.patch @@ -31,7 +31,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc const FeatureEntry::Choice kTouchTextSelectionStrategyChoices[] = { {flags_ui::kGenericExperimentChoiceDefault, "", ""}, {flag_descriptions::kTouchSelectionStrategyCharacter, -@@ -4468,6 +4477,9 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4448,6 +4457,9 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(mojo::core::kMojoLinuxChannelSharedMem)}, #endif #if BUILDFLAG(IS_ANDROID) diff --git a/build/patches/Revert-removal-of-execution-context-address-space.patch b/build/patches/Revert-removal-of-execution-context-address-space.patch index cd3a46a6..a0fdbb5f 100644 --- a/build/patches/Revert-removal-of-execution-context-address-space.patch +++ b/build/patches/Revert-removal-of-execution-context-address-space.patch @@ -67,7 +67,7 @@ diff --git a/content/browser/renderer_host/policy_container_host.cc b/content/br PolicyContainerPolicies::ToMojoPolicyContainerPolicies() const { return blink::mojom::PolicyContainerPolicies::New( - cross_origin_embedder_policy.value, referrer_policy, -+ cross_origin_embedder_policy.value, referrer_policy, policies_.ip_address_space, ++ cross_origin_embedder_policy.value, referrer_policy, ip_address_space, mojo::Clone(content_security_policies), is_anonymous, sandbox_flags); } diff --git a/build/patches/Timezone-customization.patch b/build/patches/Timezone-customization.patch index 59c3b428..7c9b0d1f 100644 --- a/build/patches/Timezone-customization.patch +++ b/build/patches/Timezone-customization.patch @@ -301,7 +301,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c */ public static int getSiteSummary(@ContentSettingValues @Nullable Integer value, @ContentSettingsType int contentSettingsType) { -+ if (contentType == ContentSettingsType.TIMEZONE_OVERRIDE) ++ if (contentSettingsType == ContentSettingsType.TIMEZONE_OVERRIDE) + return getCategorySummary(contentSettingsType, value); + switch (value) { diff --git a/build/patches/Viewport-Protection.patch b/build/patches/Viewport-Protection.patch index 52c75f24..df8d00f9 100644 --- a/build/patches/Viewport-Protection.patch +++ b/build/patches/Viewport-Protection.patch @@ -266,7 +266,7 @@ diff --git a/components/content_settings/core/browser/content_settings_utils.cc diff --git a/components/content_settings/core/common/content_settings.cc b/components/content_settings/core/common/content_settings.cc --- a/components/content_settings/core/common/content_settings.cc +++ b/components/content_settings/core/common/content_settings.cc -@@ -210,7 +210,8 @@ bool RendererContentSettingRules::IsRendererContentSetting( +@@ -207,7 +207,8 @@ bool RendererContentSettingRules::IsRendererContentSetting( content_type == ContentSettingsType::AUTO_DARK_WEB_CONTENT || content_type == ContentSettingsType::TIMEZONE_OVERRIDE || content_type == ContentSettingsType::WEBGL || @@ -276,7 +276,7 @@ diff --git a/components/content_settings/core/common/content_settings.cc b/compo } void RendererContentSettingRules::FilterRulesByOutermostMainFrameURL( -@@ -224,6 +225,7 @@ void RendererContentSettingRules::FilterRulesByOutermostMainFrameURL( +@@ -221,6 +222,7 @@ void RendererContentSettingRules::FilterRulesByOutermostMainFrameURL( FilterRulesForType(autoplay_rules, outermost_main_frame_url); FilterRulesForType(webgl_rules, outermost_main_frame_url); FilterRulesForType(webrtc_rules, outermost_main_frame_url); @@ -287,7 +287,7 @@ diff --git a/components/content_settings/core/common/content_settings.cc b/compo diff --git a/components/content_settings/core/common/content_settings.h b/components/content_settings/core/common/content_settings.h --- a/components/content_settings/core/common/content_settings.h +++ b/components/content_settings/core/common/content_settings.h -@@ -100,6 +100,7 @@ struct RendererContentSettingRules { +@@ -98,6 +98,7 @@ struct RendererContentSettingRules { std::string timezone_override_value; ContentSettingsForOneType webgl_rules; ContentSettingsForOneType webrtc_rules; diff --git a/build/patches/Welcome-screen.patch b/build/patches/Welcome-screen.patch index e4c39960..f8ce88da 100644 --- a/build/patches/Welcome-screen.patch +++ b/build/patches/Welcome-screen.patch @@ -8,13 +8,13 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- .../android/java/res/layout/fre_tosanduma.xml | 4 +- .../firstrun/ChildAccountStatusSupplier.java | 14 +- - .../browser/firstrun/FirstRunActivity.java | 40 +---- + .../browser/firstrun/FirstRunActivity.java | 42 +---- .../firstrun/FirstRunActivityBase.java | 11 +- .../firstrun/FirstRunFlowSequencer.java | 60 ++----- .../browser/firstrun/FirstRunUtils.java | 16 +- - .../firstrun/ToSAndUMAFirstRunFragment.java | 162 +++++------------- + .../firstrun/ToSAndUMAFirstRunFragment.java | 166 +++++------------- .../strings/android_chrome_strings.grd | 27 ++- - 8 files changed, 88 insertions(+), 246 deletions(-) + 8 files changed, 87 insertions(+), 253 deletions(-) diff --git a/chrome/android/java/res/layout/fre_tosanduma.xml b/chrome/android/java/res/layout/fre_tosanduma.xml --- a/chrome/android/java/res/layout/fre_tosanduma.xml @@ -68,16 +68,17 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/ChildA diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java --- a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java -@@ -34,8 +34,6 @@ import org.chromium.chrome.browser.fonts.FontPreloader; +@@ -33,9 +33,6 @@ import org.chromium.chrome.browser.flags.ChromeFeatureList; + import org.chromium.chrome.browser.fonts.FontPreloader; import org.chromium.chrome.browser.metrics.UmaUtils; import org.chromium.chrome.browser.search_engines.TemplateUrlServiceFactory; - import org.chromium.chrome.browser.signin.SigninCheckerProvider; +-import org.chromium.chrome.browser.signin.SigninCheckerProvider; -import org.chromium.chrome.browser.signin.SigninFirstRunFragment; -import org.chromium.chrome.browser.signin.services.FREMobileIdentityConsistencyFieldTrial; import org.chromium.components.browser_ui.modaldialog.AppModalPresenter; import org.chromium.ui.base.LocalizationUtils; import org.chromium.ui.modaldialog.ModalDialogManager; -@@ -146,18 +144,7 @@ public class FirstRunActivity extends FirstRunActivityBase implements FirstRunPa +@@ -146,18 +143,7 @@ public class FirstRunActivity extends FirstRunActivityBase implements FirstRunPa /** Creates first page and sets up adapter. Should result UI being shown on the screen. */ private void createFirstPage() { BooleanSupplier showWelcomePage = () -> !FirstRunStatus.shouldSkipWelcomePage(); @@ -97,7 +98,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstR mFreProgressStates.add(MobileFreProgress.WELCOME_SHOWN); mPagerAdapter = new FirstRunPagerAdapter(FirstRunActivity.this, mPages); mPager.setAdapter(mPagerAdapter); -@@ -165,15 +152,6 @@ public class FirstRunActivity extends FirstRunActivityBase implements FirstRunPa +@@ -165,15 +151,6 @@ public class FirstRunActivity extends FirstRunActivityBase implements FirstRunPa // native and policy service have been initialized. } @@ -113,7 +114,14 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstR /** * Create the page sequence which requires native initialized, and policies loaded if any * on-device policies may exists. -@@ -199,7 +177,6 @@ public class FirstRunActivity extends FirstRunActivityBase implements FirstRunPa +@@ -192,14 +169,12 @@ public class FirstRunActivity extends FirstRunActivityBase implements FirstRunPa + // TODO(b/245912657): explicitly sign in supervised users in {@link + // SigninFirstRunMediator#handleContinueWithNative} rather than relying on + // SigninChecker. +- SigninCheckerProvider.get(); + } + + mFirstRunFlowSequencer.updateFirstRunProperties(mFreProperties); BooleanSupplier showSearchEnginePromo = () -> mFreProperties.getBoolean(SHOW_SEARCH_ENGINE_PAGE); @@ -121,7 +129,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstR // An optional page to select a default search engine. if (showSearchEnginePromo.getAsBoolean()) { -@@ -208,11 +185,6 @@ public class FirstRunActivity extends FirstRunActivityBase implements FirstRunPa +@@ -208,11 +183,6 @@ public class FirstRunActivity extends FirstRunActivityBase implements FirstRunPa mFreProgressStates.add(MobileFreProgress.DEFAULT_SEARCH_ENGINE_SHOWN); } @@ -133,7 +141,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstR if (mPagerAdapter != null) { mPagerAdapter.notifyDataSetChanged(); } -@@ -257,10 +229,6 @@ public class FirstRunActivity extends FirstRunActivityBase implements FirstRunPa +@@ -257,10 +227,6 @@ public class FirstRunActivity extends FirstRunActivityBase implements FirstRunPa @Override public void triggerLayoutInflation() { @@ -144,7 +152,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstR super.triggerLayoutInflation(); initializeStateFromLaunchData(); -@@ -270,7 +238,7 @@ public class FirstRunActivity extends FirstRunActivityBase implements FirstRunPa +@@ -270,7 +236,7 @@ public class FirstRunActivity extends FirstRunActivityBase implements FirstRunPa setFinishOnTouchOutside(true); setContentView(createContentView()); @@ -153,7 +161,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstR // SigninFirstRunFragment doesn't use getProperties() and can be shown right away, // without waiting for FirstRunFlowSequencer. createFirstPage(); -@@ -542,10 +510,6 @@ public class FirstRunActivity extends FirstRunActivityBase implements FirstRunPa +@@ -542,10 +508,6 @@ public class FirstRunActivity extends FirstRunActivityBase implements FirstRunPa public void acceptTermsOfService(boolean allowMetricsAndCrashUploading) { assert mNativeInitializationPromise.isFulfilled(); @@ -452,23 +460,22 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/ToSAnd } } -@@ -166,13 +171,13 @@ public class ToSAndUMAFirstRunFragment +@@ -166,13 +171,7 @@ public class ToSAndUMAFirstRunFragment assert !isWaitingForNativeAndPolicyInit(); setSpinnerVisible(false); - mSendReportCheckBox.setChecked(mAllowMetricsAndCrashUploading); +- } +- +- /** Implements {@link FreUMADialogCoordinator.Listener} */ +- @Override +- public void onAllowMetricsAndCrashUploadingChecked(boolean allowMetricsAndCrashUploading) { +- mAllowMetricsAndCrashUploading = allowMetricsAndCrashUploading; + mAutoUpdaterCheckBox.setChecked(true); } - /** Implements {@link FreUMADialogCoordinator.Listener} */ - @Override - public void onAllowMetricsAndCrashUploadingChecked(boolean allowMetricsAndCrashUploading) { -- mAllowMetricsAndCrashUploading = allowMetricsAndCrashUploading; -+ mAllowMetricsAndCrashUploading = false; - } - private void updateView() { -@@ -181,116 +186,39 @@ public class ToSAndUMAFirstRunFragment +@@ -181,116 +180,39 @@ public class ToSAndUMAFirstRunFragment return; } @@ -481,23 +488,19 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/ToSAnd - .isUsageAndCrashReportingPermittedByPolicy(); - - updateTosText(umaDialogMayBeShown, hasChildAccount, isMetricsReportingDisabledByPolicy); -+ updateTosText(); - +- - updateReportCheckbox(umaDialogMayBeShown, isMetricsReportingDisabledByPolicy); -+ updateReportCheckbox(); - } - +- } +- - private SpanInfo buildTermsOfServiceLink() { - NoUnderlineClickableSpan clickableGoogleTermsSpan = -+ private SpanInfo buildPrivacyPolicyLink(String suffix, int url) { -+ NoUnderlineClickableSpan clickableSpan = - new NoUnderlineClickableSpan(getContext(), (view1) -> { - if (!isAdded()) return; +- new NoUnderlineClickableSpan(getContext(), (view1) -> { +- if (!isAdded()) return; - getPageDelegate().showInfoPage(R.string.google_terms_of_service_url); -+ getPageDelegate().showInfoPage(url); - }); +- }); - return new SpanInfo("", "", clickableGoogleTermsSpan); - } ++ updateTosText(); - private SpanInfo buildAdditionalTermsOfServiceLink() { - NoUnderlineClickableSpan clickableChromeAdditionalTermsSpan = @@ -506,16 +509,19 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/ToSAnd - getPageDelegate().showInfoPage(R.string.chrome_additional_terms_of_service_url); - }); - return new SpanInfo("", "", clickableChromeAdditionalTermsSpan); -+ return new SpanInfo("", "", clickableSpan); ++ updateReportCheckbox(); } - private SpanInfo buildPrivacyPolicyLink() { - NoUnderlineClickableSpan clickableFamilyLinkPrivacySpan = -- new NoUnderlineClickableSpan(getContext(), (view1) -> { -- if (!isAdded()) return; ++ private SpanInfo buildPrivacyPolicyLink(String suffix, int url) { ++ NoUnderlineClickableSpan clickableSpan = + new NoUnderlineClickableSpan(getContext(), (view1) -> { + if (!isAdded()) return; - getPageDelegate().showInfoPage(R.string.google_privacy_policy_url); -- }); -- ++ getPageDelegate().showInfoPage(url); + }); + - return new SpanInfo("", "", clickableFamilyLinkPrivacySpan); - } - @@ -523,8 +529,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/ToSAnd - NoUnderlineClickableSpan clickableUMADialogSpan = - new NoUnderlineClickableSpan(getContext(), (view1) -> openUmaDialog()); - return new SpanInfo("", "", clickableUMADialogSpan); -- } -- ++ return new SpanInfo("", "", clickableSpan); + } + - private void updateTosText(boolean umaDialogMayBeShown, boolean hasChildAccount, - boolean isMetricsReportingDisabledByPolicy) { + private void updateTosText() { @@ -550,14 +557,14 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/ToSAnd - if (umaDialogMayBeShown && !isMetricsReportingDisabledByPolicy) { - spans.add(buildMetricsAndCrashReportingLink()); - } -- ++ spans.add(buildPrivacyPolicyLink("4", R.string.bromite_updater_privacy_policy_url)); + - String tosString; - if (umaDialogMayBeShown) { - tosString = - getString(hasChildAccount ? R.string.signin_fre_footer_tos_with_supervised_user - : R.string.signin_fre_footer_tos); -+ spans.add(buildPrivacyPolicyLink("4", R.string.bromite_updater_privacy_policy_url)); - +- - if (!isMetricsReportingDisabledByPolicy) { - tosString += "\n" + getString(R.string.signin_fre_footer_metrics_reporting); - } @@ -599,7 +606,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/ToSAnd } private void onPolicyServiceInitialized(boolean onDevicePolicyFound) { -@@ -317,6 +245,12 @@ public class ToSAndUMAFirstRunFragment +@@ -317,6 +239,12 @@ public class ToSAndUMAFirstRunFragment private void onTosButtonClicked() { mTosButtonClicked = true; mTosAcceptedTime = SystemClock.elapsedRealtime(); @@ -612,7 +619,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/ToSAnd tryMarkTermsAccepted(true); } -@@ -327,7 +261,8 @@ public class ToSAndUMAFirstRunFragment +@@ -327,7 +255,8 @@ public class ToSAndUMAFirstRunFragment * @param fromButtonClicked Whether called from {@link #onTosButtonClicked()}. */ private void tryMarkTermsAccepted(boolean fromButtonClicked) { @@ -622,7 +629,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/ToSAnd if (fromButtonClicked) setSpinnerVisible(true); return; } -@@ -338,7 +273,7 @@ public class ToSAndUMAFirstRunFragment +@@ -338,7 +267,7 @@ public class ToSAndUMAFirstRunFragment RecordHistogram.recordTimesHistogram("MobileFre.TosFragment.SpinnerVisibleDuration", SystemClock.elapsedRealtime() - mTosAcceptedTime); } @@ -631,7 +638,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/ToSAnd getPageDelegate().advanceToNextPage(); } -@@ -381,10 +316,7 @@ public class ToSAndUMAFirstRunFragment +@@ -381,10 +310,7 @@ public class ToSAndUMAFirstRunFragment mAcceptButton.setVisibility(visibility); mTosAndPrivacy.setVisibility(visibility); @@ -643,7 +650,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/ToSAnd } protected View getToSAndPrivacyText() { -@@ -397,18 +329,6 @@ public class ToSAndUMAFirstRunFragment +@@ -397,18 +323,6 @@ public class ToSAndUMAFirstRunFragment } } diff --git a/build/patches/patches-new.7z b/build/patches/patches-new.7z deleted file mode 100644 index 498e2e90..00000000 Binary files a/build/patches/patches-new.7z and /dev/null differ