From ef89b5a41b9d43f18db2a4a487f0c39d299d5ba0 Mon Sep 17 00:00:00 2001 From: R4SAS Date: Fri, 15 Mar 2019 20:23:46 +0300 Subject: [PATCH] [dev][windows] Refresh patches for 72.0.3626.122 --- .../windows/windows-disable-machine-id.patch | 2 +- .../windows/windows-disable-rcpy.patch | 10 +-- .../windows-disable-reorder-fix-linking.patch | 3 +- .../windows/windows-fix-building-gn.patch | 12 ++-- ...ws-fix-building-without-safebrowsing.patch | 68 +++++++++---------- .../windows/windows-fix-enum-conflict.patch | 2 +- 6 files changed, 45 insertions(+), 52 deletions(-) diff --git a/patches/ungoogled-chromium/windows/windows-disable-machine-id.patch b/patches/ungoogled-chromium/windows/windows-disable-machine-id.patch index f5457298..6e9e3fc8 100644 --- a/patches/ungoogled-chromium/windows/windows-disable-machine-id.patch +++ b/patches/ungoogled-chromium/windows/windows-disable-machine-id.patch @@ -16,7 +16,7 @@ + if (base::CommandLine::ForCurrentProcess()->HasSwitch("disable-machine-id")) { + return MachineIdStatus::NOT_IMPLEMENTED; + } - + wchar_t computer_name[MAX_COMPUTERNAME_LENGTH + 1] = {}; DWORD computer_name_size = arraysize(computer_name); --- a/components/metrics/machine_id_provider_win.cc diff --git a/patches/ungoogled-chromium/windows/windows-disable-rcpy.patch b/patches/ungoogled-chromium/windows/windows-disable-rcpy.patch index d4ee71b4..871a53ae 100644 --- a/patches/ungoogled-chromium/windows/windows-disable-rcpy.patch +++ b/patches/ungoogled-chromium/windows/windows-disable-rcpy.patch @@ -3,7 +3,7 @@ --- a/build/toolchain/win/tool_wrapper.py +++ b/build/toolchain/win/tool_wrapper.py -@@ -195,26 +195,8 @@ class WinTool(object): +@@ -195,33 +195,12 @@ class WinTool(object): # 1. Run our rc.py. # Also pass /showIncludes to track dependencies of .rc files. args = list(args) @@ -28,13 +28,7 @@ # 2. Run Microsoft rc.exe. - if sys.platform == 'win32' and rc_exe_exit_code == 0: + if sys.platform == 'win32': - popen = subprocess.Popen(args, shell=True, env=env, - stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - out, _ = popen.communicate() -@@ -227,12 +209,9 @@ class WinTool(object): - and line): - print line - rc_exe_exit_code = popen.returncode + rc_exe_exit_code = subprocess.call(args, shell=True, env=env) - # Assert Microsoft rc.exe and rc.py produced identical .res files. - if rc_exe_exit_code == 0: - import filecmp diff --git a/patches/ungoogled-chromium/windows/windows-disable-reorder-fix-linking.patch b/patches/ungoogled-chromium/windows/windows-disable-reorder-fix-linking.patch index 83fd4de9..a6506f6c 100644 --- a/patches/ungoogled-chromium/windows/windows-disable-reorder-fix-linking.patch +++ b/patches/ungoogled-chromium/windows/windows-disable-reorder-fix-linking.patch @@ -38,12 +38,13 @@ # This target exists above chrome and it's main components in the dependency # tree as a central place to put assert_no_deps annotations. Since this depends # on Chrome and the main DLLs it uses, it will transitively assert that those -@@ -112,9 +83,6 @@ if (!is_android && !is_mac) { +@@ -112,10 +83,6 @@ if (!is_android && !is_mac) { data_deps = [ ":chrome_initial", ] - if (is_win) { - public_deps += [ ":reorder_imports" ] +- data_deps += [ ":reorder_imports" ] - } if (use_aura && (is_win || is_linux)) { data_deps += [ "//chrome/app:service_manifests" ] diff --git a/patches/ungoogled-chromium/windows/windows-fix-building-gn.patch b/patches/ungoogled-chromium/windows/windows-fix-building-gn.patch index 8cfe97c9..91c20b7f 100644 --- a/patches/ungoogled-chromium/windows/windows-fix-building-gn.patch +++ b/patches/ungoogled-chromium/windows/windows-fix-building-gn.patch @@ -3,7 +3,7 @@ --- a/tools/gn/bootstrap/bootstrap.py +++ b/tools/gn/bootstrap/bootstrap.py -@@ -62,7 +62,7 @@ def main(argv): +@@ -64,7 +64,7 @@ def main(argv): else: build_rel = os.path.join('out', 'Release') out_dir = os.path.join(SRC_ROOT, build_rel) @@ -21,12 +21,12 @@ else: subprocess.check_call( - ['ninja', '-C', gn_build_dir, 'gn', '-w', 'dupbuild=err']) -- shutil.copy2(os.path.join(gn_build_dir, 'gn'), gn_path) -+ ['ninja', '-C', gn_build_dir, 'gn.exe', '-w', 'dupbuild=err']) -+ shutil.copy2(os.path.join(gn_build_dir, 'gn.exe'), gn_path) +- shutil.copy2(os.path.join(gn_build_dir, 'gn'), gn_path) ++ ['ninja', '-C', gn_build_dir, 'gn.exe', '-w', 'dupbuild=err']) ++ shutil.copy2(os.path.join(gn_build_dir, 'gn.exe'), gn_path) - - if __name__ == '__main__': + if not options.skip_generate_buildfiles: + gn_gen_args = options.gn_gen_args or '' --- a/tools/gn/build/build_win.ninja.template +++ b/tools/gn/build/build_win.ninja.template @@ -1,12 +1,12 @@ diff --git a/patches/ungoogled-chromium/windows/windows-fix-building-without-safebrowsing.patch b/patches/ungoogled-chromium/windows/windows-fix-building-without-safebrowsing.patch index 8f5c45ba..4d353a06 100644 --- a/patches/ungoogled-chromium/windows/windows-fix-building-without-safebrowsing.patch +++ b/patches/ungoogled-chromium/windows/windows-fix-building-without-safebrowsing.patch @@ -63,14 +63,14 @@ - if (base::FeatureList::IsEnabled(safe_browsing::kSettingsResetPrompt)) { - content::BrowserThread::PostAfterStartupTask( - FROM_HERE, -- content::BrowserThread::GetTaskRunnerForThread( -- content::BrowserThread::UI), +- base::CreateSingleThreadTaskRunnerWithTraits( +- {content::BrowserThread::UI}), - base::Bind(safe_browsing::MaybeShowSettingsResetPromptWithDelay)); - } -} - } // namespace - + int DoUninstallTasks(bool chrome_still_running) { @@ -555,23 +542,6 @@ void ChromeBrowserMainPartsWin::PostBrowserStart() { @@ -116,10 +116,10 @@ #include "components/search_engines/template_url_prepopulate_data.h" #include "components/sessions/core/session_id_generator.h" #include "components/startup_metric_utils/browser/startup_metric_utils.h" -@@ -301,14 +300,11 @@ +@@ -301,14 +301,11 @@ + #endif + #if defined(OS_WIN) - #include "chrome/browser/apps/platform_apps/app_launch_for_metro_restart_win.h" - #include "chrome/browser/browser_switcher/browser_switcher_prefs.h" -#include "chrome/browser/component_updater/sw_reporter_installer_win.h" #if defined(GOOGLE_CHROME_BUILD) #include "chrome/browser/conflicts/incompatible_applications_updater_win.h" @@ -128,17 +128,17 @@ #endif // defined(GOOGLE_CHROME_BUILD) -#include "chrome/browser/safe_browsing/chrome_cleaner/settings_resetter_win.h" -#include "chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_prefs_manager.h" - #include "chrome/browser/ui/desktop_ios_promotion/desktop_ios_promotion_util.h" #endif - -@@ -504,7 +500,6 @@ void RegisterLocalState(PrefRegistrySimple* registry) { - + + #if defined(OS_WIN) || defined(OS_MACOSX) || \ +@@ -545,7 +541,6 @@ void RegisterLocalState(PrefRegistrySimple* registry) { + #endif + #if defined(OS_WIN) - app_metro_launch::RegisterPrefs(registry); - component_updater::RegisterPrefsForSwReporter(registry); - desktop_ios_promotion::RegisterLocalPrefs(registry); #if defined(GOOGLE_CHROME_BUILD) IncompatibleApplicationsUpdater::RegisterLocalStatePrefs(registry); + ModuleDatabase::RegisterLocalStatePrefs(registry); @@ -571,7 +566,6 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { ProtocolHandlerRegistry::RegisterProfilePrefs(registry); PushMessagingAppIdentifier::RegisterProfilePrefs(registry); @@ -147,50 +147,49 @@ secure_origin_whitelist::RegisterProfilePrefs(registry); SafeBrowsingTriggeredPopupBlocker::RegisterProfilePrefs(registry); SessionStartupPref::RegisterProfilePrefs(registry); -@@ -712,12 +706,8 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { - +@@ -753,11 +747,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { + #endif + #if defined(OS_WIN) - browser_switcher::prefs::RegisterProfilePrefs(registry); - component_updater::RegisterProfilePrefsForSwReporter(registry); - desktop_ios_promotion::RegisterProfilePrefs(registry); NetworkProfileBubble::RegisterProfilePrefs(registry); - safe_browsing::SettingsResetPromptPrefsManager::RegisterProfilePrefs( - registry); - safe_browsing::PostCleanupSettingsResetter::RegisterProfilePrefs(registry); #endif - - #if defined(TOOLKIT_VIEWS) + + #if defined(OS_WIN) || defined(OS_MACOSX) || \ --- a/chrome/browser/profiles/off_the_record_profile_io_data.cc +++ b/chrome/browser/profiles/off_the_record_profile_io_data.cc -@@ -177,14 +177,6 @@ void OffTheRecordProfileIOData::Handle::LazyInitialize() const { +@@ -167,14 +167,6 @@ void OffTheRecordProfileIOData::Handle::LazyInitialize() const { // Set initialized_ to true at the beginning in case any of the objects // below try to get the ResourceContext pointer. initialized_ = true; - io_data_->safe_browsing_enabled()->Init(prefs::kSafeBrowsingEnabled, - profile_->GetPrefs()); - io_data_->safe_browsing_enabled()->MoveToThread( -- BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); +- base::CreateSingleThreadTaskRunnerWithTraits({BrowserThread::IO})); - io_data_->safe_browsing_whitelist_domains()->Init( - prefs::kSafeBrowsingWhitelistDomains, profile_->GetPrefs()); - io_data_->safe_browsing_whitelist_domains()->MoveToThread( -- BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); +- base::CreateSingleThreadTaskRunnerWithTraits({BrowserThread::IO})); #if BUILDFLAG(ENABLE_PLUGINS) io_data_->always_open_pdf_externally()->Init( prefs::kPluginsAlwaysOpenPdfExternally, profile_->GetPrefs()); --- a/chrome/browser/profiles/profile_impl_io_data.cc +++ b/chrome/browser/profiles/profile_impl_io_data.cc -@@ -378,14 +378,6 @@ void ProfileImplIOData::Handle::LazyInitialize() const { +@@ -331,14 +331,6 @@ void ProfileImplIOData::Handle::LazyInitialize() const { // below try to get the ResourceContext pointer. initialized_ = true; PrefService* pref_service = profile_->GetPrefs(); - io_data_->safe_browsing_enabled()->Init(prefs::kSafeBrowsingEnabled, - pref_service); - io_data_->safe_browsing_enabled()->MoveToThread( -- BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); +- base::CreateSingleThreadTaskRunnerWithTraits({BrowserThread::IO})); - io_data_->safe_browsing_whitelist_domains()->Init( - prefs::kSafeBrowsingWhitelistDomains, pref_service); - io_data_->safe_browsing_whitelist_domains()->MoveToThread( -- BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); +- base::CreateSingleThreadTaskRunnerWithTraits({BrowserThread::IO})); #if BUILDFLAG(ENABLE_PLUGINS) io_data_->always_open_pdf_externally()->Init( prefs::kPluginsAlwaysOpenPdfExternally, pref_service); @@ -272,20 +271,20 @@ #if defined(GOOGLE_CHROME_BUILD) #include "chrome/browser/conflicts/incompatible_applications_updater_win.h" #include "chrome/browser/conflicts/token_util_win.h" -@@ -257,7 +254,6 @@ MdSettingsUI::MdSettingsUI(content::WebUI* web_ui) +@@ -244,7 +241,6 @@ MdSettingsUI::MdSettingsUI(content::WebUI* web_ui) content::WebUIDataSource::Create(chrome::kChromeUISettingsHost); - + #if defined(OS_WIN) - AddSettingsPageUIHandler(std::make_unique(profile)); - - #if defined(GOOGLE_CHROME_BUILD) - html_source->AddResourcePath("partner-logo.svg", IDR_CHROME_CLEANUP_PARTNER); + #endif // defined(OS_WIN) + + #if defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD) --- a/chrome/common/safe_browsing/BUILD.gn +++ b/chrome/common/safe_browsing/BUILD.gn -@@ -95,44 +95,8 @@ source_set("safe_browsing") { - deps = [ - ":file_type_policies", - ] +@@ -90,43 +90,8 @@ source_set("safe_browsing") { + if (is_mac) { + deps += [ ":disk_image_type_sniffer_mac" ] + } - - if (safe_browsing_mode == 1) { - sources = [ @@ -311,8 +310,7 @@ - - deps += [ - ":archive_analyzer_results", -- ":download_protection_util", -- ":rar_analyzer", +- ":download_type_util", - "//components/safe_browsing:features", - ] - diff --git a/patches/ungoogled-chromium/windows/windows-fix-enum-conflict.patch b/patches/ungoogled-chromium/windows/windows-fix-enum-conflict.patch index eb70933a..7e6f8b90 100644 --- a/patches/ungoogled-chromium/windows/windows-fix-enum-conflict.patch +++ b/patches/ungoogled-chromium/windows/windows-fix-enum-conflict.patch @@ -2,7 +2,7 @@ --- a/extensions/browser/api/feedback_private/feedback_private_api.cc +++ b/extensions/browser/api/feedback_private/feedback_private_api.cc -@@ -370,7 +370,7 @@ void FeedbackPrivateSendFeedbackFunction::OnCompleted( +@@ -369,7 +369,7 @@ void FeedbackPrivateSendFeedbackFunction::OnCompleted( bool success) { Respond(TwoArguments( std::make_unique(feedback_private::ToString(