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 #ifndef CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_SRT_CHROME_PROMPT_IMPL_H_ | 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_SRT_CHROME_PROMPT_IMPL_H_ |
6 #define CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_SRT_CHROME_PROMPT_IMPL_H_ | 6 #define CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_SRT_CHROME_PROMPT_IMPL_H_ |
7 | 7 |
8 #include <memory> | |
9 #include <set> | |
10 #include <vector> | |
11 | |
8 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "base/files/file_path.h" | |
9 #include "base/macros.h" | 14 #include "base/macros.h" |
10 #include "components/chrome_cleaner/public/interfaces/chrome_prompt.mojom.h" | 15 #include "components/chrome_cleaner/public/interfaces/chrome_prompt.mojom.h" |
11 #include "mojo/public/cpp/bindings/binding.h" | 16 #include "mojo/public/cpp/bindings/binding.h" |
12 | 17 |
13 namespace safe_browsing { | 18 namespace safe_browsing { |
14 | 19 |
15 // Implementation of the ChromePrompt Mojo interface. | 20 // Implementation of the ChromePrompt Mojo interface. |
16 class ChromePromptImpl : public chrome_cleaner::mojom::ChromePrompt { | 21 class ChromePromptImpl : public chrome_cleaner::mojom::ChromePrompt { |
17 public: | 22 public: |
23 using OnPromptUser = base::OnceCallback<void( | |
24 std::unique_ptr<std::set<base::FilePath>>, | |
25 chrome_cleaner::mojom::ChromePrompt::PromptUserCallback | |
26 prompt_user_response_callback)>; | |
csharp
2017/05/19 20:44:17
No need for the variable name
alito
2017/05/22 23:26:31
Done.
| |
27 | |
18 ChromePromptImpl(chrome_cleaner::mojom::ChromePromptRequest request, | 28 ChromePromptImpl(chrome_cleaner::mojom::ChromePromptRequest request, |
19 base::Closure on_connection_closed); | 29 base::Closure on_connection_closed, |
30 OnPromptUser on_prompt_user); | |
20 ~ChromePromptImpl() override; | 31 ~ChromePromptImpl() override; |
21 | 32 |
22 void PromptUser( | 33 void PromptUser( |
23 std::vector<chrome_cleaner::mojom::UwSPtr> removable_uws_found, | 34 std::vector<chrome_cleaner::mojom::UwSPtr> removable_uws_found, |
24 chrome_cleaner::mojom::ElevationStatus elevation_status, | 35 chrome_cleaner::mojom::ElevationStatus elevation_status, |
25 chrome_cleaner::mojom::ChromePrompt::PromptUserCallback callback) | 36 chrome_cleaner::mojom::ChromePrompt::PromptUserCallback callback) |
26 override; | 37 override; |
27 | 38 |
28 private: | 39 private: |
29 mojo::Binding<chrome_cleaner::mojom::ChromePrompt> binding_; | 40 mojo::Binding<chrome_cleaner::mojom::ChromePrompt> binding_; |
41 OnPromptUser on_prompt_user_; | |
30 | 42 |
31 DISALLOW_COPY_AND_ASSIGN(ChromePromptImpl); | 43 DISALLOW_COPY_AND_ASSIGN(ChromePromptImpl); |
32 }; | 44 }; |
33 | 45 |
34 } // namespace safe_browsing | 46 } // namespace safe_browsing |
35 | 47 |
36 #endif // CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_SRT_CHROME_PROMPT_IMPL_H_ | 48 #endif // CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_SRT_CHROME_PROMPT_IMPL_H_ |
OLD | NEW |