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

Unified Diff: chrome/browser/profile_resetter/profile_resetter.h

Issue 17274006: Reset profile: reset cookies and site data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 7 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
« no previous file with comments | « no previous file | chrome/browser/profile_resetter/profile_resetter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profile_resetter/profile_resetter.h
diff --git a/chrome/browser/profile_resetter/profile_resetter.h b/chrome/browser/profile_resetter/profile_resetter.h
index 9031f7414dfafdaa5d4619387a3d5d82199cbc76..492d6f6d04971da476d0d5b0a0ca6c7a388aa061 100644
--- a/chrome/browser/profile_resetter/profile_resetter.h
+++ b/chrome/browser/profile_resetter/profile_resetter.h
@@ -8,6 +8,7 @@
#include "base/basictypes.h"
#include "base/callback.h"
#include "base/threading/non_thread_safe.h"
+#include "chrome/browser/browsing_data/browsing_data_remover.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -18,7 +19,8 @@ class TemplateURLService;
// It is used in case the profile has been damaged due to malware or bad user
// settings.
class ProfileResetter : public base::NonThreadSafe,
- public content::NotificationObserver {
+ public content::NotificationObserver,
+ public BrowsingDataRemover::Observer {
public:
// Flags indicating what aspects of a profile shall be reset.
enum Resettable {
@@ -70,6 +72,9 @@ class ProfileResetter : public base::NonThreadSafe,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
+ // BrowsingDataRemover::Observer:
+ virtual void OnBrowsingDataRemoverDone() OVERRIDE;
+
Profile* profile_;
TemplateURLService* template_url_service_;
@@ -82,6 +87,10 @@ class ProfileResetter : public base::NonThreadSafe,
content::NotificationRegistrar registrar_;
+ // If non-null it means removal is in progress. BrowsingDataRemover takes care
+ // of deleting itself when done.
+ BrowsingDataRemover* cookies_remover_;
+
DISALLOW_COPY_AND_ASSIGN(ProfileResetter);
};
« no previous file with comments | « no previous file | chrome/browser/profile_resetter/profile_resetter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698