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

Unified Diff: net/cookies/cookie_monster.h

Issue 1844243002: [CookieStore] Upgrading host-based deleting to predicate-based deleting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 | « ios/net/cookies/cookie_store_ios_unittest.mm ('k') | net/cookies/cookie_monster.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cookies/cookie_monster.h
diff --git a/net/cookies/cookie_monster.h b/net/cookies/cookie_monster.h
index 12e04942c8c8d4b5d823029e76fa853ab63b51a2..4d36c62dd370fec67828623b0af2b31343320575 100644
--- a/net/cookies/cookie_monster.h
+++ b/net/cookies/cookie_monster.h
@@ -183,10 +183,10 @@ class NET_EXPORT CookieMonster : public CookieStore {
void DeleteAllCreatedBetweenAsync(const base::Time& delete_begin,
const base::Time& delete_end,
const DeleteCallback& callback) override;
- void DeleteAllCreatedBetweenForHostAsync(
- const base::Time delete_begin,
- const base::Time delete_end,
- const GURL& url,
+ 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;
@@ -223,7 +223,7 @@ class NET_EXPORT CookieMonster : public CookieStore {
template <typename Result>
class DeleteTask;
class DeleteAllCreatedBetweenTask;
- class DeleteAllCreatedBetweenForHostTask;
+ class DeleteAllCreatedBetweenWithPredicateTask;
class DeleteCookieTask;
class DeleteCanonicalCookieTask;
class GetCookieListForURLWithOptionsTask;
@@ -239,6 +239,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);
@@ -406,9 +409,11 @@ class NET_EXPORT CookieMonster : public CookieStore {
int DeleteAllCreatedBetween(const base::Time& delete_begin,
const base::Time& delete_end);
- int DeleteAllCreatedBetweenForHost(const base::Time delete_begin,
- 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,
« no previous file with comments | « ios/net/cookies/cookie_store_ios_unittest.mm ('k') | net/cookies/cookie_monster.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698