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

Unified Diff: chrome/browser/extensions/api/cookies/cookies_api.cc

Issue 2349823003: Pass a RemovalCause to CookieChangedCallback (Closed)
Patch Set: respond to comments 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
Index: chrome/browser/extensions/api/cookies/cookies_api.cc
diff --git a/chrome/browser/extensions/api/cookies/cookies_api.cc b/chrome/browser/extensions/api/cookies/cookies_api.cc
index 16aabadf614b666cc6adf6e721de580570ba7195..6546bacfd14fd515ab31e07ad9306d2981a42b55 100644
--- a/chrome/browser/extensions/api/cookies/cookies_api.cc
+++ b/chrome/browser/extensions/api/cookies/cookies_api.cc
@@ -143,26 +143,28 @@ void CookiesEventRouter::CookieChanged(
// Map the internal cause to an external string.
std::string cause;
switch (details->cause) {
- case net::CookieMonsterDelegate::CHANGE_COOKIE_EXPLICIT:
+ case net::CookieStore::ChangeCause::INSERTED:
+ case net::CookieStore::ChangeCause::EXPLICIT:
cause = keys::kExplicitChangeCause;
break;
- case net::CookieMonsterDelegate::CHANGE_COOKIE_OVERWRITE:
+ case net::CookieStore::ChangeCause::OVERWRITE:
cause = keys::kOverwriteChangeCause;
break;
- case net::CookieMonsterDelegate::CHANGE_COOKIE_EXPIRED:
+ case net::CookieStore::ChangeCause::EXPIRED:
cause = keys::kExpiredChangeCause;
break;
- case net::CookieMonsterDelegate::CHANGE_COOKIE_EVICTED:
+ case net::CookieStore::ChangeCause::EVICTED:
cause = keys::kEvictedChangeCause;
break;
- case net::CookieMonsterDelegate::CHANGE_COOKIE_EXPIRED_OVERWRITE:
+ case net::CookieStore::ChangeCause::EXPIRED_OVERWRITE:
cause = keys::kExpiredOverwriteChangeCause;
break;
+ case net::CookieStore::ChangeCause::UNKNOWN_DELETION:
default:
Devlin 2016/09/27 15:48:05 Can we remove the default: case here?
nharper 2016/09/27 17:43:48 Done.
NOTREACHED();
}
« no previous file with comments | « android_webview/browser/net/aw_cookie_store_wrapper.cc ('k') | chrome/browser/extensions/extension_cookie_monster_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698