Chromium Code Reviews| Index: chrome/browser/safe_browsing/srt_fetcher_win.cc |
| diff --git a/chrome/browser/safe_browsing/srt_fetcher_win.cc b/chrome/browser/safe_browsing/srt_fetcher_win.cc |
| index f3509738029947607327c851c133f9c5b7d41066..cb4968c7f0abc2f5536bc5ad22115081258a399f 100644 |
| --- a/chrome/browser/safe_browsing/srt_fetcher_win.cc |
| +++ b/chrome/browser/safe_browsing/srt_fetcher_win.cc |
| @@ -38,6 +38,8 @@ |
| #include "chrome/browser/safe_browsing/srt_chrome_prompt_impl.h" |
| #include "chrome/browser/safe_browsing/srt_client_info_win.h" |
| #include "chrome/browser/safe_browsing/srt_global_error_win.h" |
| +#include "chrome/browser/safe_browsing/srt_prompt_controller.h" |
| +#include "chrome/browser/ui/browser_dialogs.h" |
| #include "chrome/browser/ui/browser_finder.h" |
| #include "chrome/browser/ui/browser_list.h" |
| #include "chrome/browser/ui/browser_list_observer.h" |
| @@ -1237,4 +1239,15 @@ void SetSwReporterTestingDelegate(SwReporterTestingDelegate* delegate) { |
| g_testing_delegate_ = delegate; |
| } |
| +void DisplayUserInitiatedSRTPromptDialog(base::Closure callback) { |
| + Browser* browser = chrome::FindLastActive(); |
| + DCHECK(browser); |
|
alito
2017/04/14 00:01:18
No need for this DCHECK.
proberge
2017/04/18 19:24:28
Done.
|
| + |
| + // TODO(proberge): Run the callback with details about whether the user |
| + // accepted the prompt, whether the clean was successful and what was |
| + // cleaned up. This will involve passing the callback to ShowSRTPrompt. |
| + if (browser) |
| + chrome::ShowSRTPrompt(browser, new safe_browsing::SRTPromptController()); |
| +} |
| + |
| } // namespace safe_browsing |