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_UI_WEBUI_SETTINGS_CHROME_CLEANUP_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROME_CLEANUP_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROME_CLEANUP_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROME_CLEANUP_HANDLER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 void OnJavascriptAllowed() override; | 29 void OnJavascriptAllowed() override; |
30 void OnJavascriptDisallowed() override; | 30 void OnJavascriptDisallowed() override; |
31 | 31 |
32 // ChromeCleanerController::Observer implementation. | 32 // ChromeCleanerController::Observer implementation. |
33 void OnIdle( | 33 void OnIdle( |
34 safe_browsing::ChromeCleanerController::IdleReason idle_reason) override; | 34 safe_browsing::ChromeCleanerController::IdleReason idle_reason) override; |
35 void OnScanning() override; | 35 void OnScanning() override; |
36 void OnInfected(const std::set<base::FilePath>& files) override; | 36 void OnInfected(const std::set<base::FilePath>& files) override; |
37 void OnCleaning(const std::set<base::FilePath>& files) override; | 37 void OnCleaning(const std::set<base::FilePath>& files) override; |
38 void OnRebootRequired() override; | 38 void OnRebootRequired() override; |
| 39 void OnLogsEnabledChanged(bool logs_enabled) override; |
39 | 40 |
40 private: | 41 private: |
41 // Callback for the "dismissCleanupPage" message to hide the Cleanup page | 42 // Callback for the "dismissCleanupPage" message to hide the Cleanup page |
42 // from the settings. | 43 // from the settings. |
43 void HandleDismiss(const base::ListValue* args); | 44 void HandleDismiss(const base::ListValue* args); |
44 | 45 |
45 // Callback for the "registerChromeCleanerObserver" message. This registers | 46 // Callback for the "registerChromeCleanerObserver" message. This registers |
46 // this object as an observer of the Chrome Cleanup global state and | 47 // this object as an observer of the Chrome Cleanup global state and |
47 // and retrieves the current cleanup state. | 48 // and retrieves the current cleanup state. |
48 void HandleRegisterChromeCleanerObserver(const base::ListValue* args); | 49 void HandleRegisterChromeCleanerObserver(const base::ListValue* args); |
49 | 50 |
50 // Callback for the "restartComputer" message to finalize the cleanup with a | 51 // Callback for the "restartComputer" message to finalize the cleanup with a |
51 // system restart. | 52 // system restart. |
52 void HandleRestartComputer(const base::ListValue* args); | 53 void HandleRestartComputer(const base::ListValue* args); |
53 | 54 |
| 55 // Callback for the "setLogsUploadPermission" message to keep track of |
| 56 // whether the user opted-out of logs upload or not. |
| 57 void HandleSetLogsUploadPermission(const base::ListValue* args); |
| 58 |
54 // Callback for the "startCleanup" message to start removing unwanted | 59 // Callback for the "startCleanup" message to start removing unwanted |
55 // software from the user's computer. | 60 // software from the user's computer. |
56 void HandleStartCleanup(const base::ListValue* args); | 61 void HandleStartCleanup(const base::ListValue* args); |
57 | 62 |
58 // Raw pointer to a singleton. Must outlive this object. | 63 // Raw pointer to a singleton. Must outlive this object. |
59 safe_browsing::ChromeCleanerController* controller_; | 64 safe_browsing::ChromeCleanerController* controller_; |
60 | 65 |
61 Profile* profile_; | 66 Profile* profile_; |
62 | 67 |
63 DISALLOW_COPY_AND_ASSIGN(ChromeCleanupHandler); | 68 DISALLOW_COPY_AND_ASSIGN(ChromeCleanupHandler); |
64 }; | 69 }; |
65 | 70 |
66 } // namespace settings | 71 } // namespace settings |
67 | 72 |
68 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROME_CLEANUP_HANDLER_H_ | 73 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROME_CLEANUP_HANDLER_H_ |
OLD | NEW |