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

Unified Diff: chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_win.h

Issue 2906103002: Post-cleanup settings reset. (Closed)
Patch Set: Code reviews Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
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..0c86796fe956e6119cfb2784ec32e07f7f2f14d5 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,11 @@ class ChromeCleanerControllerDelegate {
virtual void FetchAndVerifyChromeCleaner(FetchedCallback fetched_callback);
virtual bool SafeBrowsingExtendedReportingScoutEnabled();
virtual bool IsMetricsAndCrashReportingEnabled();
+
+ // Auxiliary methods for tagging and resetting open profiles.
+ virtual void InvokeTagForResetting(Profile* profile);
robertshield 2017/06/12 15:00:04 naming nit: why InvokeFoo() instead of Foo() ? Doe
ftirelo 2017/06/13 18:52:48 Done.
+ virtual void InvokeResetTaggedProfiles(std::vector<Profile*> profiles,
+ base::OnceClosure continuation);
};
// Controller class that keeps track of the execution of the Chrome Cleaner and
@@ -138,13 +147,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 +198,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_;

Powered by Google App Engine
This is Rietveld 408576698