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_CHROME_CLEANER_CONTROLLER_WI
N_H_ | 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_CHROME_CLEANER_CONTROLLER_WI
N_H_ |
6 #define CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_CHROME_CLEANER_CONTROLLER_WI
N_H_ | 6 #define CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_CHROME_CLEANER_CONTROLLER_WI
N_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
16 #include "base/observer_list.h" | 16 #include "base/observer_list.h" |
17 #include "base/threading/thread_checker.h" | 17 #include "base/threading/thread_checker.h" |
18 #include "chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_runner_win.
h" | 18 #include "chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_runner_win.
h" |
19 #include "chrome/browser/safe_browsing/chrome_cleaner/reporter_runner_win.h" | 19 #include "chrome/browser/safe_browsing/chrome_cleaner/reporter_runner_win.h" |
20 #include "components/chrome_cleaner/public/interfaces/chrome_prompt.mojom.h" | 20 #include "components/chrome_cleaner/public/interfaces/chrome_prompt.mojom.h" |
21 | 21 |
22 class Profile; | 22 class Profile; |
23 | 23 |
24 namespace safe_browsing { | 24 namespace safe_browsing { |
25 | 25 |
| 26 // These values are used to send UMA information and are replicated in the |
| 27 // histograms.xml file, so the order MUST NOT CHANGE. |
| 28 enum CleanupStartedHistogramValue { |
| 29 CLEANUP_STARTED_FROM_PROMPT_DIALOG = 0, |
| 30 CLEANUP_STARTED_FROM_PROMPT_IN_SETTINGS = 1, |
| 31 |
| 32 CLEANUP_STARTED_MAX, |
| 33 }; |
| 34 |
| 35 // Records a SoftwareReporter.CleanupStarted histogram. |
| 36 void RecordCleanupStartedHistogram(CleanupStartedHistogramValue value); |
| 37 |
26 // Delegate class that provides services to the ChromeCleanerController class | 38 // Delegate class that provides services to the ChromeCleanerController class |
27 // and can be overridden by tests via | 39 // and can be overridden by tests via |
28 // SetChromeCleanerControllerDelegateForTesting(). | 40 // SetChromeCleanerControllerDelegateForTesting(). |
29 class ChromeCleanerControllerDelegate { | 41 class ChromeCleanerControllerDelegate { |
30 public: | 42 public: |
31 using FetchedCallback = base::OnceCallback<void(base::FilePath)>; | 43 using FetchedCallback = base::OnceCallback<void(base::FilePath)>; |
32 | 44 |
33 ChromeCleanerControllerDelegate(); | 45 ChromeCleanerControllerDelegate(); |
34 virtual ~ChromeCleanerControllerDelegate(); | 46 virtual ~ChromeCleanerControllerDelegate(); |
35 | 47 |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 THREAD_CHECKER(thread_checker_); | 252 THREAD_CHECKER(thread_checker_); |
241 | 253 |
242 base::WeakPtrFactory<ChromeCleanerController> weak_factory_; | 254 base::WeakPtrFactory<ChromeCleanerController> weak_factory_; |
243 | 255 |
244 DISALLOW_COPY_AND_ASSIGN(ChromeCleanerController); | 256 DISALLOW_COPY_AND_ASSIGN(ChromeCleanerController); |
245 }; | 257 }; |
246 | 258 |
247 } // namespace safe_browsing | 259 } // namespace safe_browsing |
248 | 260 |
249 #endif // CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_CHROME_CLEANER_CONTROLLER
_WIN_H_ | 261 #endif // CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_CHROME_CLEANER_CONTROLLER
_WIN_H_ |
OLD | NEW |