| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_runner_win.
h" | 5 #include "chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_runner_win.
h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 base::Passed(&prompt_user_callback))); | 216 base::Passed(&prompt_user_callback))); |
| 217 } | 217 } |
| 218 } | 218 } |
| 219 | 219 |
| 220 void ChromeCleanerRunner::OnConnectionClosed() { | 220 void ChromeCleanerRunner::OnConnectionClosed() { |
| 221 if (on_connection_closed_) | 221 if (on_connection_closed_) |
| 222 task_runner_->PostTask(FROM_HERE, std::move(on_connection_closed_)); | 222 task_runner_->PostTask(FROM_HERE, std::move(on_connection_closed_)); |
| 223 } | 223 } |
| 224 | 224 |
| 225 void ChromeCleanerRunner::OnProcessDone(ProcessStatus process_status) { | 225 void ChromeCleanerRunner::OnProcessDone(ProcessStatus process_status) { |
| 226 if (g_test_delegate) { |
| 227 task_runner_->PostTask( |
| 228 FROM_HERE, |
| 229 base::BindOnce(&ChromeCleanerRunnerTestDelegate::OnCleanerProcessDone, |
| 230 base::Unretained(g_test_delegate), process_status)); |
| 231 } |
| 232 |
| 226 if (on_process_done_) { | 233 if (on_process_done_) { |
| 227 task_runner_->PostTask( | 234 task_runner_->PostTask( |
| 228 FROM_HERE, base::BindOnce(std::move(on_process_done_), process_status)); | 235 FROM_HERE, base::BindOnce(std::move(on_process_done_), process_status)); |
| 229 } | 236 } |
| 230 } | 237 } |
| 231 | 238 |
| 232 void SetChromeCleanerRunnerTestDelegateForTesting( | 239 void SetChromeCleanerRunnerTestDelegateForTesting( |
| 233 ChromeCleanerRunnerTestDelegate* test_delegate) { | 240 ChromeCleanerRunnerTestDelegate* test_delegate) { |
| 234 g_test_delegate = test_delegate; | 241 g_test_delegate = test_delegate; |
| 235 } | 242 } |
| 236 | 243 |
| 237 } // namespace safe_browsing | 244 } // namespace safe_browsing |
| OLD | NEW |