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

Unified Diff: net/cookies/cookie_monster.h

Issue 2103863003: Make CanonicalCookie::Source() private. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@source
Patch Set: Cleanup Created 4 years, 5 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 850ad9422b8090f875953cc7e0974501b590f056..158034fe754589510573bc95882c56ec23b67bf2 100644
--- a/net/cookies/cookie_monster.h
+++ b/net/cookies/cookie_monster.h
@@ -142,6 +142,8 @@ class NET_EXPORT CookieMonster : public CookieStore {
~CookieMonster() override;
// Replaces all the cookies by |list|. This method does not flush the backend.
+ // This method does not support setting secure cookies, which need source
+ // URLs.
void SetAllCookiesAsync(const CookieList& list,
const SetCookiesCallback& callback);
@@ -487,6 +489,7 @@ class NET_EXPORT CookieMonster : public CookieStore {
std::vector<CanonicalCookie*>* cookies);
// Delete any cookies that are equivalent to |ecc| (same path, domain, etc).
+ // |source_url| is the URL that is attempting to set the cookie.
// If |skip_httponly| is true, httponly cookies will not be deleted. The
// return value will be true if |skip_httponly| skipped an httponly cookie or
// |enforce_strict_secure| is true and the cookie to
@@ -496,6 +499,7 @@ class NET_EXPORT CookieMonster : public CookieStore {
// NOTE: There should never be more than a single matching equivalent cookie.
bool DeleteAnyEquivalentCookie(const std::string& key,
const CanonicalCookie& ecc,
+ const GURL& source_url,
bool skip_httponly,
bool already_expired,
bool enforce_strict_secure);
@@ -504,6 +508,7 @@ class NET_EXPORT CookieMonster : public CookieStore {
// cookie in cookies_. Guarantee: all iterators to cookies_ remain valid.
CookieMap::iterator InternalInsertCookie(const std::string& key,
CanonicalCookie* cc,
+ const GURL& source_url,
bool sync_to_store);
// Helper function that sets cookies with more control.
@@ -516,7 +521,9 @@ class NET_EXPORT CookieMonster : public CookieStore {
// Helper function that sets a canonical cookie, deleting equivalents and
// performing garbage collection.
+ // |source_url| is the URL that's attempting to set the cookie.
bool SetCanonicalCookie(std::unique_ptr<CanonicalCookie> cc,
+ const GURL& source_url,
const CookieOptions& options);
// Helper function calling SetCanonicalCookie() for all cookies in |list|.

Powered by Google App Engine
This is Rietveld 408576698