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

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: Merge 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
« 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 850ad9422b8090f875953cc7e0974501b590f056..4fac67769602a2fb62e922c5d2a160a017484ca3 100644
--- a/net/cookies/cookie_monster.h
+++ b/net/cookies/cookie_monster.h
@@ -142,6 +142,9 @@ 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.
+ // TODO(mmenke): This method is only used on iOS. Consider removing it.
void SetAllCookiesAsync(const CookieList& list,
const SetCookiesCallback& callback);
@@ -487,6 +490,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 +500,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 +509,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 +522,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|.
« 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