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

Unified Diff: net/cookies/cookie_monster.h

Issue 2882063002: Add a SetCanonicalCookie method for CookieMonster. (Closed)
Patch Set: Fix AW cookie store wrapper. Created 3 years, 6 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/canonical_cookie_unittest.cc ('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 42afd9a40cf8504eeec1dac28ab960c5d7bba2c4..9382e93573dcf392ab6c57950941a4c7385fb7af 100644
--- a/net/cookies/cookie_monster.h
+++ b/net/cookies/cookie_monster.h
@@ -176,6 +176,10 @@ class NET_EXPORT CookieMonster : public CookieStore {
CookieSameSite same_site,
CookiePriority priority,
const SetCookiesCallback& callback) override;
+ void SetCanonicalCookieAsync(std::unique_ptr<CanonicalCookie> cookie,
+ bool secure_source,
+ bool modify_http_only,
+ const SetCookiesCallback& callback) override;
void GetCookiesWithOptionsAsync(const GURL& url,
const CookieOptions& options,
const GetCookiesCallback& callback) override;
@@ -247,6 +251,7 @@ class NET_EXPORT CookieMonster : public CookieStore {
class SetAllCookiesTask;
class SetCookieWithDetailsTask;
class SetCookieWithOptionsTask;
+ class SetCanonicalCookieTask;
class DeleteSessionCookiesTask;
// Testing support.
@@ -427,6 +432,15 @@ class NET_EXPORT CookieMonster : public CookieStore {
CookieSameSite same_site,
CookiePriority priority);
+ // Sets a canonical cookie, deletes equivalents and performs garbage
+ // collection. |source_secure| indicates if the cookie is being set
+ // from a secure source (e.g. a cryptographic scheme).
+ // |modify_http_only| indicates if this setting operation is allowed
+ // to affect http_only cookies.
+ bool SetCanonicalCookie(std::unique_ptr<CanonicalCookie> cookie,
+ bool secure_source,
+ bool can_modify_httponly);
+
CookieList GetAllCookies();
CookieList GetCookieListWithOptions(const GURL& url,
@@ -545,15 +559,6 @@ class NET_EXPORT CookieMonster : public CookieStore {
const base::Time& creation_time,
const CookieOptions& options);
- // Sets a canonical cookie, deletes equivalents and performs garbage
- // collection. |source_secure| indicates if the cookie is being set
- // from a secure source (e.g. a cryptographic scheme).
- // |modify_http_only| indicates if this setting operation is allowed
- // to affect http_only cookies.
- bool SetCanonicalCookie(std::unique_ptr<CanonicalCookie> cookie,
- bool secure_source,
- bool can_modify_httponly);
-
// Sets all cookies from |list| after deleting any equivalent cookie.
// For data gathering purposes, this routine is treated as if it is
// restoring saved cookies; some statistics are not gathered in this case.
« no previous file with comments | « net/cookies/canonical_cookie_unittest.cc ('k') | net/cookies/cookie_monster.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698