Chromium Code Reviews| 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; |