| 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 c5ec45ea2ff2356559257401953568244747db76..50373fed4f845b92fe2610b42223127c486b2b58 100644
|
| --- a/chrome/browser/chrome_browser_main_win.cc
|
| +++ b/chrome/browser/chrome_browser_main_win.cc
|
| @@ -231,6 +231,16 @@ void SetupModuleDatabase(
|
| base::Unretained(module_database)));
|
| }
|
|
|
| +void MaybePostSettingsResetPrompt() {
|
| + if (base::FeatureList::IsEnabled(safe_browsing::kSettingsResetPrompt)) {
|
| + content::BrowserThread::PostAfterStartupTask(
|
| + FROM_HERE,
|
| + content::BrowserThread::GetTaskRunnerForThread(
|
| + content::BrowserThread::UI),
|
| + base::Bind(safe_browsing::MaybeShowSettingsResetPromptWithDelay));
|
| + }
|
| +}
|
| +
|
| } // namespace
|
|
|
| void ShowCloseBrowserFirstMessageBox() {
|
| @@ -376,24 +386,20 @@ 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.
|
| + // complete run of the Chrome Cleanup tool. If post-cleanup settings reset is
|
| + // enabled, we delay checks for settings reset prompt until the scheduled
|
| + // reset is finished.
|
| 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(&base::DoNothing),
|
| + base::BindOnce(&MaybePostSettingsResetPrompt),
|
| base::MakeUnique<
|
| safe_browsing::PostCleanupSettingsResetter::Delegate>());
|
| - }
|
| -
|
| - if (base::FeatureList::IsEnabled(safe_browsing::kSettingsResetPrompt)) {
|
| - content::BrowserThread::PostAfterStartupTask(
|
| - FROM_HERE,
|
| - content::BrowserThread::GetTaskRunnerForThread(
|
| - content::BrowserThread::UI),
|
| - base::Bind(safe_browsing::MaybeShowSettingsResetPromptWithDelay));
|
| + } else {
|
| + MaybePostSettingsResetPrompt();
|
| }
|
|
|
| // Record UMA data about whether the fault-tolerant heap is enabled.
|
|
|