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

Unified Diff: net/cookies/cookie_monster.h

Issue 2882063002: Add a SetCanonicalCookie method for CookieMonster. (Closed)
Patch Set: Fix iOS behavior for secure cookies. 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
Index: net/cookies/cookie_monster.h
diff --git a/net/cookies/cookie_monster.h b/net/cookies/cookie_monster.h
index 42afd9a40cf8504eeec1dac28ab960c5d7bba2c4..0f24520cb857c4389dc4466e6a666d06b2c9ea08 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(const 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.

Powered by Google App Engine
This is Rietveld 408576698