Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(348)

Side by Side Diff: chrome/browser/safe_browsing/chrome_cleaner/srt_chrome_prompt_impl.h

Issue 2890023005: Chrome Cleaner UI: reporter no longer uses mojo. (Closed)
Patch Set: Add ChromeCleanerRunner class Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 OnPromptUserCallback = base::Callback<void(
ftirelo 2017/05/18 18:27:51 Shouldn't this be a OnceCallback as well, since it
alito 2017/05/18 23:01:17 Done.
24 std::unique_ptr<std::set<base::FilePath>>,
25 chrome_cleaner::mojom::ChromePrompt::PromptUserCallback callback)>;
ftirelo 2017/05/18 18:27:51 I'm afraid OnPromptUserCallback is too similar to
alito 2017/05/18 23:01:17 As discussed, using OnPromptUser for the type name
26
18 ChromePromptImpl(chrome_cleaner::mojom::ChromePromptRequest request, 27 ChromePromptImpl(chrome_cleaner::mojom::ChromePromptRequest request,
19 base::Closure on_connection_closed); 28 base::Closure on_connection_closed,
29 OnPromptUserCallback on_prompt_user);
20 ~ChromePromptImpl() override; 30 ~ChromePromptImpl() override;
21 31
22 void PromptUser( 32 void PromptUser(
23 std::vector<chrome_cleaner::mojom::UwSPtr> removable_uws_found, 33 std::vector<chrome_cleaner::mojom::UwSPtr> removable_uws_found,
24 chrome_cleaner::mojom::ElevationStatus elevation_status, 34 chrome_cleaner::mojom::ElevationStatus elevation_status,
25 chrome_cleaner::mojom::ChromePrompt::PromptUserCallback callback) 35 chrome_cleaner::mojom::ChromePrompt::PromptUserCallback callback)
26 override; 36 override;
27 37
28 private: 38 private:
29 mojo::Binding<chrome_cleaner::mojom::ChromePrompt> binding_; 39 mojo::Binding<chrome_cleaner::mojom::ChromePrompt> binding_;
40 OnPromptUserCallback on_prompt_user_;
30 41
31 DISALLOW_COPY_AND_ASSIGN(ChromePromptImpl); 42 DISALLOW_COPY_AND_ASSIGN(ChromePromptImpl);
32 }; 43 };
33 44
34 } // namespace safe_browsing 45 } // namespace safe_browsing
35 46
36 #endif // CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_SRT_CHROME_PROMPT_IMPL_H_ 47 #endif // CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_SRT_CHROME_PROMPT_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698