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

Unified Diff: net/cookies/cookie_store.h

Issue 2349823003: Pass a RemovalCause to CookieChangedCallback (Closed)
Patch Set: Fix compilation errors Created 4 years, 3 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 | « net/cookies/cookie_monster_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cookies/cookie_store.h
diff --git a/net/cookies/cookie_store.h b/net/cookies/cookie_store.h
index f56fedd90392877b24e554276579a12733617700..f9d62a215f79a58b1f604a1ed03394cb366c2ec5 100644
--- a/net/cookies/cookie_store.h
+++ b/net/cookies/cookie_store.h
@@ -33,14 +33,29 @@ class CookieMonster;
// Destroying the CookieStore will cancel pending async callbacks.
class NET_EXPORT CookieStore {
public:
+ // In a CookieChangedCallback, this indicates why a cookie was removed if it
+ // was removed. This roughly mirrors CookieMonster::DeletionCause and
+ // CookieMonsterDelegate::ChangeCause.
+ enum class RemovalCause {
+ NOT_REMOVED,
Roger Tawa OOO till Jul 10th 2016/09/19 20:23:02 If I have a value set for a cookie, and I browse t
nharper 2016/09/19 21:34:30 It looks like you'll first get a (removed=true) OV
+ UNKNOWN,
+ EXPLICIT,
+ OVERWRITE,
+ EXPIRED,
+ EVICTED,
+ EXPIRED_OVERWRITE,
+ };
Roger Tawa OOO till Jul 10th 2016/09/19 20:23:02 Wondering why you didn't define as ChangeCause ins
nharper 2016/09/19 21:34:30 I'm thinking combining the bool with the enum woul
+
// Callback definitions.
typedef base::Callback<void(const CookieList& cookies)> GetCookieListCallback;
typedef base::Callback<void(const std::string& cookie)> GetCookiesCallback;
typedef base::Callback<void(bool success)> SetCookiesCallback;
typedef base::Callback<void(int num_deleted)> DeleteCallback;
- typedef base::Callback<void(const CanonicalCookie& cookie, bool removed)>
+ typedef base::Callback<
+ void(const CanonicalCookie& cookie, bool removed, RemovalCause cause)>
CookieChangedCallback;
- typedef base::CallbackList<void(const CanonicalCookie& cookie, bool removed)>
+ typedef base::CallbackList<
+ void(const CanonicalCookie& cookie, bool removed, RemovalCause cause)>
CookieChangedCallbackList;
typedef CookieChangedCallbackList::Subscription CookieChangedSubscription;
typedef base::Callback<bool(const CanonicalCookie& cookie)> CookiePredicate;
« no previous file with comments | « net/cookies/cookie_monster_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698