From 2265ad3ce2883d671d468b40301e8502af94ae7c Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Wed, 13 Sep 2017 14:46:24 -0400 Subject: [PATCH] Linux: Fix undefined reference to SettingsResetPromptController::ShowSettingsResetPrompt (issue #2240) --- patch/patch.cfg | 4 ++++ patch/patches/linux_build.patch | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/patch/patch.cfg b/patch/patch.cfg index 9231e746c..e1a7fed00 100644 --- a/patch/patch.cfg +++ b/patch/patch.cfg @@ -321,6 +321,10 @@ patches = [ # Linux: Fix 32-bit build fails with ld.gold: internal error in # get_section_contents, at icf.cc:467 # https://bitbucket.org/chromiumembedded/cef/issues/2256 + # + # Linux: Fix undefined reference to + # safe_browsing::SettingsResetPromptController::ShowSettingsResetPrompt + # https://bitbucket.org/chromiumembedded/cef/issues/2240 'name': 'linux_build', }, { diff --git a/patch/patches/linux_build.patch b/patch/patches/linux_build.patch index e7fb09dc0..1303e9e31 100644 --- a/patch/patches/linux_build.patch +++ b/patch/patches/linux_build.patch @@ -11,6 +11,26 @@ index b5d6d8fdb443..3cb6a0a719c2 100644 !(current_cpu == "x86" || current_cpu == "x64")) { ldflags += [ "-Wl,--icf=all" ] } +diff --git chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_controller.cc chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_controller.cc +index b8e9169c0db2..eff883b03f26 100644 +--- chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_controller.cc ++++ chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_controller.cc +@@ -57,6 +57,7 @@ bool ResetHomepageEnabled(const SettingsResetPromptModel& model) { + void TryToShowSettingsResetPrompt( + std::unique_ptr model, + std::unique_ptr default_settings) { ++#if defined(OS_WIN) + DCHECK(model); + DCHECK(default_settings); + +@@ -78,6 +79,7 @@ void TryToShowSettingsResetPrompt( + SettingsResetPromptController::ShowSettingsResetPrompt( + browser, new SettingsResetPromptController(std::move(model), + std::move(default_settings))); ++#endif // defined(OS_WIN) + } + + // Will display the settings reset prompt if required and if there is at least diff --git chrome/browser/ui/libgtkui/gtk_ui.cc chrome/browser/ui/libgtkui/gtk_ui.cc index a38c6b806be7..bb4fa59d7612 100644 --- chrome/browser/ui/libgtkui/gtk_ui.cc