| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_SETTINGS_RESETTER_WIN_H_ |
| 6 #define CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_SETTINGS_RESETTER_WIN_H_ |
| 7 |
| 8 #include <memory> |
| 9 |
| 10 #include "base/callback.h" |
| 11 #include "base/macros.h" |
| 12 #include "chrome/browser/safe_browsing/settings_reset_prompt/default_settings_fe
tcher.h" |
| 13 |
| 14 class Profile; |
| 15 class ProfileResetter; |
| 16 |
| 17 namespace safe_browsing { |
| 18 |
| 19 // Tags the last active profile to be reset once the current cleanup finishes, |
| 20 // by means of ResetCurrentProfilePostCleanupIfTagged(). If a cleanup doesn't |
| 21 // require a reboot and the browser is still running once the cleanup finishes, |
| 22 // then settings will be reset as soon as the cleaner process returns; if the |
| 23 // user closes the browser while the cleanup is ongoing, then settings will be |
| 24 // reset on the first browser restart that happens after the cleaner process |
| 25 // ends. If the cleanup requires a reboot, then settings will be reset on the |
| 26 // first browser restart that happens after reboot. |
| 27 void TagCurrentProfileForResetting(); |
| 28 |
| 29 class SettingsResetterDelegate { |
| 30 public: |
| 31 SettingsResetterDelegate(); |
| 32 virtual ~SettingsResetterDelegate(); |
| 33 |
| 34 virtual void FetchDefaultSettings( |
| 35 DefaultSettingsFetcher::SettingsCallback callback); |
| 36 |
| 37 virtual std::unique_ptr<ProfileResetter> GetProfileResetter(Profile* profile); |
| 38 |
| 39 private: |
| 40 DISALLOW_COPY_AND_ASSIGN(SettingsResetterDelegate); |
| 41 }; |
| 42 |
| 43 // Resets settings for the current profile if it's tagged for reset and a |
| 44 // cleanup has completed. |
| 45 void ResetCurrentProfilePostCleanupIfTagged( |
| 46 base::OnceClosure continuation, |
| 47 std::unique_ptr<SettingsResetterDelegate> delegate = nullptr); |
| 48 |
| 49 } // namespace safe_browsing |
| 50 |
| 51 #endif // CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_SETTINGS_RESETTER_WIN_H_ |
| OLD | NEW |