Chromium Code Reviews| Index: chrome/browser/chrome_browser_main_win.cc |
| diff --git a/chrome/browser/chrome_browser_main_win.cc b/chrome/browser/chrome_browser_main_win.cc |
| index 0b931ecd489d5df75f0902b1eb50ba24f1ab729b..82bb8ff987c691c467aa34d425891f18c3b07be3 100644 |
| --- a/chrome/browser/chrome_browser_main_win.cc |
| +++ b/chrome/browser/chrome_browser_main_win.cc |
| @@ -33,11 +33,14 @@ |
| #include "base/win/win_util.h" |
| #include "base/win/windows_version.h" |
| #include "base/win/wrapped_window_proc.h" |
| +#include "chrome/browser/browser_process.h" |
| #include "chrome/browser/conflicts/module_database_win.h" |
| #include "chrome/browser/conflicts/module_event_sink_impl_win.h" |
| #include "chrome/browser/first_run/first_run.h" |
| #include "chrome/browser/install_verification/win/install_verification.h" |
| +#include "chrome/browser/profiles/profile_manager.h" |
| #include "chrome/browser/profiles/profile_shortcut_manager.h" |
| +#include "chrome/browser/safe_browsing/chrome_cleaner/settings_resetter_win.h" |
| #include "chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_config.h" |
| #include "chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_controller.h" |
| #include "chrome/browser/shell_integration.h" |
| @@ -368,6 +371,19 @@ void ChromeBrowserMainPartsWin::PostBrowserStart() { |
| InitializeChromeElf(); |
| + // Reset settings for the current profile if it's tagged to be reset after a |
| + // complete run of the Chrome Cleanup tool. |
| + if (safe_browsing::PostCleanupSettingsResetter::IsEnabled()) { |
| + // Using last opened profiles, because we want to find reset the profile |
| + // that was open in the last Chrome run, which may not be open yet in |
| + // the current run. |
| + safe_browsing::PostCleanupSettingsResetter().ResetTaggedProfiles( |
| + g_browser_process->profile_manager()->GetLastOpenedProfiles(), |
| + base::BindOnce([] {}), |
|
Nico
2017/06/15 20:57:31
does `base::OnceClosure()` do the same thing? if s
Peter Kasting
2017/06/15 20:59:58
See replies to me saying the same thing earlier.
ftirelo
2017/06/15 23:36:33
Acknowledged.
ftirelo
2017/06/15 23:36:33
I think it should. Let's discuss separately in a f
|
| + base::MakeUnique< |
| + safe_browsing::PostCleanupSettingsResetter::Delegate>()); |
| + } |
| + |
| if (base::FeatureList::IsEnabled(safe_browsing::kSettingsResetPrompt)) { |
| content::BrowserThread::PostAfterStartupTask( |
| FROM_HERE, |