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/srt_chrome_prompt_impl.h" | 5 #include "chrome/browser/safe_browsing/chrome_cleaner/srt_chrome_prompt_impl.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 | 8 |
9 namespace safe_browsing { | 9 namespace safe_browsing { |
10 | 10 |
11 using chrome_cleaner::mojom::ChromePrompt; | 11 using chrome_cleaner::mojom::ChromePrompt; |
12 using chrome_cleaner::mojom::ChromePromptRequest; | 12 using chrome_cleaner::mojom::ChromePromptRequest; |
13 using chrome_cleaner::mojom::ElevationStatus; | 13 using chrome_cleaner::mojom::ElevationStatus; |
14 using chrome_cleaner::mojom::PromptAcceptance; | 14 using chrome_cleaner::mojom::PromptAcceptance; |
15 using chrome_cleaner::mojom::UwSPtr; | 15 using chrome_cleaner::mojom::UwSPtr; |
16 | 16 |
17 ChromePromptImpl::ChromePromptImpl(ChromePromptRequest request, | 17 ChromePromptImpl::ChromePromptImpl(ChromePromptRequest request, |
18 base::Closure on_connection_closed) | 18 base::Closure on_connection_closed) |
19 : binding_(this, std::move(request)) { | 19 : binding_(this, std::move(request)) { |
20 binding_.set_connection_error_handler(std::move(on_connection_closed)); | 20 binding_.set_connection_error_handler(std::move(on_connection_closed)); |
21 } | 21 } |
22 | 22 |
23 ChromePromptImpl::~ChromePromptImpl() {} | 23 ChromePromptImpl::~ChromePromptImpl() {} |
24 | 24 |
25 void ChromePromptImpl::PromptUser( | 25 void ChromePromptImpl::PromptUser(std::vector<UwSPtr> removable_uws_found, |
26 std::vector<UwSPtr> removable_uws_found, | 26 ElevationStatus elevation_status, |
27 ElevationStatus elevation_status, | 27 ChromePrompt::PromptUserCallback callback) { |
28 const ChromePrompt::PromptUserCallback& callback) { | |
29 // Placeholder. The actual implementation will show the prompt dialog to the | 28 // Placeholder. The actual implementation will show the prompt dialog to the |
30 // user and invoke this callback depending on the user's response. | 29 // user and invoke this callback depending on the user's response. |
31 callback.Run(PromptAcceptance::DENIED); | 30 std::move(callback).Run(PromptAcceptance::DENIED); |
32 } | 31 } |
33 | 32 |
34 } // namespace safe_browsing | 33 } // namespace safe_browsing |
OLD | NEW |