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

Unified Diff: net/cookies/canonical_cookie.h

Issue 2158863003: Fix CanonicalCookie::IsEquivalentForSecureCookieMatching (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « no previous file | net/cookies/canonical_cookie.cc » ('j') | no next file with comments »
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 20e407b06ee3bca152ddbb76a9bb7bdf0485f03f..bdad3bb5609a6823035afc9cfa2ef8d35e10db60 100644
--- a/net/cookies/canonical_cookie.h
+++ b/net/cookies/canonical_cookie.h
@@ -28,6 +28,7 @@ class NET_EXPORT CanonicalCookie {
// unless the caller has done appropriate validation and canonicalization
// themselves.
CanonicalCookie();
+ // TODO(mmenke): Remove |url|, as it's not used.
CanonicalCookie(const GURL& url,
const std::string& name,
const std::string& value,
@@ -127,10 +128,7 @@ class NET_EXPORT CanonicalCookie {
//
// This is needed for the updates to RFC6265 as per
// https://tools.ietf.org/html/draft-west-leave-secure-cookies-alone.
- bool IsEquivalentForSecureCookieMatching(const CanonicalCookie& ecc) const {
- return (name_ == ecc.Name() && (ecc.IsDomainMatch(Source().host()) ||
- IsDomainMatch(ecc.Source().host())));
- }
+ bool IsEquivalentForSecureCookieMatching(const CanonicalCookie& ecc) const;
void SetLastAccessDate(const base::Time& date) {
last_access_date_ = date;
@@ -197,17 +195,9 @@ class NET_EXPORT CanonicalCookie {
const GURL& url,
const ParsedCookie& parsed_cookie);
- const GURL& Source() const { return source_; }
-
- // The source member of a canonical cookie is the origin of the URL that tried
- // to set this cookie. This field is not persistent though; its only used in
- // the in-tab cookies dialog to show the user the source URL. This is used for
- // both allowed and blocked cookies.
- // When a CanonicalCookie is constructed from the backing store (common case)
- // this field will be null. CanonicalCookie consumers should not rely on
- // this field unless they guarantee that the creator of those
- // CanonicalCookies properly initialized the field.
- GURL source_;
+ // Returns the cookie's domain, with the leading dot removed, if present.
+ std::string DomainWithoutDot() const;
+
std::string name_;
std::string value_;
std::string domain_;
« no previous file with comments | « no previous file | net/cookies/canonical_cookie.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698