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

Unified Diff: net/cookies/cookie_monster.h

Issue 14365006: Add a way to query a cookie store whether any cookies exist for a given (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 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 | « no previous file | 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
===================================================================
--- net/cookies/cookie_monster.h (revision 194665)
+++ net/cookies/cookie_monster.h (working copy)
@@ -124,6 +124,7 @@
typedef base::Callback<void(const CookieList& cookies)> GetCookieListCallback;
typedef base::Callback<void(bool success)> DeleteCookieCallback;
+ typedef base::Callback<void(bool cookies_exist)> HasCookiesForETLDP1Callback;
// Sets a cookie given explicit user-provided cookie attributes. The cookie
// name, value, domain, etc. are each provided as separate strings. This
@@ -176,6 +177,10 @@
void DeleteCanonicalCookieAsync(const CanonicalCookie& cookie,
const DeleteCookieCallback& callback);
+ // Checks whether for a given ETLD+1, there currently exist any cookies.
+ void HasCookiesForETLDP1Async(const std::string& etldp1,
+ const HasCookiesForETLDP1Callback& callback);
+
// Resets the list of cookieable schemes to the supplied schemes.
// If this this method is called, it must be called before first use of
// the instance (i.e. as part of the instance initialization process).
@@ -276,6 +281,7 @@
class SetCookieWithDetailsTask;
class SetCookieWithOptionsTask;
class DeleteSessionCookiesTask;
+ class HasCookiesForETLDP1Task;
// Testing support.
// For SetCookieWithCreationTime.
@@ -404,6 +410,8 @@
int DeleteSessionCookies();
+ bool HasCookiesForETLDP1(const std::string& etldp1);
+
// Called by all non-static functions to ensure that the cookies store has
// been initialized. This is not done during creating so it doesn't block
// the window showing.
« no previous file with comments | « no previous file | net/cookies/cookie_monster.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698