| Index: chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_win.h
|
| diff --git a/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_win.h b/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_win.h
|
| index 0b75a2c36297b11052db2c66d6194881ae16e7d1..73175a898a28dc4a19824de694e092250cb2c6eb 100644
|
| --- a/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_win.h
|
| +++ b/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_win.h
|
| @@ -7,7 +7,9 @@
|
|
|
| #include <memory>
|
| #include <set>
|
| +#include <vector>
|
|
|
| +#include "base/callback.h"
|
| #include "base/files/file_path.h"
|
| #include "base/macros.h"
|
| #include "base/memory/weak_ptr.h"
|
| @@ -17,6 +19,8 @@
|
| #include "chrome/browser/safe_browsing/chrome_cleaner/reporter_runner_win.h"
|
| #include "components/chrome_cleaner/public/interfaces/chrome_prompt.mojom.h"
|
|
|
| +class Profile;
|
| +
|
| namespace base {
|
| template <typename T>
|
| struct DefaultSingletonTraits;
|
| @@ -41,6 +45,12 @@ class ChromeCleanerControllerDelegate {
|
| virtual void FetchAndVerifyChromeCleaner(FetchedCallback fetched_callback);
|
| virtual bool SafeBrowsingExtendedReportingScoutEnabled();
|
| virtual bool IsMetricsAndCrashReportingEnabled();
|
| +
|
| + // Auxiliary methods for tagging and resetting open profiles.
|
| + virtual void InvokeTagProfileForResetting(Profile* profile);
|
| + virtual void InvokeResetPostCleanupSettingsIfTagged(
|
| + std::vector<Profile*> profiles,
|
| + base::OnceClosure continuation);
|
| };
|
|
|
| // Controller class that keeps track of the execution of the Chrome Cleaner and
|
| @@ -138,13 +148,14 @@ class ChromeCleanerController {
|
|
|
| // Sends the user's response, as to whether or not they want the Chrome
|
| // Cleaner to remove harmful software that was found, to the Chrome Cleaner
|
| - // process.
|
| + // process. If the user accepted the prompt, then tags |profile| for
|
| + // post-cleanup settings reset.
|
| //
|
| // A call to ReplyWithUserResponse() will be a no-op if the controller is not
|
| // in the kInfected state. This gracefully handles cases where multiple user
|
| // responses are received, for example if a user manages to click on a
|
| // "Cleanup" button multiple times.
|
| - void ReplyWithUserResponse(UserResponse user_response);
|
| + void ReplyWithUserResponse(Profile* profile, UserResponse user_response);
|
|
|
| // Passing in a nullptr as |delegate| resets the delegate to a default
|
| // production version.
|
| @@ -188,6 +199,9 @@ class ChromeCleanerController {
|
| void OnConnectionClosed();
|
| void OnCleanerProcessDone(ChromeCleanerRunner::ProcessStatus process_status);
|
|
|
| + // Invoked once settings reset is done for tagged profiles.
|
| + void OnSettingsResetCompleted();
|
| +
|
| std::unique_ptr<ChromeCleanerControllerDelegate> real_delegate_;
|
| // Pointer to either real_delegate_ or one set by tests.
|
| ChromeCleanerControllerDelegate* delegate_;
|
|
|