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

Unified Diff: net/cookies/canonical_cookie.h

Issue 2306393002: Loosen strict 'Secure' checks for non-overlapping paths. (Closed)
Patch Set: Created 4 years, 3 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/canonical_cookie.cc » ('j') | net/cookies/canonical_cookie_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cookies/canonical_cookie.h
diff --git a/net/cookies/canonical_cookie.h b/net/cookies/canonical_cookie.h
index 965396b58b01b5011d53dc6c96a2cadd018d1ff4..b0778e660e11a4bb3dfa631a286da4604db2de86 100644
--- a/net/cookies/canonical_cookie.h
+++ b/net/cookies/canonical_cookie.h
@@ -103,13 +103,13 @@ class NET_EXPORT CanonicalCookie {
&& path_ == ecc.Path());
}
- // Checks if two cookies have the same name and domain-match per RFC 6265.
- // Note that this purposefully ignores paths, and that this function is
- // guaranteed to return |true| for a superset of the inputs that
- // IsEquivalent() above returns |true| for.
+ // Checks a looser set of equivalency rules than 'IsEquivalent()' in order
+ // to support the stricter 'Secure' behaviors specified in
+ // https://tools.ietf.org/html/draft-ietf-httpbis-cookie-alone#section-3
//
- // This is needed for the updates to RFC6265 as per
- // https://tools.ietf.org/html/draft-west-leave-secure-cookies-alone.
+ // Returns 'true' if this cookie's name matches |ecc|, and this cookie is
+ // a domain-match for |ecc| (or vice versa), and |ecc|'s path is "on" this
+ // cookie's path (as per 'IsOnPath()').
jww 2016/09/06 22:45:10 nit: Maybe make a more explicit note that this is
bool IsEquivalentForSecureCookieMatching(const CanonicalCookie& ecc) const;
void SetLastAccessDate(const base::Time& date) {
« no previous file with comments | « no previous file | net/cookies/canonical_cookie.cc » ('j') | net/cookies/canonical_cookie_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698