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

Unified Diff: chrome/browser/browsing_data_remover.h

Issue 10413072: Teaching BrowsingDataRemover how to delete application data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh. Created 8 years, 7 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/browsing_data_remover.h
diff --git a/chrome/browser/browsing_data_remover.h b/chrome/browser/browsing_data_remover.h
index c34db65ade7be003da2d66a253fe71e4e1292e1c..5f645ff4deda44788cfbce66e558150966601ff6 100644
--- a/chrome/browser/browsing_data_remover.h
+++ b/chrome/browser/browsing_data_remover.h
@@ -82,6 +82,12 @@ class BrowsingDataRemover : public content::NotificationObserver,
REMOVE_SERVER_BOUND_CERTS
};
+ enum OriginSetMask {
+ UNPROTECTED_WEB = 1 << 0,
+ PROTECTED_WEB = 1 << 1,
+ EXTENSION = 1 << 2
+ };
+
// When BrowsingDataRemover successfully removes data, a notification of type
// NOTIFICATION_BROWSING_DATA_REMOVED is triggered with a Details object of
// this type.
@@ -119,8 +125,9 @@ class BrowsingDataRemover : public content::NotificationObserver,
BrowsingDataRemover(Profile* profile, TimePeriod time_period,
base::Time delete_end);
- // Removes the specified items related to browsing for all origins.
- void Remove(int remove_mask);
+ // Removes the specified items related to browsing for all origins that match
+ // the provided |origin_set_mask| (protected, unprotected, or both).
+ void Remove(int remove_mask, int origin_set_mask);
void AddObserver(Observer* observer);
void RemoveObserver(Observer* observer);
@@ -179,12 +186,12 @@ class BrowsingDataRemover : public content::NotificationObserver,
base::WaitableEvent* waitable_event) OVERRIDE;
// Removes the specified items related to browsing for a specific host. If the
- // provided |origin| is empty, data is removed for all origins. If
- // |remove_protected_origins| is true, then data is removed even if the origin
- // is otherwise protected (e.g. as an installed application).
+ // provided |origin| is empty, data is removed for all origins. The
+ // |origin_set_mask| parameter defines the set of origins from which data
+ // should be removed (protected, unprotected, or both).
void RemoveImpl(int remove_mask,
const GURL& origin,
- bool remove_protected_origins);
+ int origin_set_mask);
// If we're not waiting on anything, notifies observers and deletes this
// object.
@@ -315,8 +322,8 @@ class BrowsingDataRemover : public content::NotificationObserver,
// The origin for the current removal operation.
GURL remove_origin_;
- // Should data for protected origins be removed?
- bool remove_protected_;
+ // From which types of origins should we remove data?
+ int origin_set_mask_;
ObserverList<Observer> observer_list_;

Powered by Google App Engine
This is Rietveld 408576698