| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NET_COOKIES_CANONICAL_COOKIE_H_ | 5 #ifndef NET_COOKIES_CANONICAL_COOKIE_H_ |
| 6 #define NET_COOKIES_CANONICAL_COOKIE_H_ | 6 #define NET_COOKIES_CANONICAL_COOKIE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 // unidirectional (e.g. '/login/en' matches '/login' and '/', but | 116 // unidirectional (e.g. '/login/en' matches '/login' and '/', but |
| 117 // '/login' and '/' do not match '/login/en'). | 117 // '/login' and '/' do not match '/login/en'). |
| 118 bool IsEquivalentForSecureCookieMatching(const CanonicalCookie& ecc) const; | 118 bool IsEquivalentForSecureCookieMatching(const CanonicalCookie& ecc) const; |
| 119 | 119 |
| 120 void SetLastAccessDate(const base::Time& date) { | 120 void SetLastAccessDate(const base::Time& date) { |
| 121 last_access_date_ = date; | 121 last_access_date_ = date; |
| 122 } | 122 } |
| 123 | 123 |
| 124 // Returns true if the given |url_path| path-matches the cookie-path as | 124 // Returns true if the given |url_path| path-matches the cookie-path as |
| 125 // described in section 5.1.4 in RFC 6265. | 125 // described in section 5.1.4 in RFC 6265. |
| 126 bool IsOnPath(const std::string& url_path) const; | 126 bool IsOnPath(const base::StringPiece& url_path) const; |
| 127 | 127 |
| 128 // Returns true if the cookie domain matches the given |host| as described in | 128 // Returns true if the cookie domain matches the given |host| as described in |
| 129 // section 5.1.3 of RFC 6265. | 129 // section 5.1.3 of RFC 6265. |
| 130 bool IsDomainMatch(const std::string& host) const; | 130 bool IsDomainMatch(const std::string& host) const; |
| 131 | 131 |
| 132 // Returns true if the cookie should be included for the given request |url|. | 132 // Returns true if the cookie should be included for the given request |url|. |
| 133 // HTTP only cookies can be filter by using appropriate cookie |options|. | 133 // HTTP only cookies can be filter by using appropriate cookie |options|. |
| 134 // PLEASE NOTE that this method does not check whether a cookie is expired or | 134 // PLEASE NOTE that this method does not check whether a cookie is expired or |
| 135 // not! | 135 // not! |
| 136 bool IncludeForRequestURL(const GURL& url, | 136 bool IncludeForRequestURL(const GURL& url, |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 bool httponly_; | 214 bool httponly_; |
| 215 CookieSameSite same_site_; | 215 CookieSameSite same_site_; |
| 216 CookiePriority priority_; | 216 CookiePriority priority_; |
| 217 }; | 217 }; |
| 218 | 218 |
| 219 typedef std::vector<CanonicalCookie> CookieList; | 219 typedef std::vector<CanonicalCookie> CookieList; |
| 220 | 220 |
| 221 } // namespace net | 221 } // namespace net |
| 222 | 222 |
| 223 #endif // NET_COOKIES_CANONICAL_COOKIE_H_ | 223 #endif // NET_COOKIES_CANONICAL_COOKIE_H_ |
| OLD | NEW |