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

Unified Diff: net/cookies/cookie_store.h

Issue 1741123002: Add removal filter support for Cookies, Storage, and Content Settings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added SafeBrowsing cookie support Created 4 years, 9 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: net/cookies/cookie_store.h
diff --git a/net/cookies/cookie_store.h b/net/cookies/cookie_store.h
index 64852612d53fc2f544c344b4b0d88467c8acbdd5..6667836f2c2dcf2a00481b226d7e916da4574382 100644
--- a/net/cookies/cookie_store.h
+++ b/net/cookies/cookie_store.h
@@ -10,7 +10,7 @@
#include <string>
#include <vector>
-#include "base/callback.h"
+#include "base/callback_forward.h"
#include "base/callback_list.h"
#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
@@ -43,6 +43,9 @@ class NET_EXPORT CookieStore {
typedef base::CallbackList<void(const CanonicalCookie& cookie, bool removed)>
CookieChangedCallbackList;
typedef CookieChangedCallbackList::Subscription CookieChangedSubscription;
+ // Returns if we should clear the given cookie.
+ typedef base::Callback<bool(const CanonicalCookie& cookie)>
+ ClearCookiesPredicate;
virtual ~CookieStore();
@@ -167,6 +170,16 @@ class NET_EXPORT CookieStore {
const GURL& url,
const DeleteCallback& callback) = 0;
+ // Deletes all of the cookies that match the given predicate and that have a
+ // creation_date greater than or equal to |delete_begin| and less then
+ // |delete_end|.
+ // Returns the number of cookies deleted.
+ virtual void DeleteAllCreatedBetweenWithPredicateAsync(
+ const base::Time& delete_begin,
+ const base::Time& delete_end,
+ const ClearCookiesPredicate& predicate,
+ const DeleteCallback& callback) = 0;
+
virtual void DeleteSessionCookiesAsync(const DeleteCallback&) = 0;
// Deletes all cookies in the store.

Powered by Google App Engine
This is Rietveld 408576698