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

Unified Diff: net/cookies/cookie_monster.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: ios fix, and fixed test 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_monster.h
diff --git a/net/cookies/cookie_monster.h b/net/cookies/cookie_monster.h
index 14c5a08c4df7d7d97e743f2bd00d07e363c8fd74..29b240744b8cee758007cbd307efe67fcd057ac3 100644
--- a/net/cookies/cookie_monster.h
+++ b/net/cookies/cookie_monster.h
@@ -188,6 +188,11 @@ class NET_EXPORT CookieMonster : public CookieStore {
const base::Time delete_end,
const GURL& url,
const DeleteCallback& callback) override;
+ void DeleteAllCreatedBetweenWithPredicateAsync(
+ const base::Time& delete_begin,
+ const base::Time& delete_end,
+ const base::Callback<bool(const CanonicalCookie&)>& predicate,
+ const DeleteCallback& callback) override;
void DeleteSessionCookiesAsync(const DeleteCallback&) override;
void FlushStore(const base::Closure& callback) override;
void SetForceKeepSessionState() override;
@@ -222,6 +227,7 @@ class NET_EXPORT CookieMonster : public CookieStore {
class DeleteTask;
class DeleteAllCreatedBetweenTask;
class DeleteAllCreatedBetweenForHostTask;
+ class DeleteAllCreatedBetweenWithPredicateTask;
class DeleteCookieTask;
class DeleteCanonicalCookieTask;
class GetCookieListForURLWithOptionsTask;
@@ -237,6 +243,9 @@ class NET_EXPORT CookieMonster : public CookieStore {
// For SetCookieWithCreationTime.
FRIEND_TEST_ALL_PREFIXES(CookieMonsterTest,
TestCookieDeleteAllCreatedBetweenTimestamps);
+ FRIEND_TEST_ALL_PREFIXES(
+ CookieMonsterTest,
+ TestCookieDeleteAllCreatedBetweenTimestampsWithPredicate);
// For gargage collection constants.
FRIEND_TEST_ALL_PREFIXES(CookieMonsterTest, TestHostGarbageCollection);
@@ -408,6 +417,12 @@ class NET_EXPORT CookieMonster : public CookieStore {
const base::Time delete_end,
const GURL& url);
+ // Predicate will be called with the calling thread.
+ int DeleteAllCreatedBetweenWithPredicate(
+ const base::Time& delete_begin,
+ const base::Time& delete_end,
+ const base::Callback<bool(const CanonicalCookie&)>& predicate);
+
bool SetCookieWithOptions(const GURL& url,
const std::string& cookie_line,
const CookieOptions& options);

Powered by Google App Engine
This is Rietveld 408576698