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

Unified Diff: chrome/browser/browsing_data_remover.h

Issue 9379008: Add origin-based deletion to BrowsingDataRemover (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Peter's feedback. Created 8 years, 10 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/browsing_data_remover.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browsing_data_remover.h
diff --git a/chrome/browser/browsing_data_remover.h b/chrome/browser/browsing_data_remover.h
index ff5159e1fe575580aae26bce3cb2f798acf5e1bb..33f3515c0595e9c02f465da102249033aa12d934 100644
--- a/chrome/browser/browsing_data_remover.h
+++ b/chrome/browser/browsing_data_remover.h
@@ -117,7 +117,7 @@ class BrowsingDataRemover : public content::NotificationObserver,
BrowsingDataRemover(Profile* profile, TimePeriod time_period,
base::Time delete_end);
- // Removes the specified items related to browsing.
+ // Removes the specified items related to browsing for all origins.
void Remove(int remove_mask);
void AddObserver(Observer* observer);
@@ -137,6 +137,14 @@ class BrowsingDataRemover : public content::NotificationObserver,
// only one BrowsingDataRemover instance can be called at a time.
FRIEND_TEST_ALL_PREFIXES(ExtensionBrowsingDataTest, OneAtATime);
+ // The BrowsingDataRemover tests need to be able to access the implementation
+ // of Remove(), as it exposes details that aren't yet available in the public
+ // API. As soon as those details are exposed via new methods, this should be
+ // removed.
+ //
+ // TODO(mkwst): See http://crbug.com/113621
+ friend class BrowsingDataRemoverTest;
+
enum CacheState {
STATE_NONE,
STATE_CREATE_MAIN,
@@ -165,6 +173,14 @@ class BrowsingDataRemover : public content::NotificationObserver,
virtual void OnWaitableEventSignaled(
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).
+ void RemoveImpl(int remove_mask,
+ const GURL& origin,
+ bool remove_protected_origins);
+
// If we're not waiting on anything, notifies observers and deletes this
// object.
void NotifyAndDeleteIfDone();
@@ -290,6 +306,12 @@ class BrowsingDataRemover : public content::NotificationObserver,
// The removal mask for the current removal operation.
int remove_mask_;
+ // The origin for the current removal operation.
+ GURL remove_origin_;
+
+ // Should data for protected origins be removed?
+ bool remove_protected_;
+
ObserverList<Observer> observer_list_;
// Used if we need to clear history.
« no previous file with comments | « no previous file | chrome/browser/browsing_data_remover.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698